This PowerShell utility helps you to perform bulk operations such as bulk Cancel, bulk resubmit runs on the Standard Logic App Workflows.
Below are the supported operations with this utility.
- BulkCancel - Cancel running instances
- BulkResubmitFailedRuns - Resubmits failed runs
- BulkResubmitCancelledRuns - Resubmits cancelled runs
- BulkResubmitSucceededRuns - Resubmits Succeeded runs
Steps to follow for executing the script:
-
Copy the PowerShell script to thedesired folder
-
Set up Azure Service Principal - Contributor access on the Subscription. https://blog.jongallant.com/2017/11/azure-rest-apis-postman/
-
Open PowerShell with 'Run As administrator Privileges'
-
Run the below command to bypass the execution policy and accept -Y
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
-
Change the directory to the PowerShell script folder where its available.
cd 'PowerShellScriptFolderPath'
-
Execute one of the below commands to perform the specified bulk operation on Standard Logic App workflow
For User Sign-In option:
.\Standard_LogicApp_Utility.ps1 -SubscriptionId 'Subscription ID' -ResourceGroupName 'Resource Group Name' -LogicAppName 'Logic App Name' -WorkflowName 'WorkflowName' -Operation 'OperationName' -StartTime '2021-08-19T10:47:07.41621Z' -EndTime '2020-11-02T16:38:00.000Z’
For Azure AD SPN:
.\Standard_LogicApp_Utility.ps1 -ClientId 'ClientId' -TenantId 'TenantId' -Secret 'Client Secret' -SubscriptionId 'SubscriptionId' -ResourceGroupName 'ResourceGroupName' -LogicAppName 'LogicAppName' -Operation 'OperationName' -WorkFlowName 'WorkFlowName' -StartTime '2020-11-02T16:33:00.000Z' -EndTime '2020-11-02T16:38:00.000Z’
- Log file gets generated in the script folder with the Run ids and their Start time, you may use these to cross verify the operation in the portal
Parameters definition:
Note:
-
Not recommended to run directly on the Production environment
-
It is tested with limited test cases and volume of runs, validate this in test environment prior to execute in Production.