Full WMI support for Hyper-V appeared only starting from Server 2012. I donβt have 2008 R2 now, so I canβt check it, but as far as I remember, with the upgrade to version 3, Powershell was able to monitor Hyper-V, however, there were problems with rights (for which you need to run under the admin).
If in any way, you can go another way: put the PowerShell Management Library for Hyper-V . Put simply, working with her is also easy. Here is a list of the most useful features:
ΠΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΠ΅ ΠΊ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΌΠ°ΡΠΈΠ½Π΅ New-VMConnectSession ΠΠ°Π½ΠΈΠΏΡΠ»ΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ ΡΠΎΡΡΠΎΡΠ½ΠΈΠ΅ΠΌ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΡ
ΠΌΠ°ΡΠΈΠ½ Get-VMState, Set-VMState, Convert-VmState, Ping-VM, Test-VMHeartBeat, Shutdown-VM, Start-VM, Stop-VM, Suspend-VM Get-VMKVP, Add-KVP, Remove-KVP, Get-VMJPEG ΠΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ Π΄Π΅Π»Π°ΡΡ Π±ΡΠΊΠ°ΠΏΡ, ΡΠΊΡΠΏΠΎΡΡ Π²ΠΈΡΡΡΠ°Π»ΡΠ½ΡΡ
ΠΌΠ°ΡΠΈΠ½ ΠΈ ΡΠ½ΡΡΠΈΠ΅ ΡΠ½ΡΠΏΡΠΎΡΠΎΠ² Export-VM, Import-VM, Get-VMSnapshot, Choose-VMSnapshot, Apply-VMSnapshot, New-VMSnapshot ,Remove-VMSnapshot, Rename-VMSnapShot, Update-VMSnapshot, Get-VMSnapshotTree, Get-VmBackupScript ΠΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΡΠ΄Π°Π»Π΅Π½ΠΈΠ΅ Π²ΠΈΡΡ. ΠΌΠ°ΡΠΈΠ½, Π½Π°ΡΡΡΠΎΠΉΠΊΠ° ΠΈΡ
ΡΠ²ΠΎΠΉΡΡΠ² New-VM, Remove-VM, Set-VM, Get-VMCPUCount, Set-VMCPUCount, Get-VMMemory, Set-VMMemory, Set-VMSerialPort Π£ΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ Π΄ΠΈΡΠΊΠΎΠ²ΡΠΌΠΈ ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅ΡΠ°ΠΌΠΈ Get-VMDiskController Add-VMSCSIController, Remove-VMSCSIcontroller Get-VMDriveByController, Add-VMDRIVE, Remove-VMdrive Get-VMDiskByDrive, Add-VMDISK, Set-VMDisk, Get-VMDisk Get-VMFloppyDisk, Add-VMFloppyDisk Add-VMNewHardDisk Π£ΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΡΠ΅ΡΠ΅Π²ΡΠΌΠΈ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠ°ΠΌΠΈ Get-VMNic, List-VMNic, Choose-VMNIC, Add-VMNIC, Remove-VMNIC, Set-VMNICAddress, Set-VMNICConnection, Get-VMNicport, Get-VMnicSwitch, Choose-VMSwitch, New-VMSwitchPort, Get-VMByMACaddress, Choose-VMExternalEthernet, New-VMExternalSwitch, New-VMInternalSwitch,New-VmPrivateSwitch Π Π°Π±ΠΎΡΠ° Ρ VHD ΡΠ°ΠΉΠ»Π°ΠΌΠΈ Get-VHDDefaultPath, Get-VHDInfo, New-VHD, Compact-VHD, Test-VHD,Convert-VHD,Merge-VHD,Mount-VHD, Unmount-VHD