Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Is that a literal copy/paste of your code? Those aren't normal double quotes in the Get-WmiObject command. If it is copied from a blog post try: Get-WmiObject -Namespace "rootvirtualization" -Query "select * from Msvm_ConcreteJob" instead. –  jscott May 9 '13 at 0:10
    
Nicely spotted jscott, I did get the command from a blog (and pasted it in the question), but I'm typing it in manually on the server. I just tried to copy/paste your version, same result. –  Nexus May 9 '13 at 0:11
    
This Technet magazine post shows the namespace as root\Virtualization which makes more sense to me. Could you try Get-WmiObject -Namespace "root\virtualization" -Query "select * from Msvm_ConcreteJob" Here is a TechNet blog which details how to list the available namespaces. If the above command fails, check the namespaces to see what's available. –  jscott May 9 '13 at 1:01
    
That did it! Thanks jscott -- please add an answer and I'll flag it correct. –  Nexus May 9 '13 at 1:21

1 Answer 1

up vote 0 down vote accepted

It seems a backslash is missing from the namespace path. Rather than "rootvirtualization" the path should be "root\virtualization"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.