- 14 May 2021
- 1 Minute to read
- Print
- DarkLight
- PDF
Restart Server
- Updated on 14 May 2021
- 1 Minute to read
- Print
- DarkLight
- PDF
Restart Server
Restarts a server and waits for it to become available again.
Script usage:
Restart-Server( [After: <integer>], [MinimumDelay: <integer>] );
This operation may be prefixed with BuildMaster::
, although this is a built-in namespace and isn't really necessary.
Arguments:
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
Restart after | integer | After | |
Minimum reconnect wait | integer | MinimumDelay |
Note: The After and MinimumDelay properties are advanced options, and determine how many seconds to wait before the operating system shutdown is initiated (default and minimum value is 5), and how many seconds to wait until attempting to reconnect to the agent (default and minimum value is 15). These generally should be kept at defaults, unless the server takes an extraordinary time to shutdown.
Note: If the server is used by another operation before this operation completes, then the results are undefined.
Example:
# restart the current server after 10 seconds Restart-Server( After: 10 );