Debug-VM

Debug-VM

Debugs a virtual machine.

语法

Parameter Set: Name
Debug-VM [-Name] <String[]> [-AsJob] [-ComputerName <String[]> ] [-Force] [-InjectNonMaskableInterrupt] [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: VMObject
Debug-VM [-VM] <VirtualMachine[]> [-AsJob] [-Force] [-InjectNonMaskableInterrupt] [-Passthru] [-Confirm] [-WhatIf] [ <CommonParameters>]

详细说明

The Debug-VM cmdlet debugs a virtual machine.

参数

-AsJob

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-ComputerName<String[]>

Specifies an array of Hyper-V hosts. The cmdlet debugs the virtual machines on the hosts you specify.

别名

是否为必需?

false

位置?

named

默认值

.

是否接受管道输入?

false

是否接受通配符?

false

-Force

在不请求用户确认的情况下,强制该命令运行。

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-InjectNonMaskableInterrupt

Indicates that the cmdlet sends a nonmaskable interrupt (NMI) to the virtual machine. An interrupt handler must process a nonmaskable interrupt.

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-Name<String[]>

Specifies an array of names of virtual machines to be debugged.

别名

VMName

是否为必需?

true

位置?

1

默认值

是否接受管道输入?

True (ByValue)

是否接受通配符?

true

-Passthru

返回一个表示你正在处理的项的对象。默认情况下,此 cmdlet 将不产生任何输出。

别名

是否为必需?

false

位置?

named

默认值

是否接受管道输入?

false

是否接受通配符?

false

-VM<VirtualMachine[]>

Specifies an array of virtual machine objects that are to be debugged. To obtain virtual machine objects, use the Get-VM cmdlet.

别名

是否为必需?

true

位置?

1

默认值

是否接受管道输入?

True (ByValue)

是否接受通配符?

false

-Confirm

运行 cmdlet 之前提示你进行确认。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

-WhatIf

显示如果运行 cmdlet 则会发生什么情况。cmdlet 未运行。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

<CommonParameters>

此 cmdlet 支持通用参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

输入

输入类型是指可通过管道传送给 cmdlet 的对象的类型。

输出

输出类型是 cmdlet 所发出对象的类型。

示例

Example 1

This example injects a non-maskable interrupt into the virtual machine named “VM to Debug”. A kernel debugger should be connected to the guest operating system before attempting to do this.

PS C:\> debug-vm "VM to Debug" -InjectNonMaskableInterrupt -Force