ServerState
ServerState presents the current state of the server instance. The states, and the corresponding state codes, are listed in the Bitmask Values table.
Note When working with the IIS Admin Base Object, use the MD_SERVER_COMMAND property to send commands to the server.
Attribute Name | Attribute Value |
---|---|
XML Data Type | DWORD |
WMI Data Type |
SINT32
|
ADSI Data Type | DWORD |
ABO Data Type | DWORD |
ABO Metabase identifier |
MD_SERVER_STATE
|
Attributes | VOLATILE |
Default Value | 4 |
MetaFlagsEx | CACHE_PROPERTY_CLEARED |
User Type | IIS_MD_UT_SERVER |
StartingNumber | Not applicable |
EndingNumber | Not applicable |
ID | 1016 |
Configurable Locations
You can configure this property at the following locations in the IIS metabase.
Metabase Path | IIS Admin Object Type |
---|---|
/LM/W3SVC/n | IIsWebServer |
/LM/MSFTPSVC/n | IIsFtpServer |
/LM/NNTPSVC/n | IIsNntpServer |
/LM/SMTPSVC/n | IIsSmtpServer |
Values
Constant | Value | Description |
---|---|---|
MD_SERVER_STATE_STARTING | 0x00000001 | Server starting. |
MD_SERVER_STATE_STARTED | 0x00000002 | Server started. |
MD_SERVER_STATE_STOPPING | 0x00000003 | Server stopping. |
MD_SERVER_STATE_STOPPED | 0x00000004 | Server stopped. |
MD_SERVER_STATE_PAUSING | 0x00000005 | Server pausing. |
MD_SERVER_STATE_PAUSED | 0x00000006 | Server paused. |
MD_SERVER_STATE_CONTINUING | 0x00000007 | Server continuing. |
Code Example
For general code examples, please see Code Examples to Configure Metabase Properties