CIM_Service class (CIMWin32 WMI Providers)
The CIM_Service class represents a logical element that contains information to represent and manage the functionality provided by a device or software feature. A service is a general-purpose object to configure and manage the implementation of functionality; it is not the functionality itself.
Important
The DMTF (Distributed Management Task Force) CIM (Common Information Model) classes are the parent classes upon which WMI classes are built. WMI currently supports only the CIM 2.x version schemas.
The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties. Properties are listed in alphabetic order, not MOF order.
Syntax
[Abstract, UUID("{8502C527-5FBB-11D2-AAC1-006008C78BC7}"), DisplayName("Services (CIM)"), AMENDMENT]
class CIM_Service : CIM_LogicalElement
{
string Caption;
string Description;
datetime InstallDate;
string Status;
string CreationClassName;
string Name;
boolean Started;
string StartMode;
string SystemCreationClassName;
string SystemName;
};
Members
The CIM_Service class has these types of members:
Methods
The CIM_Service class has these methods.
Method | Description |
---|---|
StartService | Attempts to put the service into its start-up state. Not implemented by WMI. |
StopService | Class method that puts the service in the stopped state. Not implemented by WMI. |
Properties
The CIM_Service class has these properties.
-
Caption
-
-
Data type: string
-
Access type: Read-only
-
Qualifiers: MaxLen (64), DisplayName ("Caption")
A short textual description of the object.
This property is inherited from CIM_ManagedSystemElement.
-
-
CreationClassName
-
-
Data type: string
-
Access type: Read-only
-
Qualifiers: CIM_Key, DisplayName ("Class Name")
Name of the class or subclass used in the creation of an instance. When used with other key properties of the class, this property allows all instances of the class and its subclasses to be uniquely identified.
-
-
Description
-
-
Data type: string
-
Access type: Read-only
-
Qualifiers: DisplayName ("Description")
A textual description of the object.
This property is inherited from CIM_ManagedSystemElement.
-
-
InstallDate
-
-
Data type: datetime
-
Access type: Read-only
-
Qualifiers: MappingStrings ("MIF.DMTF|ComponentID|001.5"), DisplayName ("Install Date")
Indicates when the object was installed. Lack of a value does not indicate that the object is not installed.
This property is inherited from CIM_ManagedSystemElement.
-
-
Name
-
The Name property uniquely identifies the service and provides an indication of the functionality that is managed. This functionality is described in more detail in the object's Description property.
-
Started
-
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: DisplayName ("Started")
If TRUE, the service has started.
-
-
StartMode
-
-
Data type: string
-
Access type: Read-only
-
Qualifiers: DisplayName ("Start Mode")
Indicates whether the service is automatically started (for example, by an operating system) or only started upon request.
-
-
Automatic ("Automatic")
-
Manual ("Manual")
Status
-
Data type: string
-
Access type: Read-only
-
Qualifiers: MaxLen (10), DisplayName ("Status")
String that indicates the current status of the object. Operational and non-operational status can be defined. Operational status can include "OK", "Degraded", and "Pred Fail". "Pred Fail" indicates that an element is functioning properly, but is predicting a failure (for example, a SMART-enabled hard disk drive).
Non-operational status can include "Error", "Starting", "Stopping", and "Service". "Service" can apply during disk mirror-resilvering, reloading a user permissions list, or other administrative work. Not all such work is online, but the managed element is neither "OK" nor in one of the other states.
This property is inherited from CIM_ManagedSystemElement.
Values include the following:
OK ("OK")
Error ("Error")
Degraded ("Degraded")
Unknown ("Unknown")
Pred Fail ("Pred Fail")
Starting ("Starting")
Stopping ("Stopping")
Service ("Service")
Stressed ("Stressed")
NonRecover ("NonRecover")
No Contact ("No Contact")
Lost Comm ("Lost Comm")
SystemCreationClassName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Propagated ("CIM_System.CreationClassName"), CIM_Key, DisplayName ("System Class Name")
Scoping system's creation class name.
SystemName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Propagated ("CIM_System.Name"), CIM_Key, DisplayName ("System Name")
Name of the system that hosts the service.
Remarks
The CIM_Service class is derived from CIM_LogicalDevice.
WMI does not implement this class. For WMI classes that are derived from CIM_Service, see Win32 Classes.
This documentation is derived from the CIM class descriptions published by the DMTF. Microsoft may have made changes to correct minor errors, conform to Microsoft SDK documentation standards, or provide more information.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Namespace |
Root\CIMV2 |
MOF |
|
DLL |
|
See also
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor