1

Is there a way to recover deleted Power Automation Flows?

I know that there is a PowerShell to recover PowerApps. I tried changing the syntax of the Get-Verb to flow instead of PowerApp, but no luck

Get-AdminRecoverDeletedPowerApp -AppName [Guid] -EnvironmentName [Guid]
Get-AdminRecoverDeletedFlow -AppName [Guid] -EnvironmentName [Guid]
zx485
  • 2,337

1 Answers1

1

I found the answer per the below source referenced post but it was this command:

Restore-AdminFlow -EnvironmentName Default-GUID -FlowName GUID

Steps to Restore the Flow(s)

  • Sign in to Power Platform Environment using the below code
  • Login screen pops-up
  • Provide user name and password to connect to the Power Platform environment where Flow/App needs to be restored

Add-PowerAppsAccount

  • Run the below code to get the list of deleted Flows within the last 28 days
-IncludeDeleted $true Get-AdminFlow -EnvironmentName Default-31fd69b3-0535-4506-8d24-6674fc42002b -IncludeDeleted $true 
  • You can get the Environment name from the Power Automate Flow URL

  • It lists out all the deleted Flow(s)

  • Select the FlowName which you want to restore

  • Run the below code to restore the deleted Flow

//Restore-AdminFlow -EnvironmentName 'Environment Name' -FlowName 
'Flow Name which you want to restore' Restore-AdminFlow
-EnvironmentName Default-31fd69b3-0535-4506-8d24-6674fc42002b -FlowName  43e8eda9-bd55-47e0-8bc8-9ecdf864f55c
  • Navigate to the Power Automate Portal Page & Check the Flow
  • Flow might have been restored and it will be in disabled mode
  • Turn on the Flow to run

Restore Deleted Power Apps

  • Signin to Power Platform Environment : Add-PowerAppsAccount
  • Run the code to list out all the deleted Power apps
  • Get the Power App Name from the listing which you want to restore
  • Run the code to restore the Power app
  • Check the Power App Portal
  • App might have been restored with the name appended with "_RestoredYYYYMMDDHHMM'

Points to remember

  • The above steps will work only to restore non-solution flows/apps. If you deleted a flow/app that was part of a solution, you need to create a support ticket with Microsoft for assistance.
  • Flows that have been deleted more than 28 days ago can’t be recovered, neither with PowerShell script nor Microsoft support

Source