Partager via


New-AdminPowerAppEnvironment

Creates a Power Platform environment.

Syntax

New-AdminPowerAppEnvironment
   [-ProvisionDatabase]
   [-CurrencyName <String>]
   [-LanguageName <String>]
   [-Templates <String[]>]
   [-TemplateMetadata <Object>]
   [-SecurityGroupId <String>]
   [-DomainName <String>]
   [-Description <String>]
   [-WaitUntilFinished <Boolean>]
   [-TimeoutInMinutes <Int32>]
   [-ApiVersion <String>]
   [<CommonParameters>]
New-AdminPowerAppEnvironment
   [-DisplayName <String>]
   -LocationName <String>
   [-RegionName <String>]
   -EnvironmentSku <String>
   [-ProvisionDatabase]
   [-CurrencyName <String>]
   [-LanguageName <String>]
   [-Templates <String[]>]
   [-TemplateMetadata <Object>]
   [-SecurityGroupId <String>]
   [-DomainName <String>]
   [-Description <String>]
   [-WaitUntilFinished <Boolean>]
   [-TimeoutInMinutes <Int32>]
   [-ApiVersion <String>]
   [<CommonParameters>]

Description

The New-AdminPowerAppEnvironment cmdlet creates a new environment by the logged in user. Api version 2019-05-01 adds the capability to create an environment with a Microsoft Dataverse database. The commandline argument 'ProvisionDatabase' acts as a switch for the platform to create an environment with a database. If the switch is set, LanguageName and CurrencyName arguments are mandatory to pass while Templates,SecurityGroupId, and DomainName are optional. Use Get-Help New-AdminPowerAppEnvironment -Examples for more detail.

Examples

EXAMPLE 1

New-AdminPowerAppEnvironment -DisplayName 'HQ Apps' -Location unitedstates -EnvironmentSku Trial

Creates a new trial environment in the United States with the display name 'HQ Apps.'

EXAMPLE 2

New-AdminPowerAppEnvironment -DisplayName 'Asia Dev' -Location asia -EnvironmentSku Production

Creates a new production environment in Asia with the display name 'Asia Dev.'

Parameters

-ApiVersion

The api version to call with.

Type:String
Position:Named
Default value:2020-08-01
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CurrencyName

The default currency for the database, use Get-AdminPowerAppCdsDatabaseCurrencies to get the supported values.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Description

The environment description, such as the intended purpose.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisplayName

The display name of the new environment.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DomainName

The domain name.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-EnvironmentSku

The environment type (Trial, Sandbox, Production, SubscriptionBasedTrial, Teams, or Developer).

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-LanguageName

The default languages for the database, use Get-AdminPowerAppCdsDatabaseLanguages to get the support values.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-LocationName

The location of the new environment. Use Get-AdminPowerAppEnvironmentLocations to see the valid locations.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ProvisionDatabase

The switch to provision a Dataverse database when creating the environment. If set, LanguageName and CurrencyName are mandatory to pass as arguments.

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RegionName

Optional parameter for the region of the new environment. Use Get-AdminPowerAppEnvironmentLocations to see the valid regions.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-SecurityGroupId

The Microsoft Entra ID security group object identifier to restrict database membership.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TemplateMetadata

A JSON object payload customized for the selected templates.

Type:Object
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Templates

The list of templates used for provisioning. If null, an empty Dataverse database is created.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TimeoutInMinutes

The timeout setting in minutes.

Type:Int32
Position:Named
Default value:10080
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WaitUntilFinished

If set to true, the cmdlet doesn't return until provisioning the database is complete (as either a success or failure).

Type:Boolean
Position:Named
Default value:True
Required:False
Accept pipeline input:False
Accept wildcard characters:False