I need create a workflow that move all items in a list to another list. This is easy. But I need that the name of the second list be the month and the year. I create a script that create the list automatically but i dont know how to make it take the name of a varible. Any idea?
Thanks!
This is the script used to create the new list.
$site = Get-SPSite siteserver
$web = get-spweb -Identity siteserver/site
$xd = Get-Date -Format MMyyyy
$listTemplates = $site.GetCustomListTemplates($web)
if ((Get-Date).day -eq 1)
{
$web.Lists.Add("$xd", "", $listTemplates["Archive_List"])
$spList = $Web.GetList("siteserver/site/Lists/$xd/")
$spList.OnQuickLaunch = "True" $spList.Update()
}