Command Line Utility
Opalis Integration Server enables
you to run Policies from a command line. You can install the
Command Line Utility on any computer in your network that can
access the Management Server computer.
Policies that you run from the
Command Line Utility must begin with a Custom Start object. If you
need to submit parameters from the Command Line Utility to the
Policy, you must configure those parameters in the Policy before
you run it from the Command Line Utility.
To run a Policy from the Command
Line Utility, type the path where the executable is stored:
C:\Program Files\Opalis
Software\Opalis Integration Server\Management
Service
where C: is the drive letter
where Opalis Integration Server was installed.
And type the following at the
command prompt according to the syntax example below:
•
|
the name of the Command Line Utility
executable, OIS5StartPolicy
|
•
|
the name of the folder that contains
the Policy, if required
|
•
|
the name of the Policy (if you are
not using the /id
flag)
|
•
|
the name of the Management Server, if
the computer that hosts the Management Server is different from
where you have installed the Command Line Utility
|
•
|
the parameters that you are
submitting to the Policy
|
•
|
any flags that you want to run as
part of the command
|
Syntax example
OIS5StartPolicy
PolicyFolder\PolicyName /ms:ManagementServerNameorIPaddress
"parameter1=value1" "parameter2=value2" /wait
Backslashes in filenames
If your folder or Policy name
includes a backslash, use a double backslash in the Command Line
Utility. For example, if the folder and Policy name in the example
above used backslashes, it would look like the following:
OIS5StartPolicy Policy\\Folder\Policy\\Name
/ms:ManagementServerNameorIPaddress "parameter1=value1" "parameter2=value2" /wait
Flags
Use any of the following flags in
your command:
•
|
/id – specify the Policy that you want
to run using its GUID.
|
OIS5StartPolicy {guidtext} /id
Do not use the Policy folder or
Policy name in the command when using this flag.
•
|
/search – list GUIDs for all Policies,
or all Policies in a folder that you specify.
|
OIS5StartPolicy “the search string” /search – use
quotes for strings that contain spaces
OIS5StartPolicy searchstring /search – quotes are not
required if the string does not contain spaces
OIS5StartPolicy “policyfolder\policyname” /search –
search for a Policy within the named folder
This flag returns the name of
Policies, their GUIDs, and folder names that match the search
string that you provide. It is not case-sensitive. You can provide
partial strings to search for Policies that contain the string that
you provide. If there is a space in your string, enclose the string
in quotes to treat the entire string as a single argument.
•
|
/q – make GUIDs available to other
objects as Published Data items or as content in a text file. Use
after the /search flag to
search for and execute all Policies in a folder.
|
OIS5StartPolicy PolicyFolder /search /q – call the
results of this command from the Pure Output Published Data item generated by
the Run Program object
OIS5StartPolicy “folder\policy” /search /q >
C:\filename.txt – put the results of this command into a
text file called C:\filename.txt, and then use the Read Line object
to parse the text in that file
•
|
/wait – the Command Line Utility
remains active until the Policy has finished executing.
|
OIS5StartPolicy PolicyFolder\PolicyName
/wait
If you are using other software
to launch the Command Line Utility, you can configure the other
software to wait until the Command Line Utility is no longer active
before proceeding with the next job.
•
|
/? – view a syntax example in the
command prompt.
|
OIS5StartPolicy /?
Submitting parameter values to
the Custom Start object
To submit values into the Custom
Start object of the Policy that you are launching, type the name of
the parameter as configured in the Custom Start object, the equals
sign, and the value that you are assigning to that parameter.
Examples:
1.
|
Start Policy1 in the MyPolicies
folder on the local Management Server:
|
OIS5StartPolicy MyPolicies\Policy1
2.
|
Submit a parameter to the Policy
in example 1 above:
|
OIS5StartPolicy MyPolicies\Policy1
"parameter1=Hello"
3.
|
Run Policy1 on another
Management Server and submit a parameter:
|
OIS5StartPolicy MyPolicies\Policy1 /ms:server1
"parameter=Hello"
4.
|
Run Policy1 on another
Management Server, submit a parameter, and instruct the Command
Line Utility to remain active until the Policy has finished
running:
|
OIS5StartPolicy MyPolicies\Policy1 /ms:server1
"parameter=Hello" /wait