Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
Usage
Invoke the script from the
...
PowerShell command
...
window, specify the configuration file and
...
– optionally – if you want to run
...
the script in "check" mode.
It is recommended to execute the script interactively first, using
...
"check" mode. Using this mode, the script will only setup the connection and execute simple remote
...
display commands. No shutdown will be performed.
...
Once you are satisfied with the operation of the script
...
, use it at your convenience from any utility (scheduler, backup agent, ...) to
...
shut down the CHARON instance.
Info |
---|
To display the script's help text, please use either this Windows command:
or the |
...
PowerShell "get-help" command:
|
...
To automatically restart the guest operating system running on the CHARON instance, the automatic boot on restart has to be set at SRM level and the following Windows service command
...
must be
...
executed:
c:\Charon>sc start <servicename> |
...
To tell the script how the shutdown will be performed, some parameters are necessary. They are defined in a configuration file that is described in the Configuration file settings chapter.
Note on CHARON instance service:
The '
...
opa0' mode will perform the "power off
" command itself or will send the "F6
" key if this command is not available, thus stopping
...
the service.
...
The other modes will perform a clean shutdown without powering off the CHARON instance
...
, thus leaving the service active and the instance at the SRM prompt.
...
To recognize the completion of the shutdown process in this case, a loop has been introduced to check if the
...
guest operating system running on the instance responds to "ping
". Once it
...
no longer responds, the script
...
waits for a specified amount of time (waitbeforestop
parameter) before stopping the service.
Supported Windows versions
The kit has been validated on the following operating systems:
- Windows 2008 R2
- Windows 2012 R2 ('expect' is not supported on this version)
- Windows 7
Status colour Red title TO DO - Windows 8.1
Status colour Red title TO DO
Examples
Check mode:
|
...
Shutdown execution mode:
C:\Users\Administrator> powershell -file c:\charon\charon_cleanshutdown.ps1 -config c:\charon\myds20vms.ini |
...
Service restart:
C:\Users\Administrator> sc start myds20vms |
...
Include Page | ||||
---|---|---|---|---|
|