Set-​Azure​VM​Extension

Sets resource extensions for virtual machines.

Syntax

Set-AzureVMExtension
   [-ExtensionName] <String>
   [[-PrivateConfigKey] <String>]
   [-ForceUpdate]
   [-Publisher] <String>
   [-Version] <String>
   [[-ReferenceName] <String>]
   [[-PublicConfiguration] <String>]
   [[-PrivateConfiguration] <String>]
   [-Disable]
   [-Uninstall]
   [[-PublicConfigKey] <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Profile <AzureSMProfile>]
   -VM <IPersistentVM>
   [<CommonParameters>]
Set-AzureVMExtension
   [-ExtensionName] <String>
   [[-PrivateConfigKey] <String>]
   [-ForceUpdate]
   [-Publisher] <String>
   [-Version] <String>
   [[-ReferenceName] <String>]
   [[-PublicConfigPath] <String>]
   [[-PrivateConfigPath] <String>]
   [-Disable]
   [-Uninstall]
   [[-PublicConfigKey] <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Profile <AzureSMProfile>]
   -VM <IPersistentVM>
   [<CommonParameters>]
Set-AzureVMExtension
   [[-PrivateConfigKey] <String>]
   [-ForceUpdate]
   [-ReferenceName] <String>
   [[-PublicConfigPath] <String>]
   [[-PrivateConfigPath] <String>]
   [-Disable]
   [-Uninstall]
   [[-PublicConfigKey] <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Profile <AzureSMProfile>]
   -VM <IPersistentVM>
   [<CommonParameters>]
Set-AzureVMExtension
   [[-PrivateConfigKey] <String>]
   [-ForceUpdate]
   [-ReferenceName] <String>
   [[-PublicConfiguration] <String>]
   [[-PrivateConfiguration] <String>]
   [-Disable]
   [-Uninstall]
   [[-PublicConfigKey] <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Profile <AzureSMProfile>]
   -VM <IPersistentVM>
   [<CommonParameters>]

Description

The Set-AzureVMExtension cmdlet sets resource extensions for virtual machines.

Examples

Example 1: Create a virtual machine with resource extensions applied

PS C:\> $X = New-AzureVMConfig -Name $VM -InstanceSize Small -ImageName $IMG;$X = Add-AzureProvisioningConfig -VM $X -Password $PWD -AdminUsername $USR -Windows;$X = Set-AzureVMExtension -VM $X -ExtensionName $Ext1 -Publisher $Publisher -Version $VER -PublicConfiguration $P1 -PrivateConfiguration $P2;$X = Set-AzureVMExtension -VM $X -ExtensionName $Ext2 -Publisher $Publisher -Version $VER -PublicConfiguration $P3 -PrivateConfiguration $P4;New-AzureVM -Location $LOC -ServiceName $SVC -VM $X;

This command creates a virtual machine with resource extensions applied.

Required Parameters

-ExtensionName

Specifies the extension name of the virtual machine.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Publisher

Specifies the publisher of the extension.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VM

Specifies the persistent virtual machine object.

Type:IPersistentVM
Aliases:InputObject
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False
-Version

Specifies the extension version.

Type:String
Position:3
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Disable

Indicates that this cmdlet disables the extension state.

Type:SwitchParameter
Position:7
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ForceUpdate

Indicates that this cmdlet re-applies a configuration to an extension when the configuration has not been updated.

Type:SwitchParameter
Position:11
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PrivateConfigKey

Specifies a private configuration key.

Type:String
Position:10
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PrivateConfigPath

Specifies the private configuration path.

Type:String
Position:6
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PrivateConfiguration

Specifies the private configuration text.

Type:String
Position:6
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PublicConfigKey

Specifies the public configuration key.

Type:String
Position:9
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PublicConfigPath

Specifies the public configuration path.

Type:String
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PublicConfiguration

Specifies the public configuration text.

Type:String
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ReferenceName

Specifies the reference name of the extension.

This is a user-defined string that can be used to refer to an extension. You need to specify it when the extension is added to the virtual machine for the first time. For subsequent updates, you need to specify the previously used reference name while updating the extension. The ReferenceName assigned to an extension is returned using the Get-AzureVM cmdlet.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Uninstall

Indicates that this cmdlet uninstalls the resource extension from the virtual machine.

Type:SwitchParameter
Position:8
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False