Share via


New-AdminPowerAppEnvironment

Creates a Power Platform environment.

Syntax

User (Default)

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

Name

New-AdminPowerAppEnvironment
    -LocationName <String>
    -EnvironmentSku <String>
    [-DisplayName <String>]
    [-RegionName <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.

Parameter properties

Type:String
Default value:2020-08-01
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CurrencyName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Description

The environment description, such as the intended purpose.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

The display name of the new environment.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Name
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DomainName

The domain name.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EnvironmentSku

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Name
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LanguageName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-LocationName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Name
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ProvisionDatabase

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RegionName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Name
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SecurityGroupId

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TemplateMetadata

A JSON object payload customized for the selected templates.

Parameter properties

Type:Object
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Templates

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TimeoutInMinutes

The timeout setting in minutes.

Parameter properties

Type:Int32
Default value:10080
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WaitUntilFinished

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

Parameter properties

Type:Boolean
Default value:True
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.