Stop servers using scripting
Step for this task
Use the stopServer command to stop the server. This command has several syntax options. For example:
- To stop a server on a WAS single server edition, choose one of the following options:
- The following examples specify the server name only:
$AdminControl stopServer serverNameAdminControl.stopServer('serverName')- The following examples stop an application server with the node specified:
$AdminControl stopServer serverName mynode print AdminControl.stopServer('serverName', 'mynode')
Example output
WASX7337I: Invoked stop for server "serverName" Waiting for stop completion. WASX7264I: Stop completed for server "serverName" on node "mynode"- The following examples specify the server name and immediate:
$AdminControl stopServer serverName immediate AdminControl.stopServer('serverName', immediate)
- To stop a server on a WAS network deployment edition, choose one of the following options:
- The following example specifies the server name and the node name:
$AdminControl stopServer serverName nodeName AdminControl.stopServer('serverName', 'nodeName')
- The following example specifies the server name, the node name, and immediate:
$AdminControl stopServer serverName nodeName immediate AdminControl.stopServer('serverName', 'nodeName', immediate)
See Also
AdminControl object for scripted administration
See Also
Commands for the AdminControl object
stopServer command