In this blog, you will see how to delete flows that have been created or shared with you which contain “test” keyword in the display name. I have created 2 flows named “Testing” and “Testing 001” which will be deleted using PowerShell.

Refer to my previous blog - How to connect to Microsoft Flow using PowerShell.

Open PowerShell window and run the following script. Enter the credentials in the login pop up window.

  1. # Add PowerApps Account
  2. Add-PowerAppsAccount
  3. # Get all the flow which contains "Test" in the display name
  4. $flowColl=Get-Flow *test*
  5. # Loop through the flow collection
  6. foreach($flow in $flowColl)
  7. {
  8. # Get the flow ID
  9. $flowName=$flow.FlowName
  10. # Remove the flow
  11. Remove-Flow -FlowName $flowName -Confirm:$false
  12. }

Output

Flows deleted successfully.

Thus in this blog, you saw how to delete flows using PowerShell.