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:






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







Identifies the type of the Building Block.



Specifies the GUID of the objecttype, either a Run Book, Module, or Project GUID.



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.



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.







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.



Optional: no user interaction, such as message boxes, is shown when running this action.


"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.