Select-CurrentEnvironment

Sets the current environment for listing apps, flows, and other Power Platform environment resources.

Syntax

Select-CurrentEnvironment
      [-EnvironmentName] <String>
      [<CommonParameters>]
Select-CurrentEnvironment
      [-Default]
      [<CommonParameters>]

Description

The Select-CurrentEnvironment cmdlet sets the current environment in which commands will execute when an environment isn't specified. Use Get-Help Select-CurrentEnvironment -Examples for more detail.

Examples

EXAMPLE 1

Select-CurrentEnvironment -EnvironmentName 3c2f7648-ad60-4871-91cb-b77d7ef3c239

Select environment 3c2f7648-ad60-4871-91cb-b77d7ef3c239 as the current environment. Cmdlets invoked after running this command will operate against this environment.

EXAMPLE 2

Select-CurrentEnvironment ~default

Select the default environment. Cmdlets invoked after running this will operate against the default environment.

Parameters

-Default

Shortcut to specify the default tenant environment.

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

-EnvironmentName

Environment identifier (not display name).

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