PowerShell远程管理SCVMM

 

#连接到SCVMM
Import-Module virtualmachinemanager
Get-VMMServer (gwmi win32_computersystem).Name |Out-Null

#查询Hyper-V宿主总数
$hvs = Get-SCVmhost

#查询虚拟机总数
$vms = Get-SCVirtualMachine

 

posted on 2021-12-07 10:24  momingliu11  阅读(95)  评论(0编辑  收藏  举报