How to run PARClient from a batch file?
Steps
Use an encrypted password file and the /C option to specify the command to run.
For example:
parclient <Vault IP Address> /UsePassFile <file name> /c "ServiceStatus /ServiceName \"PrivateArk Server\"
Note 1:
The command in the above example will work only if the "PrivateArk Server" service is specified in the PARAgent.ini file (located in the Vault server under folder: "\Program Files\PrivateArk\Server") as an allowed monitored service:
AllowedMonitoredServices="PrivateArk Server"\
Note 2:
If the command sent to the PARClient has a parameter which contains a space character, then backslash+quotes (\") should be used instead of just quotes ("):
.../c "ServiceStatus /ServiceName \"PrivateArk Server\""
This is because the command and its parameters are sent inside a string recognized by quotes.
Q:
How to run PARClient from a batch file?
A:
Use an encrypted password file and the /C option to specify the command to run.
For example:
parclient <Vault IP Address> /UsePassFile <file name> /c "ServiceStatus /ServiceName \"PrivateArk Server\""
Note 1:
The command in the above example will work only if the "PrivateArk Server" service is specified in the PARAgent.ini file (located in the Vault server under folder: "\Program Files\PrivateArk\Server") as an allowed monitored service: AllowedMonitoredServices="PrivateArk Server"
Note 2:
If the command sent to the PARClient has a parameter which contains a space character, then backslash+quotes (\") should be used instead of just quotes ("):
.../c "ServiceStatus /ServiceName \"PrivateArk Server\""
This is because the command and its parameters are sent inside a string recognized by quotes.