1

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() 
      } 
1
  • 1
    can you post the code you used to create the list? Commented Nov 19, 2018 at 13:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.