C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Starting a Workflow using Powershell
WhatsApp
Lakshmanan Sethu Sankaranarayan
11y
2.6
k
0
0
25
Blog
To start a workflow on a single list item , we can use the following PowerShell commands.
$web = Get-SPWeb -Identity
https://mysite
/workflow
$manager = $web.Site.WorkFlowManager
$mylist = $web.Lists["Shared Documents"]
$association = $mylist .WorkflowAssociations.GetAssociationByName("On Item Created","en-US")
$data = $association .AssociationData
$items = $mylist .Items foreach($item in $items)
{ $wf = $manager.StartWorkFlow($item,$association ,$data,$true)
}
$manager.Dispose()
$web.Dispose()
Starting a Workflow using Powershell
People also reading
Membership not found