Invalid namespace "rootvirtualization" on Hyper-V 2012
Running the following command on a fresh Hyper-V 2012 server:
get-wmiobject -namespace “rootvirtualization” -Query “select * from Msvm_ConcreteJob”
produces this errorerror:
Get-WmiObject : Invalid namespace "rootvirtualization"
At line:1 char:1
+ Get-WmiObject -Namespace "rootvirtualization" -Query "Select * from Msvm_concret ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
I'm lost as to what the issue would be, shouldn't this namespace be part of a standard Hyper-V install? Is there some powershell module I need to install?
Solution 1:
It seems a backslash is missing from the namespace path. Rather than "rootvirtualization"
the path should be "root\virtualization"
UPDATE: For 2012 R2 the namespace is "root\virtualization\v2"