Add-​Azure​Rm​Vmss​Diagnostics​Extension

Adds a diagnostics extension to the VMSS.

Syntax

Add-AzureRmVmssDiagnosticsExtension
   [-VirtualMachineScaleSet] <VirtualMachineScaleSet>
   [-SettingFilePath] <String>
   [[-ProtectedSettingFilePath] <String>]
   [[-Name] <String>]
   [[-TypeHandlerVersion] <String>]
   [[-AutoUpgradeMinorVersion] <Boolean>]
   [-Force]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Add-AzureRmVmssDiagnosticsExtension cmdlet adds a diagnostics extension to the Virtual Machine Scale Set (VMSS) instance.

Examples

Example 1: Add a diagnostics extension to the VMSS

PS C:\> Add-AzureRmVmssDiagnosticsExtension -VirtualMachineScaleSet $VMSS -SettingFilePath $publicConfigPath -ProtectedSettingFilePath $privateConfigPath -Name $extName -TypeHandlerVersion $typeVersion -AutoUpgradeMinorVersion $True -Force

This command adds a diagnostics extension to the VMSS.

Required Parameters

-SettingFilePath

Specifies the path of the public configuration file.

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

Specify the VMSS object. You can use the New-AzureRmVmssConfig cmdlet 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 this cmdlet allows the Azure guest agent to automatically update the extension 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:False
Accept pipeline input:False
Accept wildcard characters:False
-Force

Forces the command to run without asking for user confirmation.

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

Specifies the name of an extension.

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

Specifies the path of the private configuration file.

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

Specifies the version of the extension to use for this VMSS. To obtain the version, run the Get-AzureRmVMExtensionImage cmdlet with a value of Microsoft.Azure.Diagnostics for the PublisherName parameter and IaaSDiagnostics for the Type parameter.

Type:String
Aliases:HandlerVersion, Version
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:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

This cmdlet does not generate any output.