just getting red lines using the library

Jan 4, 2011 at 2:55 PM

My command: "Save-VM blah" (blah is my vm...) doesn't work.

Result is (red lines): 

 

Get-WmiObject : Invalid classAt C:\Program Files\modules\Hyperv\VM.ps1:70 char:26

+ Get-WmiObject <<<<  -computername $Server -NameSpace $HyperVNamespace -Query $WQL | Add-Member -MemberType ALIASPROPERTY -Name "VMElementName" -Value "ElementName" -PassThru    
+ CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

 

What is wrong here ?

 

greetings, Matthias

Jan 25, 2011 at 12:33 PM

Since the error message is very unspecific and you have provided no more information  about the VM itself you probably will have to look at the function code and see what kind of WMI Query is getting executed.

Ususally this kind of command should work.

Peter

 

 

Feb 11, 2011 at 9:54 PM

I am getting these same errors on every single command I run.

My server is a Server 2008 R2 Hyper-V (the console only free one) with SP1 release candidate.

I can get help for commands but have spent two hours and cannot get any command to work.

 

PS C:\Program Files\modules\HyperV> Set-VMMemory "Win7-64-Lab5" 768MB
Get-WmiObject : Invalid class
At C:\Program Files\modules\HyperV\VM.ps1:70 char:26
+             Get-WmiObject <<<<  -computername $Server -NameSpace $HyperVNamespace -Query $WQ
 | Add-Member -MemberType ALIASPROPERTY -Name "VMElementName" -Value "ElementName" -PassThru
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiOb
   jectCommand

Coordinator
Feb 14, 2011 at 5:55 PM

Jim can you just try one command for me.

Get-WmiObject -List -Namespace "root\virtualization"

This should return a long list of WMI Classes. That message is at a line which looks for the class MSVM_ComputerSystem. 

 

I've had a handful of reports of systems where the whole of the Virtualization WMI area becomes in accessible (even from traditional tools like WbemTest). There's not a lot I can suggest in those case.

 

 

Feb 14, 2011 at 6:56 PM

I have the list.

 

C:\Program Files\modules\HyperV>powershell
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\Program Files\modules\HyperV> Get-WmiObject -List -Namespace "root\virtualization"


   NameSpace: ROOT\virtualization

