Select-CurrentEnvironment
Sets the current environment for listing apps, flows, and other Power Platform environment resources.
Syntax
Name
Select-CurrentEnvironment
[-EnvironmentName] <String>
[<CommonParameters>]
Default
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.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Default
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-EnvironmentName
Environment identifier (not display name).
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
Name
Position: | 1 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
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.