Control environment creation on the Power Platform and PowerShell commands that will make our life easier.

Hello team,

This week it’s all about helping to create a robust framework so my organisation can release the Power Platform to a broader audience.

But doing it in a way that empowers all its members while making sure that there is some control around it.

In the next series of posts, we will be implementing some of the best practices of the PowerApps Center of Excellence Starter Kit.

But before we jump right into it, we need to review a couple of things.

  1. Stop people creating environments
  2. Check who can still create environments, admins I am looking at you.

Disclaimer: You can find all this information on the MS documentation, and it might change in the future.

Limit who can create environments

Currently, the ability to create environments is determined by your license.

Based on the table above, potentially anyone with a Dynamics or PowerApps P2 license can create an environment, which could be a problem and can lead to the proliferation of environments without any control.

To stop that we need to make sure that only Admins ( D365 Service Admins, O365 Global Admins and Delegated Admins) can create environments.

If you already have a collection of environments that you know nothing about, this doesn’t stop people from using them but will limit the creation of new ones.

PowerShell commands for Administrators

And what about those cheeky environments that people created without you knowing?

Well, the Global Admin can delete them, if needed, from the PowerApps Admin Center (https://admin.powerapps.com)

If you want to give the users some warning before deleting the environments, you can export a CSV of them using the following PowerShell command:

Get-AdminPowerAppEnvironment | Export-Csv -Path C:\YOUR PATH

Also, to finish with another PowerShell, we mentioned that by restricting the environment creation to only Admins, we are stopping the proliferation of multiple environments consuming storage.

But what happens when there are too many service administrators?

The following PowerShell command will give us a list of those users:

Get-MsolRoleMember -RoleObjectId ROLEID | Sort-Object -Property DisplayName

More information on PowerShell: https://docs.microsoft.com/en-us/power-platform/admin/powerapps-powershell

Today, we took control of the environment creation and also had a look at the list of users that we have. In the next post, we will start installing the Centre of Excellence starter kit.

Thanks,

Mario

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s