Editar

Partilhar via


Get-AzVMBootDiagnosticsData

Gets boot diagnostics data for a virtual machine.

Syntax

Get-AzVMBootDiagnosticsData
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Windows]
   [-LocalPath] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]
Get-AzVMBootDiagnosticsData
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-Linux]
   [[-LocalPath] <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzVMBootDiagnosticsData cmdlet gets boot diagnostics data for a virtual machine.

Examples

Example 1: Get boot diagnostics data

Get-AzVMBootDiagnosticsData -ResourceGroupName "ResourceGroup11" -Name "ContosoVM07" -Windows -LocalPath "C:\Contoso\BootDiagnostics"

This command gets boot diagnostics data for the virtual machine named ContosoVM07. This virtual machine runs the Windows operating system. The command stores the data in specified local path.

Parameters

-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

-Linux

Indicates that the virtual machine runs the Linux operating system.

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

-LocalPath

Specifies the local path for the boot diagnostics data.

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

-Name

Specifies the name of the virtual machine for which this cmdlet gets diagnostics data.

Type:String
Aliases:ResourceName, VMName
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceGroupName

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

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

-Windows

Indicates that the virtual machine runs the Windows operating system.

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

Inputs

String

Outputs

PSVirtualMachine

PSVirtualMachineInstanceView