Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Update-AzConnectedExtension

The operation to Upgrade Machine Extensions.

Syntax

UpgradeExpanded (Default)

Update-AzConnectedExtension
 -MachineName <String>
 -ResourceGroupName <String>
 [-SubscriptionId <String>]
 [-ExtensionTarget <Hashtable>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-PassThru]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

UpgradeViaJsonString

Update-AzConnectedExtension
 -MachineName <String>
 -ResourceGroupName <String>
 -JsonString <String>
 [-SubscriptionId <String>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-PassThru]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

UpgradeViaJsonFilePath

Update-AzConnectedExtension
 -MachineName <String>
 -ResourceGroupName <String>
 -JsonFilePath <String>
 [-SubscriptionId <String>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-PassThru]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

UpgradeViaIdentityExpanded

Update-AzConnectedExtension
 -InputObject <IConnectedMachineIdentity>
 [-ExtensionTarget <Hashtable>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-PassThru]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

UpgradeViaIdentity

Update-AzConnectedExtension
 -InputObject <IConnectedMachineIdentity>
 -ExtensionUpgradeParameter <IMachineExtensionUpgrade>
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-PassThru]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

The operation to Upgrade Machine Extensions.

Examples

Example 1: Update an extension in a machine to a specific version

$target = @{"Microsoft.Compute.CustomScriptExtension" = @{"targetVersion"="1.10.12"}}
Update-AzConnectedExtension -ResourceGroupName $env.ResourceGroupName -MachineName $machineName -ExtensionTarget $target
<None>

Update an extension in a machine to a specific version

Parameters

-AsJob

Run the command as a job

Parameter properties

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

Parameter sets

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

-ExtensionTarget

Describes the Extension Target Properties.

Parameter properties

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

Parameter sets

-ExtensionUpgradeParameter

Describes the Machine Extension Upgrade Properties.

Parameter properties

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

Parameter sets

-InputObject

Identity Parameter

Parameter properties

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

Parameter sets

-JsonFilePath

Path of Json file supplied to the Upgrade operation

Parameter properties

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

Parameter sets

-JsonString

Json string supplied to the Upgrade operation

Parameter properties

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

Parameter sets

-MachineName

The name of the hybrid machine.

Parameter properties

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

Parameter sets

-NoWait

Run the command asynchronously

Parameter properties

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

Parameter sets

-PassThru

Returns true when the command succeeds

Parameter properties

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

Parameter sets

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Parameter properties

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

Parameter sets

-SubscriptionId

The ID of the target subscription.

Parameter properties

Type:String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

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.

Inputs

IConnectedMachineIdentity

IMachineExtensionUpgrade

Outputs

Boolean


Feedback

Was this page helpful?