In this article we will be seeing how to get the workflows associated with a specific list using PowerShell in SharePoint 2010. In this article
Get the workflows associated with a specific list using C#
class Program { static void Main(string[] args) { using (SPSite site = new SPSite("http://servername:1111/")) { using (SPWeb web = site.RootWeb) { SPList list = web.Lists["Users"]; SPWorkflowManager manager = site.WorkflowManager; SPWorkflowAssociationCollection associationColl = list.WorkflowAssociations; foreach (SPWorkflowAssociation association in associationColl) { Console.WriteLine(association.Name.ToString()); } Console.ReadLine(); } } } } Get the workflows associated with a specific list using PowerShell $siteURL="http://serverName:1111/" $listName="Users" $site=Get-SPSite $siteURL $web=$site.RootWeb $list=$web.Lists[$listName] $wfManager=$site.WorkflowManager $associationColl=$list.WorkflowAssociations foreach($association in $associationColl) { write-host $association.Name } $web.Dispose() $site.Dispose()
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: