Dataverse environment creation: use Powershell!

When you need to create a new Dataverse environment for a project, the classical way I see quite everyone doing is by going to the Power Platform Admin Center (https://admin.powerplatform.microsoft.com) and create a new environment from here:

This is usually fine, but sometimes this method has a limitation that can have an impact on your project.

When you create a new Dataverse environment from the Admin Center, you can specify a Region, and the region selected here is the datacenter region:

But the region listed here is not exactly the Azure region. You can see that by executing a Powershell command like the following:

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -force
Get-AdminPowerAppEnvironmentLocations *europe*

Here I’m using the Power Apps Administration PowerShell module that permits you to fully manage Power Apps environments in your tenants.

Response of the above command is the following:

As you can see, for the europe region there are two available Azure regions: westeurope and northeurope.

How can I create a new Dataverse environment exactly in the westeurope region? This is not possible via the Power Platform Admin Center portal. But with Powershell, you can do the following:

New-AdminPowerAppEnvironment -DisplayName 'SD TEST' -Description 'SD TEST' -ProvisionDatabase -Location 'europe' -RegionName westeurope -EnvironmentSku Sandbox -LanguageName 1033  -CurrencyName EUR -WaitUntilFinished $true

and the new Dataverse environment will be created exactly in the specified Azure Region (with its own name, guid and more):

You can now check the newly created environment directly from the Power Platform Admin Center and start using it:

This is in my opinion the recommeded way to create a Dataverse environment if you want to maximize performance and reduce latency. Selecting the right Azure region can have an impact on your project, expecially if you’re interacting with other Azure services deployed on specific regions. The impact could also be on the possbility to use Azure resources (Data Lake for example requires to have Dataverse in the same Azure region).

Also for integrating Dynamics 365 Business Central with Dataverse this is a recommended best practice to apply.

Please remember this tip…

P.S. Powershell is also useful to quickly delete Dataverse environments. Just execute the following command and the previously created environment will be deleted:

Remove-AdminPowerAppEnvironment -EnvironmentName '797af656-b694-ee91-8689-689f97fc0c4f'

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.