The BEA Guardian Command Line Interface is accessed with a Windows Command Prompt window or a Linux terminal window. The Guardian command interpreter is an executable .cmd batch file for Windows, and a .sh shell script for Linux. Both the Windows batch file and the Linux shell script are wrappers that accumulate and organize arguments to the Java command.
To use the Guardian Command Line Interface, run the guardianHeadless.cmd (for Windows) or guardianHeadless.sh (for Linux) executable file which was placed in the installation directory you specified when you installed Guardian.
If you have not previously set your Guardian Workspace location when starting the Graphical User Interface, the Guardian Command Line Interface will use a default Guardian Workspace location, unless you specify otherwise in each command. The default Guardian Workspace location is in your home directory; for example, C:\Documents and Settings\<username>\guardianWorkspace for Windows, and /home/<username>/guardianWorkspace for Linux. If you have previously set your Guardian Workspace location, the Guardian Command Line Interface will use that location for all its operations, unless you specify otherwise in each command. Identifying the Guardian Workspace location is essential for accessing the correct set of active domains, Domain Inventories, and Evaluation Summaries.
The Guardian Command Line Interface accepts a variety of commands that perform almost every task available with the Graphical User Interface. To see a list of the commands available and their syntax, type guardianHeadless -ghelp at your operating system's command prompt. Please note that the Guardian Command Line Interface commands are case sensitive.
The output of each command is not sent to the console window. Instead, it is sent to the output file, headless_output.txt. The output file created in your current directory, and is overwritten each time you run it.
Also note that each command must be preceded with "-g", as shown in the following examples. Please pay special attention to the spacing, the arguments that require quotes, and the case sensitivity.
guardianHeadless.cmd -glistActiveDomains
guardianHeadless.cmd -gactivateDomain -t http://localhost:9116 -u un -p pw -c true -data "D:\MyData\Guardian Data Directories\Installer-2079"
bundleId: the bundle identifier for the shortcut (default = 0, which is the identifier for the bundle named, "Default Signatures"). The values for all the bundles can be found with the listBundles command.
shortcutName: the name of the shortcut in quotes (default = "<bundle name> in <domain name>")
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace
domainId: the domain identifier of the domain to deactivate
deleteUserData (true or false, without quotes): whether to delete the Domain Inventories and Evaluation Summaries from the Guardian Workspace (default = false)
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace
domainId: the domain identifier of the domain to evaluate
bundleId: the bundle identifier for the shortcut (default = 0, which is the identifier for the bundle named, "Default Signatures"). The values for all the bundles can be found with the listBundles command.
username: administrator account username for the specified domain (not required if persistCredentials set to true in activateDomain)
password: administrator account password for the specified domain (not required if persistCredentials set to true in activateDomain)
persistCredentials (true or false, without quotes): whether to persist the username and password in encrypted form (default = false)
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace
shortcutName: the name of the shortcut to evaluate in quotes
username: administrator account username for the specified domain (not required if persistCredentials set to true in activateDomain)
password: administrator account password for the specified domain (not required if persistCredentials set to true in activateDomain)
persistCredentials (true or false, without quotes): whether to persist the username and password in encrypted form (default = false)
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace
help
listActiveDomains [ -data workspaceDir ]
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace
listBundles [ -data workspaceDir ]
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace
listShortcuts [ -data workspaceDir ]
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace
script -f scriptname [ -data workspaceDir ]
scriptname: the name of a script file containing Guardian commands. Each command has to be on a separate line. See Running Scripts for more information.
workspaceDir: the full directory specification, in quotes, of the location of the Guardian Workspace