Add-​Azure​Rm​Vmss​Extension

Adds an extension to the VMSS.

Syntax

Add-AzureRmVmssExtension
   [-VirtualMachineScaleSet] <VirtualMachineScaleSet>
   [[-Name] <String>]
   [[-Publisher] <String>]
   [[-Type] <String>]
   [[-TypeHandlerVersion] <String>]
   [[-AutoUpgradeMinorVersion] <Boolean>]
   [[-Setting] <Object>]
   [[-ProtectedSetting] <Object>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Add-AzureRmVmssExtension cmdlet adds an extension to the Virtual Machine Scale Set (VMSS).

Examples

Example 1: Add an extension to the VMSS

PS C:\> Add-AzureRmVmssExtension -VirtualMachineScaleSet $VMSS -Name $ExtName -Publisher $Publisher -Type $ExtType -TypeHandlerVersion $ExtVer -AutoUpgradeMinorVersion $True

This command adds an extension to the VMMS.

Required Parameters

-VirtualMachineScaleSet

Specify the VMSS object. You can use the New-AzureRmVmssConfig to create the object.

Type:VirtualMachineScaleSet
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-AutoUpgradeMinorVersion

Indicates whether the extension version should be automatically updated to a newer minor version.

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

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of the extension that this cmdlet adds.

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

Specifies private configuration for the extension, as a string. This cmdlet encrypts the private configuration.

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

Specifies the name of the extension publisher. The publisher provides a name when the publisher registers an extension. This can use the Get-AzureRmVMImagePublisher cmdlet to get the publisher.

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

Specifies the public configuration, as a string, for the extension. This cmdlet does not encrypt public configuration.

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

Specifies the extension type. You can use the Get-AzureRmVMExtensionImageType cmdlet to get the extension type.

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

Specifies the version of the extension to use for this virtual machine. You can use the Get-AzureRmVMExtensionImage cmdlet to get the version of the extension.

Type:String
Position:4
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False

Outputs

This cmdlet does not generate any output.