Creating a Building Block of a Module, Project or Run Book from a command line

You can create a Building Block of a Module, Project, or Run Book from a command line. This allows you to create an automated process that creates a Building Block and then you can create an entire environment based upon those building blocks.

To do so, run the executable of the Console (wmc.exe) from the command line and use the following parameters:

Parameter

Value

Functionality

/action

createbb

Specifies the action, in this case Create a Building Block.

/objecttype

runbook

or

module

or

project

Identifies the type of the Building Block.

/objectguid

<GUID>

Specifies the GUID of the objecttype, either a Run Book, Module, or Project 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:

  • The destination path must be accessible for saving a file.
  • Wildcard characters are not supported.

/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 Console. If not given, the Microsoft Windows Authentication credentials will be used to determine if the user has access to the Console 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 (x86)\Ivanti\Automation\Console\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.
  • When creating a Building Block via the command line in an AES-256 encrypted environment (in Ivanti Automation 10.2 or higher), a Building Block passkey will be generated automatically and stored as a separate TXT file with the same name as the XBB file, at the same location.