Recover a Deleted Power App using PowerShell

 
Power Apps don't have a recycle bin to recover deleted apps. Fortunately deleted apps can be recovered using PowerShell.
 

 

In order to run the recovery Power Shell scripts one of the following security roles are required:

 
 
Step 1. Install the PowerShell Cmdlets for PowerApps
 
Run each command individually and respond to the prompt with 'Yes to All'

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -scope CurrentUser
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Scope CurrentUser –Force
Install-Module -Name Microsoft.PowerApps.PowerShell -Scope CurrentUser -AllowClobber –Force
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned –Force​
 
Step 2. Login to the Power Apps Environment
 
Add-PowerAppsAccount​

 
Step 3. Get list of Power Apps available for restore
 
Get the environment name from the URL in the Power Apps environment dashboard
 
Get-AdminDeletedPowerAppsList -EnvironmentName Default-b693953a-95e6-42ab-83a0-58745720bf90
 
The command will display GUIDs of all the apps available for recovery.
 
Step 4. Recover the deleted app
 
Get-AdminRecoverDeletedPowerApp -EnvironmentName Default-b693953a-95e6-42ab-83a0-95705720bf90 -AppName  0b3ac42a-e5f4-4945-aba2-798e0d1ee9ff​

 
If you receive a 200 response it means your app has been restored. It can take a few minutes to display in the app browser.
 
Further reading on Power Apps Cmdlets: