How to run PARClient from a batch script?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PAM Self-Hosted Articles
2 min read
L0 Member
No ratings
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.
Rate this article:
  • 1448 Views
  • 0 comments
  • 0 Likes
Article Dashboard
Version history
Last Updated:
‎04-11-2023 09:23 PM
Updated by: