What is the Password Authority CLI command syntax on Windows?
The CLI command examples in the Password Authority documentation use the command syntax for UNIX.
There are some changed needed for Windows.
?Windows CLI format:
Here is a test command. We use it to make sure the CLI command is working, because getErrorCodes does not require any parameters:
cspmserver_admin.bat "cspmHostName=yourhost.yourdomain.com" "adminUserID=admin" "adminPassword=admin4cspm!" "cmdName=getErrorCodes"
This should return all the errorCodes, and you will know the CLI is working.
Example of Unix format: cspmserver_admin -u admin cmdName=searchTargetAccount TargetAccount.userName=root
On Windows from the documentation: cspmserver_admin "adminUserID=<user name>" ["authentication=<authentication>"] "cmdName=<command>" ["parameter=value"]
Also on Windows, we have to add the hostName of the PA Server or the commands don't work:
This command will prompt you for a password:
cspmserver_admin.bat “cspmHostName=yourhost.etc.etc” “adminuserID=admin” “cmdName=searchTargetAccount” “TargetAccount.userName=xxxxx”
You can also enter the password on the command line, in case you want to redirect the output to a file. Re-direct to a file called *.xml, so that you can read the output easily in a browser.
cspmserver_admin.bat "cspmHostName=yourhost.yourdomain.com" "adminUserID=XXX" "adminPassword=YYY" cmdName=searchTargetAccount" "TargetAccount.userName=YourAccountName"