Name                                Methods              Properties
----                                -------              ----------
__NotifyStatus                      {}                   {StatusCode}
__ExtendedStatus                    {}                   {Description, Operation, ParameterInfo, ProviderName...}
__SecurityRelatedClass              {}                   {}
__Trustee                           {}                   {Domain, Name, SID, SidLength...}
__NTLMUser9X                        {}                   {Authority, Flags, Mask, Name...}
__ACE                               {}                   {AccessMask, AceFlags, AceType, GuidInheritedObjectType...}
__SecurityDescriptor                {}                   {ControlFlags, DACL, Group, Owner...}
__PARAMETERS                        {}                   {}
__SystemClass                       {}                   {}
__ProviderRegistration              {}                   {provider}
__EventProviderRegistration         {}                   {EventQueryList, provider}
__ObjectProviderRegistration        {}                   {InteractionType, provider, QuerySupportLevels, SupportsBat...
__ClassProviderRegistration         {}                   {CacheRefreshInterval, InteractionType, PerUserSchema, prov...
__InstanceProviderRegistration      {}                   {InteractionType, provider, QuerySupportLevels, SupportsBat...
__MethodProviderRegistration        {}                   {provider}
__PropertyProviderRegistration      {}                   {provider, SupportsGet, SupportsPut}
__EventConsumerProviderRegistration {}                   {ConsumerClassNames, provider}
__thisNAMESPACE                     {}                   {SECURITY_DESCRIPTOR}
__NAMESPACE                         {}                   {Name}
__IndicationRelated                 {}                   {}
__FilterToConsumerBinding           {}                   {Consumer, CreatorSID, DeliverSynchronously, DeliveryQoS...}
__EventConsumer                     {}                   {CreatorSID, MachineName, MaximumQueueSize}
__AggregateEvent                    {}                   {NumberOfEvents, Representative}
__TimerNextFiring                   {}                   {NextEvent64BitTime, TimerId}
__EventFilter                       {}                   {CreatorSID, EventAccess, EventNamespace, Name...}
__Event                             {}                   {SECURITY_DESCRIPTOR, TIME_CREATED}
__NamespaceOperationEvent           {}                   {SECURITY_DESCRIPTOR, TargetNamespace, TIME_CREATED}
__NamespaceModificationEvent        {}                   {PreviousNamespace, SECURITY_DESCRIPTOR, TargetNamespace, T...
__NamespaceDeletionEvent            {}                   {SECURITY_DESCRIPTOR, TargetNamespace, TIME_CREATED}
__NamespaceCreationEvent            {}                   {SECURITY_DESCRIPTOR, TargetNamespace, TIME_CREATED}
__ClassOperationEvent               {}                   {SECURITY_DESCRIPTOR, TargetClass, TIME_CREATED}
__ClassDeletionEvent                {}                   {SECURITY_DESCRIPTOR, TargetClass, TIME_CREATED}
__ClassModificationEvent            {}                   {PreviousClass, SECURITY_DESCRIPTOR, TargetClass, TIME_CREA...
__ClassCreationEvent                {}                   {SECURITY_DESCRIPTOR, TargetClass, TIME_CREATED}
__InstanceOperationEvent            {}                   {SECURITY_DESCRIPTOR, TargetInstance, TIME_CREATED}
__InstanceCreationEvent             {}                   {SECURITY_DESCRIPTOR, TargetInstance, TIME_CREATED}
__MethodInvocationEvent             {}                   {Method, Parameters, PreCall, SECURITY_DESCRIPTOR...}
__InstanceModificationEvent         {}                   {PreviousInstance, SECURITY_DESCRIPTOR, TargetInstance, TIM...
__InstanceDeletionEvent             {}                   {SECURITY_DESCRIPTOR, TargetInstance, TIME_CREATED}
__TimerEvent                        {}                   {NumFirings, SECURITY_DESCRIPTOR, TIME_CREATED, TimerId}
__ExtrinsicEvent                    {}                   {SECURITY_DESCRIPTOR, TIME_CREATED}
__SystemEvent                       {}                   {SECURITY_DESCRIPTOR, TIME_CREATED}
__EventDroppedEvent                 {}                   {Event, IntendedConsumer, SECURITY_DESCRIPTOR, TIME_CREATED}
__EventQueueOverflowEvent           {}                   {CurrentQueueSize, Event, IntendedConsumer, SECURITY_DESCRI...
__QOSFailureEvent                   {}                   {ErrorCode, ErrorDescription, Event, IntendedConsumer...}
__ConsumerFailureEvent              {}                   {ErrorCode, ErrorDescription, ErrorObject, Event...}
__EventGenerator                    {}                   {}
__TimerInstruction                  {}                   {SkipIfPassed, TimerId}
__AbsoluteTimerInstruction          {}                   {EventDateTime, SkipIfPassed, TimerId}
__IntervalTimerInstruction          {}                   {IntervalBetweenEvents, SkipIfPassed, TimerId}
__Provider                          {}                   {Name}
__Win32Provider                     {}                   {ClientLoadableCLSID, CLSID, Concurrency, DefaultMachineNam...
__SystemSecurity                    {GetSD, GetSecuri... {}
CIM_ElementSettingData              {}                   {IsCurrent, IsDefault, IsMaximum, IsMinimum...}
Msvm_NetworkElementSettingData      {}                   {IsCurrent, IsDefault, IsMaximum, IsMinimum...}
Msvm_ElementSettingData             {}                   {IsCurrent, IsDefault, IsMaximum, IsMinimum...}
Msvm_LastAppliedSettingData         {}                   {IsCurrent, IsDefault, IsMaximum, IsMinimum...}
Msvm_PreviousSettingData            {}                   {IsCurrent, IsDefault, IsMaximum, IsMinimum...}
Msvm_SystemExportSettingData        {}                   {IsCurrent, IsDefault, IsMaximum, IsMinimum...}
CIM_ServiceAffectsElement           {}                   {AffectedElement, AffectingElement, ElementEffects, OtherEl...
Msvm_ServiceAffectsElement          {}                   {AffectedElement, AffectingElement, ElementEffects, OtherEl...
CIM_ElementCapabilities             {}                   {Capabilities, ManagedElement}
CIM_ElementAllocationCapabilities   {}                   {Capabilities, ManagedElement}
Msvm_ElementCapabilities            {}                   {Capabilities, ManagedElement}
CIM_Error                           {}                   {CIMStatusCode, CIMStatusCodeDescription, ErrorSource, Erro...
Msvm_Error                          {}                   {CIMStatusCode, CIMStatusCodeDescription, ErrorSource, Erro...
CIM_Component                       {}                   {GroupComponent, PartComponent}
CIM_ServiceComponent                {}                   {GroupComponent, PartComponent}
CIM_SwitchServiceTransparentBrid... {}                   {GroupComponent, PartComponent}
CIM_SystemComponent                 {}                   {GroupComponent, PartComponent}
CIM_SystemBIOS                      {}                   {GroupComponent, PartComponent}
Msvm_SystemBIOS                     {}                   {GroupComponent, PartComponent}
CIM_SystemDevice                    {}                   {GroupComponent, PartComponent}
Msvm_SystemDevice                   {}                   {GroupComponent, PartComponent}
CIM_VirtualSystemSettingDataComp... {}                   {GroupComponent, PartComponent}
Msvm_VirtualSystemSettingDataCom... {}                   {GroupComponent, PartComponent}
CIM_ConcreteComponent               {}                   {GroupComponent, PartComponent}
Msvm_ConcreteComponent              {}                   {GroupComponent, PartComponent}
CIM_SettingsDefineCapabilities      {}                   {GroupComponent, PartComponent, PropertyPolicy, ValueRange...}
Msvm_SettingsDefineCapabilities     {}                   {GroupComponent, PartComponent, PropertyPolicy, ValueRange...}
Msvm_SummaryInformation             {}                   {AllocatedGPU, AsynchronousTasks, AvailableMemoryBuffer, Cr...
Msvm_VirtualizationComponentRegi... {}                   {Component, ResourceType}
Msvm_VirtualSystemResourceRegist... {}                   {Component, IsRootDevice, ResourceType}
Msvm_ResourcePoolRegistration       {}                   {Component, ResourceType}
CIM_SettingsDefineState             {}                   {ManagedElement, SettingData}
Msvm_SettingsDefineState            {}                   {ManagedElement, SettingData}
Msvm_VirtualizationComponent        {}                   {CLSID, Context, Enabled, Name}
Msvm_ResourcePoolComponent          {}                   {AllocationCapabilitiesClassName, CLSID, Context, Enabled...}
Msvm_VirtualSystemResourceComponent {}                   {AdditionalClassNames, CLSID, Context, Enabled...}
CIM_ManagedElement                  {}                   {Caption, Description, ElementName}
Msvm_PhysicalGPUInfo                {}                   {AvailableVideoMemory, Caption, Description, ElementName...}
CIM_SettingData                     {}                   {Caption, Description, ElementName, InstanceID}
CIM_VLANEndpointSettingData         {}                   {AccessVLAN, Caption, DefaultVLAN, Description...}
Msvm_VLANEndpointSettingData        {}                   {AccessVLAN, Caption, DefaultVLAN, Description...}
Msvm_VirtualSystemExportSettingData {}                   {Caption, CopySnapshotConfiguration, CopyVmRuntimeInformati...
Msvm_VirtualSystemImportSettingData {}                   {Caption, CreateCopy, CurrentResourcePaths, Description...}
Msvm_VirtualSystemManagementServ... {}                   {BiosLockString, Caption, DefaultExternalDataRoot, DefaultV...
CIM_VirtualSystemSettingData        {}                   {AutoActivate, Caption, CreationTime, Description...}
Msvm_VirtualSystemSettingData       {}                   {AutoActivate, BaseBoardSerialNumber, BIOSGUID, BIOSNumLock...
Msvm_VirtualSystemGlobalSettingData {}                   {AdditionalRecoveryInformation, AllowFullSCSICommandSet, Au...
CIM_ResourceAllocationSettingData   {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_SyntheticEthernetPortSettin... {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_MemorySettingData              {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_VssComponentSettingData        {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_ShutdownComponentSettingData   {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_ProcessorSettingData           {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_ResourceAllocationSettingData  {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_Synthetic3DDisplayControlle... {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_EmulatedEthernetPortSetting... {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_TimeSyncComponentSettingData   {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_HeartbeatComponentSettingData  {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
Msvm_KvpExchangeComponentSetting... {}                   {Address, AllocationUnits, AutomaticAllocation, AutomaticDe...
CIM_ResourcePoolSettingData         {}                   {Capacity, Caption, Description, ElementName...}
CIM_ManagedSystemElement            {}                   {Caption, Description, ElementName, HealthState...}
CIM_LogicalElement                  {}                   {Caption, Description, ElementName, HealthState...}
CIM_ResourcePool                    {}                   {AllocationUnits, Capacity, Caption, Description...}
Msvm_Synth3dVideoPool               {CalculateVideoMe... {AllocationUnits, Capacity, Caption, Description...}
Msvm_ProcessorPool                  {CalculatePossibl... {AllocationUnits, Capacity, Caption, Description...}
Msvm_ResourcePool                   {}                   {AllocationUnits, Capacity, Caption, Description...}
CIM_Job                             {KillJob}            {Caption, DeleteOnCompletion, Description, ElapsedTime...}
CIM_ConcreteJob                     {KillJob, Request... {Caption, DeleteOnCompletion, Description, ElapsedTime...}
Msvm_NetworkJob                     {KillJob, Request... {Caption, CreatedInternalEthernetPort, DeleteOnCompletion, ...
Msvm_ConcreteJob                    {KillJob, Request... {Cancellable, Caption, DeleteOnCompletion, Description...}
Msvm_StorageJob                     {KillJob, Request... {Caption, Child, DeleteOnCompletion, Description...}
CIM_EnabledLogicalElement           {RequestStateChange} {Caption, Description, ElementName, EnabledDefault...}
CIM_System                          {RequestStateChange} {Caption, CreationClassName, Description, ElementName...}
CIM_ComputerSystem                  {RequestStateChan... {Caption, CreationClassName, Dedicated, Description...}
Msvm_VirtualSwitch                  {RequestStateChan... {Caption, CreationClassName, Dedicated, Description...}
Msvm_ComputerSystem                 {RequestStateChan... {AssignedNumaNodeList, Caption, CreationClassName, Dedicate...
CIM_LogicalDevice                   {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_TimeSyncComponent              {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_HeartbeatComponent             {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_UserDevice                      {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_Display                         {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_DesktopMonitor                  {RequestStateChan... {AdditionalAvailability, Availability, Bandwidth, Caption...}
Msvm_Keyboard                       {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_PointingDevice                  {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_Ps2Mouse                       {RequestStateChan... {AbsoluteCoordinates, AdditionalAvailability, Availability,...
Msvm_SyntheticMouse                 {RequestStateChan... {AbsoluteCoordinates, AdditionalAvailability, Availability,...
CIM_ProtocolController              {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_SCSIProtocolController          {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_SCSIProtocolController         {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_KvpExchangeComponent           {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_VssComponent                   {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_ShutdownComponent              {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_MediaAccessDevice               {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
CIM_DiskDrive                       {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
Msvm_DiskDrive                      {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
CIM_DisketteDrive                   {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
Msvm_DisketteDrive                  {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
CIM_TapeDrive                       {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
CIM_CDROMDrive                      {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
CIM_DVDDrive                        {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
Msvm_DVDDrive                       {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
CIM_VideoHead                       {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_VideoHead                      {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_Controller                      {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_IDEController                   {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
Msvm_IDEController                  {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_DisplayController               {RequestStateChan... {AcceleratorCapabilities, AdditionalAvailability, Availabil...
Msvm_S3DisplayController            {RequestStateChan... {AcceleratorCapabilities, AdditionalAvailability, Availabil...
Msvm_Synthetic3DDisplayController   {RequestStateChan... {AcceleratorCapabilities, AdditionalAvailability, Allocated...
Msvm_SyntheticDisplayController     {RequestStateChan... {AcceleratorCapabilities, AdditionalAvailability, Availabil...
CIM_SerialController                {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
Msvm_SerialController               {RequestStateChan... {AdditionalAvailability, Availability, Capabilities, Capabi...
Msvm_DisketteController             {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_LogicalPort                     {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_NetworkPort                     {RequestStateChan... {ActiveMaximumTransmissionUnit, AdditionalAvailability, Aut...
CIM_EthernetPort                    {RequestStateChan... {ActiveMaximumTransmissionUnit, AdditionalAvailability, Aut...
Msvm_InternalEthernetPort           {RequestStateChan... {ActiveMaximumTransmissionUnit, AdditionalAvailability, Aut...
Msvm_SyntheticEthernetPort          {RequestStateChan... {ActiveMaximumTransmissionUnit, AdditionalAvailability, Aut...
Msvm_ExternalEthernetPort           {RequestStateChan... {ActiveMaximumTransmissionUnit, AdditionalAvailability, Aut...
Msvm_EmulatedEthernetPort           {RequestStateChan... {ActiveMaximumTransmissionUnit, AdditionalAvailability, Aut...
Msvm_SerialPort                     {RequestStateChan... {AdditionalAvailability, Availability, Caption, CreationCla...
CIM_StorageExtent                   {RequestStateChan... {Access, AdditionalAvailability, Availability, BlockSize...}
CIM_Memory                          {RequestStateChan... {Access, AdditionalAvailability, AdditionalErrorData, Avail...
Msvm_Memory                         {RequestStateChan... {Access, AdditionalAvailability, AdditionalErrorData, Avail...
CIM_LogicalDisk                     {RequestStateChan... {Access, AdditionalAvailability, Availability, BlockSize...}
Msvm_LogicalDisk                    {RequestStateChan... {Access, AdditionalAvailability, Availability, BlockSize...}
CIM_Processor                       {RequestStateChan... {AdditionalAvailability, AddressWidth, Availability, Captio...
Msvm_Processor                      {RequestStateChan... {AdditionalAvailability, AddressWidth, Availability, Captio...
Msvm_TerminalConnection             {RequestStateChange} {Caption, ConnectionID, Description, ElementName...}
CIM_Service                         {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
CIM_NetworkService                  {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
CIM_ForwardingService               {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
CIM_SwitchService                   {RequestStateChan... {BridgeAddress, BridgeAddressType, BridgeType, Caption...}
CIM_TransparentBridgingService      {RequestStateChan... {AgingTime, Caption, CreationClassName, Description...}
Msvm_TransparentBridgingService     {RequestStateChan... {AgingTime, Caption, CreationClassName, Description...}
Msvm_VirtualSwitchManagementService {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
Msvm_ImageManagementService         {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
Msvm_TerminalService                {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
CIM_ResourcePoolConfigurationSer... {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
CIM_VirtualSystemManagementService  {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
Msvm_VirtualSystemManagementService {RequestStateChan... {Caption, CreationClassName, Description, ElementName...}
CIM_ServiceAccessPoint              {RequestStateChange} {Caption, CreationClassName, Description, ElementName...}
CIM_ProtocolEndpoint                {RequestStateChan... {BroadcastResetSupported, Caption, CreationClassName, Descr...
CIM_LANEndpoint                     {RequestStateChan... {AliasAddresses, BroadcastResetSupported, Caption, Creation...
Msvm_VmLANEndpoint                  {RequestStateChan... {AliasAddresses, BroadcastResetSupported, Caption, Connecte...
Msvm_SwitchLANEndpoint              {RequestStateChan... {AliasAddresses, BroadcastResetSupported, Caption, Connecte...
CIM_SwitchPort                      {RequestStateChan... {BroadcastResetSupported, Caption, CreationClassName, Descr...
Msvm_SwitchPort                     {RequestStateChan... {AllowedIPv4Addresses, AllowedIPv6Addresses, AllowMacSpoofi...
CIM_VLANEndpoint                    {RequestStateChan... {BroadcastResetSupported, Caption, CreationClassName, Descr...
Msvm_VLANEndpoint                   {RequestStateChan... {BroadcastResetSupported, Caption, CreationClassName, Descr...
CIM_DynamicForwardingEntry          {}                   {Caption, CreationClassName, Description, DynamicStatus...}
Msvm_DynamicForwardingEntry         {}                   {Caption, CreationClassName, Description, DynamicStatus...}
Msvm_MountedStorageImage            {Unmount}            {Access, Caption, Description, ElementName...}
CIM_SoftwareElement                 {}                   {BuildNumber, Caption, CodeSet, Description...}
CIM_BIOSElement                     {}                   {BuildNumber, Caption, CodeSet, CurrentLanguage...}
Msvm_BIOSElement                    {}                   {BaseBoardSerialNumber, BIOSGUID, BIOSNumLock, BIOSSerialNu...
Msvm_KvpExchangeDataItem            {}                   {Caption, Data, Description, ElementName...}
CIM_Capabilities                    {CreateGoalSettings} {Caption, Description, ElementName, InstanceID}
CIM_ResourcePoolConfigurationCap... {CreateGoalSettings} {Caption, Description, ElementName, InstanceID...}
CIM_AllocationCapabilities          {CreateGoalSettings} {Caption, Description, ElementName, InstanceID...}
Msvm_AllocationCapabilities         {CreateGoalSettings} {Caption, Description, ElementName, InstanceID...}
CIM_Dependency                      {}                   {Antecedent, Dependent}
CIM_SAPSAPDependency                {}                   {Antecedent, Dependent}
CIM_ActiveConnection                {}                   {Antecedent, Dependent, IsUnidirectional, OtherTrafficDescr...
Msvm_ActiveConnection               {}                   {Antecedent, Dependent, IsUnidirectional, OtherTrafficDescr...
CIM_BindsTo                         {}                   {Antecedent, Dependent}
Msvm_BindsTo                        {}                   {Antecedent, Dependent}
CIM_SwitchPortDynamicForwarding     {}                   {Antecedent, Dependent}
Msvm_SwitchPortDynamicForwarding    {}                   {Antecedent, Dependent}
CIM_DeviceAllocatedFromPool         {}                   {Antecedent, Dependent}
Msvm_ParentChildSettingData         {}                   {Antecedent, Dependent}
CIM_ProtocolControllerForDevice     {}                   {AccessPriority, AccessState, Antecedent, Dependent...}
CIM_ProtocolControllerForUnit       {}                   {AccessPriority, AccessState, Antecedent, Dependent...}
Msvm_ProtocolControllerForUnit      {}                   {AccessPriority, AccessState, Antecedent, Dependent...}
CIM_DeviceSAPImplementation         {}                   {Antecedent, Dependent}
Msvm_GlobalEthernetPortSAPImplem... {}                   {Antecedent, Dependent}
Msvm_DeviceSAPImplementation        {}                   {Antecedent, Dependent}
CIM_RecordedSetting                 {}                   {Antecedent, CurrentSetting, Dependent, RecordedSetting}
CIM_ElementAllocatedFromPool        {}                   {Antecedent, Dependent}
Msvm_ElementAllocatedFromPool       {}                   {Antecedent, Dependent}
CIM_HostedDependency                {}                   {Antecedent, Dependent}
CIM_PortOnDevice                    {}                   {Antecedent, Dependent}
Msvm_SerialPortOnSerialController   {}                   {Antecedent, Dependent}
Msvm_SystemTerminalConnection       {}                   {Antecedent, Dependent}
CIM_HostedService                   {}                   {Antecedent, Dependent}
Msvm_HostedService                  {}                   {Antecedent, Dependent}
Msvm_HostedSwitchService            {}                   {Antecedent, Dependent}
CIM_VideoHeadOnController           {}                   {Antecedent, Dependent}
Msvm_VideoHeadOnController          {}                   {Antecedent, Dependent}
Msvm_HostedDependency               {}                   {Antecedent, Dependent}
CIM_HostedAccessPoint               {}                   {Antecedent, Dependent}
Msvm_HostedAccessPoint              {}                   {Antecedent, Dependent}
CIM_ServiceSAPDependency            {}                   {Antecedent, Dependent}
CIM_ForwardsAmong                   {}                   {Antecedent, Dependent}
CIM_SwitchesAmong                   {}                   {Antecedent, Dependent}
CIM_DeviceConnection                {}                   {Antecedent, Dependent, NegotiatedDataWidth, NegotiatedSpeed}
CIM_ControlledBy                    {}                   {AccessMode, AccessPriority, AccessState, Antecedent...}
Msvm_ControlledBy                   {}                   {AccessMode, AccessPriority, AccessState, Antecedent...}
CIM_ResourceAllocationFromPool      {}                   {Antecedent, Dependent}
Msvm_ResourceAllocationFromPool     {}                   {Antecedent, Dependent}
CIM_PoolAllocatedFromPool           {}                   {Antecedent, Dependent}
CIM_MediaPresent                    {}                   {Antecedent, Dependent, FixedMedia}
Msvm_MediaPresent                   {}                   {Antecedent, Dependent, FixedMedia}
CIM_TransparentBridgingDynamicFo... {}                   {Antecedent, Dependent}
Msvm_TransparentBridgingDynamicF... {}                   {Antecedent, Dependent}
Msvm_ResourceTypeDefinition         {}                   {LogicalDeviceClassName, OtherResourceType, ResourceSubType...
Msvm_VirtualHardDiskInfo            {}                   {FileSize, InSavedState, InUse, MaxInternalSize...}
Msvm_ServicingSettings              {}                   {Version}
CIM_AffectedJobElement              {}                   {AffectedElement, AffectingElement, ElementEffects, OtherEl...
Msvm_AffectedStorageJobElement      {}                   {AffectedElement, AffectingElement, ElementEffects, OtherEl...
Msvm_AffectedJobElement             {}                   {AffectedElement, AffectingElement, ElementEffects, OtherEl...


PS C:\Program Files\modules\HyperV>
PS C:\Program Files\modules\HyperV>

 

 

Mar 25, 2011 at 8:59 PM

 cant seem to run this Get-WmiObject -List -Namespace "root\virtualization"

I can run Get-WmiObject -list and see that it lists the ones for "root\cimv2". Is there something else that I need to do?

 

 

Mar 25, 2011 at 9:05 PM

Never mind, I guess I was running on a server that did not have the hyper v role enabled and probably did not have components of that namespace

Apr 14, 2011 at 6:13 PM

I am having the same problem but I have the Hyper-V role installed and enabled on the box I am trying to do this on and it's not working.  The command Get-VmNic -VM * -Server FOO fails every time with

Get-WmiObject : Invalid class
At C:\Program Files\modules\HyperV\VM.ps1:70 char:26
+             Get-WmiObject <<<<  -computername $Server -NameSpace $HyperVNamespace -Query $WQL | Add-Member -MemberType ALIAS
PROPERTY -Name "VMElementName" -Value "ElementName" -PassThru
    + CategoryInfo          : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

Anyone ever get to the bottom of this?  IT seems that there is another thread in theforum with the same problem but that one did not end conclusively either.  Could really use some help here.  It seems like this should be easy.

Apr 14, 2011 at 6:38 PM

I got a new version of the powershell and it was working with that one.

Apr 14, 2011 at 7:07 PM

A new version of the Powershell management cmdlets?  Or a newer version of Powershell?

Apr 14, 2011 at 7:30 PM

The commandlets from codeplex - this was after the release of SP1 - maybe 2 months ago?  The ones I have are dated Feb 28, 2011

Apr 15, 2011 at 12:11 AM

Thank you Jim!  This solved my problem!  It is working with the new cmdlets!  :-)

Apr 21, 2011 at 9:19 AM

I have the same issue with the new SP1 cmdlets

A simple New-VM -Name "test1" -Server "Server1" generates an "Invalid Class" error on line 445 of VM1.ps1

However, if I execute gwmi -ComputerName Server1 -Namespace root\virtualization -Class "MSVM_VirtualSystemManagementService" it gets the class correctly. 

Jan 22, 2014 at 5:46 PM
On Windows 8, 8.1, and all 2012 servers, you have to change "root\virtualization" to "root\virtualization\v2".

I changed them all in the hyperV.ps1 file, and the Hyper-V Manager started working properly.