Recover environment
You can recover a recently deleted environment (within seven days of deletion) by using the Microsoft Power Platform admin center or the Recover-AdminPowerAppEnvironment Power Apps cmdlet. Production environments with Dynamics 365 applications will be available for up to 28 days.
Note
Available storage capacity might be required in order to successfully recover an environment depending on the type of environment being recovered. For information on viewing your current storage capacity, see Microsoft Dataverse storage capacity.
Review the following topics that discuss how environments could become marked for deletion and how to restore environments.
Power Platform admin center
An administrator can recover a recently deleted environment by using the Power Platform admin center.
Sign in to the Power Platform admin center as an admin (Dynamics 365 admin or Power Platform admin).
In the navigation pane, select Environments, and then select Recover deleted environments.
Select an environment to recover, and then select Recover.
Select Continue to confirm the recovery.
It could take several hours for the environment to be recovered. During this period, the environment to be recovered will continue to show in the list of deleted environments. Once recovered, you'll see the environment in the Environments page.
PowerShell
An administrator can recover a recently deleted environment by using the following PowerShell cmdlet.
## List soft-deleted environments
Get-AdminPowerAppSoftDeletedEnvironment
## Attempt a recover operation on a soft-deleted environment
Recover-AdminPowerAppEnvironment -EnvironmentName $environmentName -WaitUntilFinished $true
To learn more on using PowerShell cmdlets for environments, see Power Apps cmdlets for administrators.
Next steps after recovering an environment
- Flows – Solution flows will be disabled so enable flows as needed.
See also
Back up and restore environments
Automatic environment cleanup
Manage sandbox environments
Environments overview
Microsoft.PowerApps.Administration.PowerShell
Licensing overview for Microsoft Power Platform