HealthState - property in ROOT\CIMV2\storage\iscsitarget namespace

HealthState in other namespaces

List of classes with HealthState local property in ROOT\CIMV2\storage\iscsitarget namespace

propertyClassOrigin
HealthStateCIM_ManagedSystemElementCIM_ManagedSystemElement

List of classes with HealthState derived property in ROOT\CIMV2\storage\iscsitarget namespace

propertyClassOrigin
HealthStateCIM_AuthenticationServiceCIM_ManagedSystemElement
HealthStateCIM_ComputerSystemCIM_ManagedSystemElement
HealthStateCIM_ConcreteJobCIM_ManagedSystemElement
HealthStateCIM_ControllerConfigurationServiceCIM_ManagedSystemElement
HealthStateCIM_EnabledLogicalElementCIM_ManagedSystemElement
HealthStateCIM_EthernetPortCIM_ManagedSystemElement
HealthStateCIM_IdentityManagementServiceCIM_ManagedSystemElement
HealthStateCIM_IPProtocolEndpointCIM_ManagedSystemElement
HealthStateCIM_iSCSIConfigurationServiceCIM_ManagedSystemElement
HealthStateCIM_iSCSIConnectionCIM_ManagedSystemElement
HealthStateCIM_iSCSIProtocolEndpointCIM_ManagedSystemElement
HealthStateCIM_iSCSISessionCIM_ManagedSystemElement
HealthStateCIM_JobCIM_ManagedSystemElement
HealthStateCIM_LogicalDeviceCIM_ManagedSystemElement
HealthStateCIM_LogicalElementCIM_ManagedSystemElement
HealthStateCIM_LogicalPortCIM_ManagedSystemElement
HealthStateCIM_NetworkPipeCIM_ManagedSystemElement
HealthStateCIM_NetworkPortCIM_ManagedSystemElement
HealthStateCIM_ObjectManagerCIM_ManagedSystemElement
HealthStateCIM_ObjectManagerCommunicationMechanismCIM_ManagedSystemElement
HealthStateCIM_ProtocolControllerCIM_ManagedSystemElement
HealthStateCIM_ProtocolEndpointCIM_ManagedSystemElement
HealthStateCIM_ReplicationServiceCIM_ManagedSystemElement
HealthStateCIM_ResourcePoolCIM_ManagedSystemElement
HealthStateCIM_SCSIProtocolControllerCIM_ManagedSystemElement
HealthStateCIM_SCSIProtocolEndpointCIM_ManagedSystemElement
HealthStateCIM_SecurityServiceCIM_ManagedSystemElement
HealthStateCIM_ServiceCIM_ManagedSystemElement
HealthStateCIM_ServiceAccessPointCIM_ManagedSystemElement
HealthStateCIM_SoftwareIdentityCIM_ManagedSystemElement
HealthStateCIM_StorageConfigurationServiceCIM_ManagedSystemElement
HealthStateCIM_StorageExtentCIM_ManagedSystemElement
HealthStateCIM_StorageHardwareIDManagementServiceCIM_ManagedSystemElement
HealthStateCIM_StoragePoolCIM_ManagedSystemElement
HealthStateCIM_StorageVolumeCIM_ManagedSystemElement
HealthStateCIM_SystemCIM_ManagedSystemElement
HealthStateCIM_TCPProtocolEndpointCIM_ManagedSystemElement
HealthStateCIM_WBEMServiceCIM_ManagedSystemElement
HealthStateMSFTSM_ComputerSystemCIM_ManagedSystemElement
HealthStateMSFTSM_ObjectManagerCIM_ManagedSystemElement
HealthStateMSFTSM_SoftwareIdentityCIM_ManagedSystemElement
HealthStateMSFTSM_SystemCIM_ManagedSystemElement
HealthStateMSFTSM_WSManCommunicationMechanismCIM_ManagedSystemElement
HealthStateMSFTSMNET_EthernetPortCIM_ManagedSystemElement
HealthStateMSFTSMNET_IPProtocolEndpointCIM_ManagedSystemElement
HealthStateMSISCSITARGET_ConcreteJobCIM_ManagedSystemElement
HealthStateMSISCSITARGET_ControllerConfigurationServiceCIM_ManagedSystemElement
HealthStateMSISCSITARGET_iSCSIConfigurationServiceCIM_ManagedSystemElement
HealthStateMSISCSITARGET_iSCSIConnectionCIM_ManagedSystemElement
HealthStateMSISCSITARGET_iSCSIProtocolEndpointCIM_ManagedSystemElement
HealthStateMSISCSITARGET_iSCSISessionCIM_ManagedSystemElement
HealthStateMSISCSITARGET_ReplicationServiceCIM_ManagedSystemElement
HealthStateMSISCSITARGET_SCSIProtocolControllerCIM_ManagedSystemElement
HealthStateMSISCSITARGET_StorageConfigurationServiceCIM_ManagedSystemElement
HealthStateMSISCSITARGET_StorageHardwareIDManagementServiceCIM_ManagedSystemElement
HealthStateMSISCSITARGET_StoragePoolCIM_ManagedSystemElement
HealthStateMSISCSITARGET_StorageVolumeCIM_ManagedSystemElement
HealthStateMSISCSITARGET_TCPProtocolEndpointCIM_ManagedSystemElement

Code samples for HealthState property

Get instance of WMI class using GetObject, HealthState property of MSFTSM_WSManCommunicationMechanism

Short VBS code - get a single specified instance of MSFTSM_WSManCommunicationMechanism 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\CIMV2\storage\iscsitarget:" + _
 "MSFTSM_WSManCommunicationMechanism.CreationClassName=""MSFTSM_WSManCommunicationMechanism"",Name=""MSFT:SM.WS-Management"",SystemCreationClassName=""MSFTSM_System"",SystemName=""MS iSCSITarget: ..rootdomain.com""")
Wscript.Echo wmiObject.HealthState 'or other property name, see properties
See more VBS samples of MSFTSM_WSManCommunicationMechanism class

WMI query - sample windows WQL with C#, HealthState property of MSFTSM_WSManCommunicationMechanism

Get a specified instance of MSFTSM_WSManCommunicationMechanism 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\\CIMV2\\storage\\iscsitarget");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM MSFTSM_WSManCommunicationMechanism Where CreationClassName=\"MSFTSM_WSManCommunicationMechanism\"Name=\"MSFT:SM.WS-Management\"SystemCreationClassName=\"MSFTSM_System\"SystemName=\"MS iSCSITarget: W2012SDC.rootdomain.com\"");

//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("HealthState : {0}", m["HealthState"]);
  
}

WMI query - sample windows WQL with VB.Net, HealthState property of MSFTSM_WSManCommunicationMechanism

Get a specified instance of MSFTSM_WSManCommunicationMechanism 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\CIMV2\storage\iscsitarget")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM MSFTSM_WSManCommunicationMechanism Where CreationClassName="MSFTSM_WSManCommunicationMechanism"Name="MSFT:SM.WS-Management"SystemCreationClassName="MSFTSM_System"SystemName="MS iSCSITarget: W2012SDC.rootdomain.com"")

'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("HealthState : {0}", mObject("HealthState"))
Next
comments powered by Disqus
WUtils.com