Ads

Tuesday, 14 February 2017

Start list workflow from powrshell

$siteURL="Site URL"
$listName="List Name"
$site=Get-Spsite $siteURL
$web=$site.RootWeb
$list=$web.Lists[$listName]
$item=$list.Items[0]
$manager=$site.WorkFlowManager
$association=$list.WorkFlowAssociations[0]
$data=$association.AssociationData
$wf=$manager.StartWorkFlow($item,$association,$data,$true)

No comments:

Post a Comment

Ads