Anchor | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
...
Table of Contents | ||||
---|---|---|---|---|
|
Required parameters
Parameter | Value | Example |
---|---|---|
logfile |
Optional full path to the logfile that will be used to log the script output. If not specified a file name and path will be chosen based on session log file (one file per script execution). The file name is usually based on the configuration_name followed by "-SHUTDOWN-" and date/time. | logfile=C:\Charon\myds20_shutdown.log | |
mode | 'opa0' | mode=opa0 |
os | Either Tru64 or VMS | os=Tru64 |
servicename | CHARON instance service name. When using "opa0" mode, the service is stopped by a " | servicename=myds20 |
username | Defines the remote username that will be used to connect to the console of the CHARON instance (if not already logged in) | For OpenVMS: For Tru64: |
password | Defines the password in clear text that will be used to connect to the console. The password can be also stored in an encrypted |
file as described below. If password is sent then |
cryptedpass (below) value must be set to "none" or left empty. | password=12345 |
clixml
do not use, password is not encrypted
A new version will be provided soon
Defines the full path of the clixml file that contains the encrypted password (password parameter must then not be set).
cryptedpass | Full path to the text file containing the crypted password. To create this file, open a command window "cmd.exe" |
and |
C:\Users\Administrator> cd C:\Charon
C:\Charon> powershell
PS C:\Charon> "<password>" | export-clixml <file> |
Example:
PS C:\Charon> "12345" | export-clixml C:\Charon\myds20pwd.clixml |
The clixml file is bound to the user and system where it is created! It will not be valid for another user or another system.
clixml=C:\Charon\myds20pwd.clixml
clixmlsys
do not use, password is not encrypted
A new version will be provided soon
Defines the full path of the clixml file that contains the encrypted password (password parameter must then not be set) for the "system" account. Used in case of integration with Windows shutdown.
If not specified, clixml
is used or the combination of username/password (see above)
The clixml file has to be created as "system" user using "psexec" utility. It is bound to the "system" user and the system where it is created! It will not be valid for another user or another system.
clixml=C:\Charon\myds20pwdsys.clixml
port
port=10003
prompt
Defines the prompt at the shell level of the guest operating system. Used to check the user is connected.
Notes:
- If the prompt contain spaces, it is necessary to add them in the configuration file
- The prompt must not contain any escape character.
prompt=myds20>
timelimitsec
timelimitsec=600
windowwidth
Optional parameters used to resize the window when running with service user ("system" account).
Useful during Windows shutdown to check operations executed.
Width = 132 and Height = 32 by default. BufferHeight set 2000 lines by default.
windowwidth=120
windowheight
windowheight=50
...
Example
...
run "powershell". At the powershell prompt, enter the following command:
|
| |
port | Defines the port to access the console (same as the one defined in the configuration file). | port=10003 |
prompt | Defines the prompt at the shell level of the guest operating system. Used to check the user is connected. Notes:
|
|
timelimitsec | Defines the maximum number of seconds the script can run (default = 180 seconds). This value depends on the time needed to shutdown properly the operating system. | timelimitsec=600 |
windowwidth | Optional parameters used to resize the window when running with service user ("system" account). Useful during Windows shutdown to check operations executed. Width = 132 and Height = 32 by default. BufferHeight set 2000 lines by default. | windowwidth=120 |
windowheight | windowheight=50 |
Include Page | ||||
---|---|---|---|---|
|
Example
Configuration file
|
Include Page | ||||
---|---|---|---|---|
|
...
When check mode is enabled, a pop-up window will be displayed to check the operations performed on the CHARON instance console.
Shutdown execution - VMS example
class | commandline |
---|
c:\Windows\system32>
C:\charon\charon_cleanshutdown.ps1 -config C:\charon\myds20vms.ini
Charon clean shutdown
Name Value
---- -----
clixmlsys C:\Charon\myds20vmssys.clixml
waitbeforestop 10
windowwidth 132
servicename ds20vms
username system
prompt VMS084>
windowheight 50
timelimitsec 180
os VMS
mode opa0
clixml C:\Charon\myds20vms.clixml
port 10003
logfile C:\Charon\myds20vms_shutdown.log
16:48:09 [INFO ] Using 'C:\Charon\myds20vms_shutdown.log' as log file / append
16:48:09 [INFO ] Execution date : 27-avr.-2020 16:48:09
16:48:09 [INFO ] Script version : 27-Apr-20 V2.0 (MD5: 4BA97792A105C9E0E484850B88B866F8 )
16:48:09 [INFO ] Powershell version : 5.1.14409.1018
16:48:09 [INFO ] Computer name : WIN2008BM
16:48:09 [INFO ] Username : Administrateur
16:48:09 [INFO ] Windows version : Microsoft Windows Server 2008 R2 Standard
16:48:09 [INFO ] Administrator mode : True
16:48:09 [INFO ]
16:48:09 [INFO ] 'opa0' will be used
16:48:09 [INFO ] Service 'ds20vms' is Running (Display name: ds20vms)
16:48:09 [INFO ] Using 'C:\Charon\myds20vms.clixml' as credentials file.
16:48:09 [INFO ] No putty session active.
16:48:09 [INFO ] Connecting to OPA0 console, port 10003
16:48:09 [INFO ] Sending CRLF...
16:48:09 [INFO ] Time limit: 16:51:09. Seconds remaining: 180
16:48:12 [RCVD ]
16:48:12
RCVD messages correspond to the received data from the OPA0 console. |
...
Shutdown execution - Tru64 example
Div | ||
---|---|---|
| ||
|
RCVD messages correspond to the received data from the OPA0 console.
RCVD messages correspond to the received data from the OPA0 console. |
Include Page | ||||
---|---|---|---|---|
|
Shutdown execution - Tru64 example
RCVD messages correspond to the received data from the OPA0 console. |
Shutdown execution - VMS example
RCVD messages correspond to the received data from the OPA0 console. |
...