Set-​Azure​Rm​VM​Boot​Diagnostics

Modifies boot diagnostics properties of a virtual machine.

Syntax

Set-AzureRmVMBootDiagnostics
   [-VM] <PSVirtualMachine>
   [-Disable]
   [<CommonParameters>]
Set-AzureRmVMBootDiagnostics
   [-VM] <PSVirtualMachine>
   [-Enable]
   [-ResourceGroupName] <String>
   [[-StorageAccountName] <String>]
   [<CommonParameters>]

Description

The Set-AzureRmVMBootDiagnostics cmdlet modifies boot diagnostics properties of a virtual machine.

Examples

Example 1: Enable boot diagnostics

PS C:\>$VM = Get-AzureRmVM -ResourceGroupName "ResourceGroup11" -Name "ContosoVM07"
PS C:\> Set-AzureRmVMBootDiagnostics -VM $VM -Enable -ResourceGroupName "ResourceGroup11" -StorageAccountName "DiagnosticStorage"

The first command gets the virtual machine named ContosoVM07 by using Get-AzureRmVM. The command stores it in the $VM variable.

The second command enables boot diagnostics for the virtual machine in $VM. Diagnostics data is stored in the specified account.

Required Parameters

-Disable

Indicates that this cmdlet disables the boot diagnostics for the virtual machine.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Enable

Indicates that this cmdlet enables the boot diagnostics for the virtual machine.

Type:SwitchParameter
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group of the virtual machine.

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

Specifies the virtual machine for which this cmdlet changes boot diagnostics. To obtain a virtual machine object, use the Get-AzureRmVM cmdlet.

Type:PSVirtualMachine
Aliases:VMProfile
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName, ByValue)
Accept wildcard characters:False

Optional Parameters

-StorageAccountName

Specifies the name of the storage account in which to save boot diagnostics data.

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