For the complete documentation index, see llms.txt. This page is also available as Markdown.

Set-PSUEnvironment

Updates an existing execution environment.

SYNOPSIS

Updates an existing execution environment.

SYNTAX

Id

Set-PSUEnvironment [-Id] <Int64> [-Name <String>] [-Path <String>] [-Arguments <String>]
 [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials]
 [-Integrated] [-TrustCertificate] [-Cookies] [<CommonParameters>]

Environment

Set-PSUEnvironment [-Environment] <ExecutionEnvironment> [-Name <String>] [-Path <String>]
 [-Arguments <String>] [-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>]
 [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

DESCRIPTION

Updates an existing execution environment by Id or by passing an environment object through the pipeline.

EXAMPLES

Example 1

Updates environment 3 to point to a PowerShell 7 executable.

PARAMETERS

-AppToken

Specifies the app token to use when authenticating to the PowerShell Universal management API.

-Arguments

Specifies additional arguments passed to the executable or process.

-ComputerName

Specifies the URL or host name of the target PowerShell Universal instance. Bare host names are normalized to an http://:5000 URL.

-Environment

Specifies the execution environment to use.

-Id

Specifies the numeric Id of the resource.

-Integrated

Uses the in-process integrated management client when the cmdlet runs inside PowerShell Universal.

-Name

Specifies the name of the resource.

-Path

Specifies the path to use for the resource.

-UseDefaultCredentials

Whether to use default credentials when connecting to PowerShell Universal. Requires Windows authentication to be enabled.

-Credential

Credentials to login to the PowerShell Universal Management API.

-TrustCertificate

Whether the cmdlet should ignore certificate issues.

-Cookies

Reuses and persists authentication cookies for the current PowerShell session.

CommonParameters

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

INPUTS

PowerShellUniversal.ExecutionEnvironment

OUTPUTS

System.Object

NOTES

Last updated

Was this helpful?