HOW TO: Make a DIY lacrosse goal transporter
September 23, 2024What do you do if you accidentally enabled a Managed Environment in the Power Platform and you want to make the Environment non-Managed again? There is no way in the Power Platform Admin Center to Disable / Turn Off a Managed Environment, you can only Enable or Delete Managed Environments in the Admin Center. To Disable / Turn Off a Managed Environment, and go back to a non-Managed Environment, you must use PowerShell. Here’s how to do it:
Open a PowerShell prompt as Administrator.
Install PowerShell
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Log in with an account that has permissions to administer Environments. The following command will open an authentication prompt. The prompt supports MFA.
Add-PowerAppsAccount -Endpoint prod
Run this code that sets protectionLevel to Basic, which turns an Environment from Managed to non-Managed.
$UpdatedGovernanceConfiguration = [pscustomobject]@{
protectionLevel = "Basic"
}
Run this command to apply the changes to the Environment you want to convert from Managed to non-Managed. Make sure to replace the Environment Id accordingly.
Set-AdminPowerAppEnvironmentGovernanceConfiguration -EnvironmentName <PUT THE ENVIRONMENT ID HERE> -UpdatedGovernanceConfiguration $UpdatedGovernanceConfiguration
Here’s what it all looks like:
Here’s the Microsoft documentation that describes part of this process.