Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 'Get-WmiObject : Invalid class "Msvm_ImageManagementService"'

Recently I've been getting this error, and I have no idea what triggered it. The documentation I found regarding this class is minimal and I'm not sure what I need to check or where to look in order to understand it and fix it.

System:

  • Windows Server 2012 R2 Datacenter Preview Build 9431
  • PowerShell Version 4.0 32bit and 64bit

Output:

PS > Get-WmiObject -Class "Msvm_ImageManagementService" -Namespace "root\virtualization"

Get-WmiObject : Invalid class "Msvm_ImageManagementService"
At line:1 char:1
+ Get-WmiObject -Class "Msvm_ImageManagementService" -Namespace "root\virtualizati ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidType: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
like image 860
slybloty Avatar asked Sep 25 '13 20:09

slybloty


1 Answers

The class is still there, it now resides in a different namespace. It's in the namespace "root\virtualization\v2". It's also worth noting that the class has changed, previously used methods may not exist anymore.

like image 146
Dan Barber Avatar answered Nov 15 '22 05:11

Dan Barber