TotalPowerOnHours - property in ROOT\virtualization\v2 namespace

TotalPowerOnHours in other namespaces

List of classes with TotalPowerOnHours local property in ROOT\virtualization\v2 namespace

propertyClassOrigin
TotalPowerOnHoursCIM_LogicalDeviceCIM_LogicalDevice

List of classes with TotalPowerOnHours derived property in ROOT\virtualization\v2 namespace

propertyClassOrigin
TotalPowerOnHoursCIM_CDROMDriveCIM_LogicalDevice
TotalPowerOnHoursCIM_ControllerCIM_LogicalDevice
TotalPowerOnHoursCIM_DesktopMonitorCIM_LogicalDevice
TotalPowerOnHoursCIM_DiskDriveCIM_LogicalDevice
TotalPowerOnHoursCIM_DisketteDriveCIM_LogicalDevice
TotalPowerOnHoursCIM_DisplayCIM_LogicalDevice
TotalPowerOnHoursCIM_DisplayControllerCIM_LogicalDevice
TotalPowerOnHoursCIM_DVDDriveCIM_LogicalDevice
TotalPowerOnHoursCIM_EthernetPortCIM_LogicalDevice
TotalPowerOnHoursCIM_FCPortCIM_LogicalDevice
TotalPowerOnHoursCIM_IDEControllerCIM_LogicalDevice
TotalPowerOnHoursCIM_LogicalDiskCIM_LogicalDevice
TotalPowerOnHoursCIM_LogicalPortCIM_LogicalDevice
TotalPowerOnHoursCIM_MediaAccessDeviceCIM_LogicalDevice
TotalPowerOnHoursCIM_MemoryCIM_LogicalDevice
TotalPowerOnHoursCIM_NetworkPortCIM_LogicalDevice
TotalPowerOnHoursCIM_PointingDeviceCIM_LogicalDevice
TotalPowerOnHoursCIM_ProcessorCIM_LogicalDevice
TotalPowerOnHoursCIM_ProtocolControllerCIM_LogicalDevice
TotalPowerOnHoursCIM_SCSIProtocolControllerCIM_LogicalDevice
TotalPowerOnHoursCIM_SerialControllerCIM_LogicalDevice
TotalPowerOnHoursCIM_StorageExtentCIM_LogicalDevice
TotalPowerOnHoursCIM_TapeDriveCIM_LogicalDevice
TotalPowerOnHoursCIM_USBDeviceCIM_LogicalDevice
TotalPowerOnHoursCIM_UserDeviceCIM_LogicalDevice
TotalPowerOnHoursCIM_VideoHeadCIM_LogicalDevice
TotalPowerOnHoursCIM_WiFiPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_DiskDriveCIM_LogicalDevice
TotalPowerOnHoursMsvm_DisketteControllerCIM_LogicalDevice
TotalPowerOnHoursMsvm_DisketteDriveCIM_LogicalDevice
TotalPowerOnHoursMsvm_DVDDriveCIM_LogicalDevice
TotalPowerOnHoursMsvm_EmulatedEthernetPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_EthernetSwitchPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_ExternalEthernetPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_ExternalFcPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_FcSwitchPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_GuestServiceInterfaceComponentCIM_LogicalDevice
TotalPowerOnHoursMsvm_HeartbeatComponentCIM_LogicalDevice
TotalPowerOnHoursMsvm_IDEControllerCIM_LogicalDevice
TotalPowerOnHoursMsvm_InternalEthernetPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_KeyboardCIM_LogicalDevice
TotalPowerOnHoursMsvm_KvpExchangeComponentCIM_LogicalDevice
TotalPowerOnHoursMsvm_LogicalDiskCIM_LogicalDevice
TotalPowerOnHoursMsvm_MemoryCIM_LogicalDevice
TotalPowerOnHoursMsvm_Physical3dGraphicsProcessorCIM_LogicalDevice
TotalPowerOnHoursMsvm_ProcessorCIM_LogicalDevice
TotalPowerOnHoursMsvm_Ps2MouseCIM_LogicalDevice
TotalPowerOnHoursMsvm_RdvComponentCIM_LogicalDevice
TotalPowerOnHoursMsvm_S3DisplayControllerCIM_LogicalDevice
TotalPowerOnHoursMsvm_SCSIProtocolControllerCIM_LogicalDevice
TotalPowerOnHoursMsvm_SerialControllerCIM_LogicalDevice
TotalPowerOnHoursMsvm_SerialPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_ShutdownComponentCIM_LogicalDevice
TotalPowerOnHoursMsvm_Synthetic3DDisplayControllerCIM_LogicalDevice
TotalPowerOnHoursMsvm_SyntheticDisplayControllerCIM_LogicalDevice
TotalPowerOnHoursMsvm_SyntheticEthernetPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_SyntheticFcPortCIM_LogicalDevice
TotalPowerOnHoursMsvm_SyntheticMouseCIM_LogicalDevice
TotalPowerOnHoursMsvm_TimeSyncComponentCIM_LogicalDevice
TotalPowerOnHoursMsvm_VideoHeadCIM_LogicalDevice
TotalPowerOnHoursMsvm_VssComponentCIM_LogicalDevice
TotalPowerOnHoursMsvm_WiFiPortCIM_LogicalDevice

