Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
Usage
Invoke the script from the Powershell command and specify the configuration file and eventually if you run it in "check" mode.
It is recommended to execute the script interactively first using the check mode. Using this mode, only connection and remote commands doing simple display will be executed, no shutdown will be performed.
Use the script then it at your convenience from any utility (scheduler, backup agent, ...) to shutdown the virtual machineCHARON instance.
Info | ||
---|---|---|
To display script help text, please use either this Windows command:
or the Powershell "get-help" command:
|
To restart the virtual machineCHARON instance, the automatic boot on restart has to be set at SRM level and the following Windows service command has to be used:
c:\Charon>sc start <servicename> |
Note on CHARON virtual machine (Windows) instance service:
The 'expect' mode will perform the "power off
" command itself or will send the "F6
" key if this command is not available stopping then the service. Other modes will perform a clean shutdown without powering off the virtual machine CHARON instance letting then the service active and the virtual machine instance at SRM prompt. This is why a loop is introduced to check the virtual machine instance is responding to "ping
". Once it does not respond anymore, the script will wait 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 | ||||
---|---|---|---|---|
|