Update-AzDevCenterUserEnvironment
Partially updates an environment.
Syntax
Update-AzDevCenterUserEnvironment
-Endpoint <String>
-Name <String>
-ProjectName <String>
[-UserId <String>]
[-ExpirationDate <DateTime>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzDevCenterUserEnvironment
-Endpoint <String>
-InputObject <IDevCenterdataIdentity>
[-ExpirationDate <DateTime>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzDevCenterUserEnvironment
-DevCenterName <String>
-Name <String>
-ProjectName <String>
[-UserId <String>]
[-ExpirationDate <DateTime>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzDevCenterUserEnvironment
-DevCenterName <String>
-InputObject <IDevCenterdataIdentity>
[-ExpirationDate <DateTime>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Partially updates an environment.
Examples
Example 1: Update an environment by endpoint
$currentDate = Get-Date
$dateIn8Months = $currentDate.AddMonths(8)
Update-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -Name "envtest" -ProjectName DevProject -ExpirationDate $dateIn8Months
This command updates an environment named "envtest" to the project "DevProject".
Example 2: Update an environment by dev center
$currentDate = Get-Date
$dateIn8Months = $currentDate.AddMonths(8)
Update-AzDevCenterUserEnvironment -DevCenterName Contoso -Name "envtest" -ProjectName DevProject -ExpirationDate $dateIn8Months
This command updates an environment named "envtest" to the project "DevProject".
Example 3: Update an environment by endpoint and InputObject
$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" }
$currentDate = Get-Date
$dateIn8Months = $currentDate.AddMonths(8)
Update-AzDevCenterUserEnvironment -Endpoint "https://8a40af38-3b4c-4672-a6a4-5e964b1870ed-contosodevcenter.centralus.devcenter.azure.com/" -InputObject $envInput -ExpirationDate $dateIn8Months
This command updates an environment named "envtest" to the project "DevProject".
Example 4: Update an environment by dev center and InputObject
$currentDate = Get-Date
$dateIn8Months = $currentDate.AddMonths(8)
$envInput = @{"UserId" = "me"; "ProjectName" = "DevProject"; "EnvironmentName" = "envtest" }
Update-AzDevCenterUserEnvironment -DevCenterName Contoso -InputObject $envInput -ExpirationDate $dateIn8Months
This command updates an environment named "envtest" to the project "DevProject".
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DevCenterName
The DevCenter upon which to execute operations.
Type: | String |
Aliases: | DevCenter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Endpoint
The DevCenter-specific URI to operate on.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ExpirationDate
The time the expiration date will be triggered (UTC), after which the environment and associated resources will be deleted.
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IDevCenterdataIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
The name of the environment.
Type: | String |
Aliases: | EnvironmentName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ProjectName
The DevCenter Project upon which to execute operations.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserId
The AAD object id of the user. If value is 'me', the identity is taken from the authentication context.
Type: | String |
Position: | Named |
Default value: | "me" |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Azure PowerShell