Code samples for TotalPowerOnHours property

Get instance of WMI class using GetObject, TotalPowerOnHours property of Msvm_Processor

Short VBS code - get a single specified instance of Msvm_Processor class or get a default unnamed instance (singleton) of the class, using one single command GetObject with exact path of the wmi object.

'https://wutils.com/wmi/
Dim wmiObject
Set wmiObject = GetObject( _
 "WINMGMTS:\\.\ROOT\virtualization\v2:" + _
 "Msvm_Processor.CreationClassName=""Msvm_Processor"",DeviceID=""Microsoft:B637F347-6A0E-4DEC-AF52-BD70CB80A21D\\0\\0"",SystemCreationClassName=""Msvm_ComputerSystem"",SystemName="".""")
Wscript.Echo wmiObject.TotalPowerOnHours 'or other property name, see properties
See more VBS samples of Msvm_Processor class

WMI query - sample windows WQL with C#, TotalPowerOnHours property of Msvm_Processor

Get a specified instance of Msvm_Processor by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this c# sample code.
See in another language: VBScript, VB.Net.
//https://wutils.com/wmi/

//Project -> Add reference -> System.Management
//using System.Management;

//create a management scope object
ManagementScope scope = new ManagementScope("\\\\.\\ROOT\\virtualization\\v2");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM Msvm_Processor Where CreationClassName=\"Msvm_Processor\"DeviceID=\"Microsoft:B637F347-6A0E-4DEC-AF52-BD70CB80A21D\\\\0\\\\0\"SystemCreationClassName=\"Msvm_ComputerSystem\"SystemName=\"W2012SDC\"");

//create object searcher
ManagementObjectSearcher searcher =
                        new ManagementObjectSearcher(scope, query);

//get a collection of WMI objects
ManagementObjectCollection queryCollection = searcher.Get();

//enumerate the collection.
foreach (ManagementObject m in queryCollection) 
{
  // access properties of the WMI object
  Console.WriteLine("TotalPowerOnHours : {0}", m["TotalPowerOnHours"]);
  
}

WMI query - sample windows WQL with VB.Net, TotalPowerOnHours property of Msvm_Processor

Get a specified instance of Msvm_Processor by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this VB.Net sample code.
See in another language: VBScript, C#
'Project -> Add reference -> System.Management
'Imports System.Management

'Get the namespace management scope
Dim Scope As New ManagementScope("\\.\ROOT\virtualization\v2")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM Msvm_Processor Where CreationClassName="Msvm_Processor"DeviceID="Microsoft:B637F347-6A0E-4DEC-AF52-BD70CB80A21D\\0\\0"SystemCreationClassName="Msvm_ComputerSystem"SystemName="W2012SDC"")

'Create object searcher
Dim Searcher As New ManagementObjectSearcher(Scope, Query)

'Get a collection of WMI objects
Dim queryCollection As ManagementObjectCollection = Searcher.Get

'Enumerate wmi object 
For Each mObject As ManagementObject In queryCollection
  'write out some property value
  Console.WriteLine("TotalPowerOnHours : {0}", mObject("TotalPowerOnHours"))
Next
comments powered by Disqus
WUtils.com