Editar

Partilhar via


Set-AzVmssBootDiagnostic

Sets the virtual machine scale set boot diagnostics profile.

Syntax

Set-AzVmssBootDiagnostic
   [-VirtualMachineScaleSet] <PSVirtualMachineScaleSet>
   [[-Enabled] <Boolean>]
   [[-StorageUri] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Sets the virtual machine scale set boot diagnostics profile.

Examples

Example 1: Set the boot diagnostics profile property for a VMSS

$vmss = New-AzVmssConfig -Location $loc -SkuCapacity 2 -SkuName 'Standard_A0'
Set-AzVmssBootDiagnostic -VirtualMachineScaleSet $vmss -Enabled $true -StorageUri $storageUri;
New-AzVmss -ResourceGroupName $rgname -Name "ContosoVMSS" -VirtualMachineScaleSet $vmss;

This command sets boot diagnostics profile property for the VMSS named ContosoVMSS.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Enabled

Whether boot diagnostics should be enabled on the virtual machine scale set.

Type:Nullable<T>[Boolean]
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-StorageUri

URI of the storage account to use for placing the console output and screenshot.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-VirtualMachineScaleSet

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

Type:PSVirtualMachineScaleSet
Position:0
Default value:None
Required:True
Accept pipeline input:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSVirtualMachineScaleSet

Nullable<T>[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]

String

Outputs

PSVirtualMachineScaleSet