Manage individual ArcGIS Server services at the folder level or through the Windows Services Console by stopping or starting the main ArcGIS Server service.
| Parameter | Type | Description | Required |
|---|---|---|---|
| Folder | String | The folder containing the services you wish to stop or start on your ArcGIS Server.
Note “ALL” should only be used on machines running Windows Server. |
Yes |
| Operation | String | Specify the operation you wish to perform on the service(s).
|
Yes |
| ServerName | String | The name or IP address of the server where ArcGIS Server is running. | Yes |
| UserName | Boolean | Specify an administrative user for ArcGIS Server. | Yes |
| Password | Boolean | Specify the administrative user password for ArcGIS Server. | Yes |
Returns: Boolean
Simple call with all parameters specified.Notice that here we are using the IP address instead of the server name.import RPLib folder = "LandRecords" RPLib.controlservices(folder,"stop","192.1.1.1","administrator","password")
- Note This will stop all services in the folder LandRecords on ArcGIS Server.
Simple call with all parameters specified.Notice that here we are using the server name instead of the IP address.import RPLib RPLib.controlservices("ALL","stop","GISAPP","administrator","password")
- Note - This will stop the main ArcGIS Server service through the Windows Services Console.
If Else logic with all parameters specified.Notice that here we are using the server name instead of the IP address.import RPLib if RPLib.controlservices("ALL","start","GISAPP","administrator","password"): print("successful, run another tool") else: print("failed, run another tool")
- Note - This will start the main ArcGIS Server service through the Windows Services Console.
If Else logic with all parameters specified.Notice that here we are using the IP address instead of the servername.import RPLib folder = "LandRecords" if RPLib.controlservices(folder,"start","192.1.1.1","administrator","password"): print("successful, run another tool") else: print("failed, run another tool")
- Note This will start all services in the folder LandRecords on ArcGIS Server.