### ServerState

This property presents the current state of the server instance. The states, and the corresponding state codes, are as follows:

1 | Starting
2 | Started
3 | Stopping
4 | Stopped
5 | Pausing
6 | Paused
7 | Continuing

This property is read-only.

Data type | Long
Default value | Not set
Inheritance | Inheritable

###### Access Locations

This property is accessible at the following locations:

Metabase Path | Key Type
/LM/MSFTPSVC/N | IIsFtpServer
/LM/W3SVC/N | IIsWebServer

###### IIS Admin Base Object Information

The following table lists additional information required only for code that uses the IIS Admin Base Object.

Metabase identifier | MD_SERVER_STATE
User type | IIS_MD_UT_SERVER

###### Bitmask 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.

###### Remarks

To send commands to the server, when working with the IIS Admin Base Object, use the MD_SERVER_COMMAND property.

© 1997-2001 Microsoft Corporation. All rights reserved.