Add-AzVmssDiagnosticsExtension
Adds a diagnostics extension to the VMSS.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
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
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 |
| Accept wildcard characters: | False |
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 |
The credentials, account, tenant, and subscription used for communication with azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
Specifies the name of an extension.
| Type: | String |
| Aliases: | ExtensionName |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the path of the private configuration file.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the path of the public configuration file.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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.
| Type: | String |
| Aliases: | HandlerVersion, Version |
| Position: | 4 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specify the VMSS object. You can use the New-AzVmssConfig cmdlet to create the object.
| Type: | PSVirtualMachineScaleSet |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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 |