I am trying to query virtual processor class(Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor) from a hyper-v server(windows 2012).
Used this to query from powershell-
gmic -namespace “root\virtualization” Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor | ElementName
.
But getting the below error:
gwmi : Invalid namespace "root\virtualization"
At line:1 char:1
+ gwmi -namespace “root\virtualization” Win32_PerfRawData_HvStats_HyperVHypervisor ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
I have tried root\virtualization\v2
namespace as well, but same error.
After i tried steps from https://blogs.technet.microsoft.com/askperf/2014/08/08/wmi-repository-corruption-or-not/
, figured out that, "virtualization" namespace does not exist in my server. I tried online to find mof file virtualization namespace,but couldn't find any result.
Please help!