Create a Building Block for a Run Book
You can create a Building Block for a Run Book in the Management Portal unattended. This allows you to create an automated process to create a Building Block of a single Run Book and create an entire environment based upon Run Books.
To do so, run the executable of the Management Portal (wmc.exe) from the command line and use the following parameters:
Additionally, you will need to edit the configuration file (wmc.exe.config)and provide the address of the API and the API key.
Parameter |
Value |
Functionality |
/action |
createbb |
Specifies the action, in this case Create a Building Block. |
/objecttype |
runbook |
Identifies the type of the Building Block. The only value is: runbook. |
/objectguid |
<GUID> |
Specifies the GUID of the objecttype, in this case a Run Book GUID. |
/destination |
<path\filename.extension> |
Identifies the path where the Building Block needs to be created and the filename (including the extension like .xml) of the created Building Block. Please note the following:
|
/skipresources |
|
Optional: use this option to skip the Resources when creating a Building Block. By default, the available Resources of a Run Book are included in the Building Block. |
/user -and- /password |
<username> -and- <password> |
Optional: specifies the Ivanti Automation credentials to access the Management Portal. If not given, the Microsoft Windows Authentication credentials will be used to determine if the user has access to the Management Portal and sufficient access to perform the action. |
/silent |
|
Optional: no user interaction, such as message boxes, is shown when running this action. |
Example
"C:Program Files\RES\Automation\Management Portal\ApiClient\wmc.exe" /action=createbb /objecttype=runbook /objectguid={1234ABCD-1234-ABCD-1234-12345678ABCD} /destination="c:\temp\example.xml" /user=jsmith /password=secret
A Resource file will be saved as XBB file if applicable. Please note that if you use .xbb as an extension in the parameter /destination, the XML file of the Run Book will overwrite the Resource file.