Forum Discussion

Santhosh Sankaran's avatar
Santhosh Sankaran
Brass Contributor
Nov 21, 2019

Retrieve all SharePoint online "site workflows" in powershell

Hi ,

Is there a way i can get the details of Site workflow from Powershell ? I am able to retrieve the 'list workflow' details using EnumerateSubscriptionsByList(<ListID>)  but not the site workflows.

 

Below is the code snippet i am trying this gives me all the workflows (both site and list) but not sure how to retrieve the type of workflow.  

 

$WorkflowServicesManager = New-Object Microsoft.SharePoint.Client.WorkflowServices.WorkflowServicesManager($context,$objweb)
$context.Load($WorkflowServicesManager)
$context.ExecuteQuery()
$WorkflowSubscriptionService = $workflowServicesManager.GetWorkflowSubscriptionService()
$context.Load($WorkflowSubscriptionService)
$context.ExecuteQuery()
$siteworkflows=$WorkflowSubscriptionService.EnumerateSubscriptions()

 

 

No RepliesBe the first to reply

Resources