How to run PARClient from a batch script?
79
Created On 11/10/26 10:56 AM - Last Modified 11/10/26 12:59 PM
Objective
How to run PARClient from a batch file?
Environment
10.5;10.10;11.5;11.6;11.7;12.0;12.2;12.6;13.0 Privileged Access Manager (PAM, self-hosted) Vault
Procedure
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.
Additional Information
Details
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.