Edit

Share via


Add-AzVmssDiagnosticsExtension

Adds a diagnostics extension to the VMSS.

Syntax

Default (Default)

Add-AzVmssDiagnosticsExtension
    [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
    [-SettingFilePath] <String>
    [[-ProtectedSettingFilePath] <String>]
    [[-Name] <String>]
    [[-TypeHandlerVersion] <String>]
    [[-AutoUpgradeMinorVersion] <Boolean>]
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

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

Examples

Example 1: Add a diagnostics extension to the VMSS

Add-AzVmssDiagnosticsExtension -VirtualMachineScaleSet $VMSS -SettingFilePath $publicConfigPath -ProtectedSettingFilePath $privateConfigPath -Name $extName -TypeHandlerVersion $typeVersion -AutoUpgradeMinorVersion $True -Force

This command adds a diagnostics extension to the VMSS.

Parameters

-AutoUpgradeMinorVersion

Indicates whether this cmdlet allows the Azure guest agent to automatically update the extension to a newer minor version.

Parameter properties

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

Parameter sets

(All)
Position:5
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of an extension.

Parameter properties

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

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ProtectedSettingFilePath

Specifies the path of the private configuration file.

Parameter properties

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

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SettingFilePath

Specifies the path of the public configuration file.

Parameter properties

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

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TypeHandlerVersion

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:HandlerVersion, Version

Parameter sets

(All)
Position:4
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-VirtualMachineScaleSet

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

Parameter properties

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

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

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

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

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

PSVirtualMachineScaleSet

String

Boolean

Outputs

PSVirtualMachineScaleSet