Enabling/Disabling Power Platform Environment features

Sometimes we need to mass enable or disable PowerPlatform environment features, and we really don’t want to manually cliking arround in each environment | features…

Microsoft Power Platform CLI Commands to the rescue, if you don’t know what it is head over here:

https://learn.microsoft.com/en-us/power-platform/developer/cli/introduction?tabs=windows

The below easy script turn off Copilot for App makers.

#Connect to your tenant

pac auth create

#####

#list all environment

$environments = pac env list –json | ConvertFrom-Json

foreach ($env in $environments)

{

    #selecting the environment

    pac env select –environment $env.EnvironmentUrl

    #update environment feature

    pac env update-settings –name powerappsmakerbotenabled –value $false

}


Now there is hundres of settings in an environment and the names are not that easy to find, and I normally extract the settings using CLI. But I recently learned about the “Organizations” table from Valentin Mazhar, this make it a litle bit easier.

https://powertricks.io/settings-enforcer/

Anyway in this table we can find the settings and what it’s “logical name” is and this is what we’ll work with in CLI.


That’s it, happy governing your PowerPlatform environments.


Leave a comment