有专门的PowerShell类库(module)管理Hyper-V。在Windows 8或者Windows server 2012上都有的,如果找不到去windows 选项中启用试试。
1
2
3
4
5
6
7
PS> Get-Command -Module Hyper-V | ft -AutoSize
CommandType Name ModuleName
----------- ---- ----------
Cmdlet Add-VMDvdDrive Hyper-V
Cmdlet Add-VMFibreChannelHba Hyper-V
Cmdlet Add-VMHardDiskDrive Hyper-V
Cmdlet Add-VMMigrationNetwork Hyper-V