How can I create sd_acmd commands for packages already installed in OS images and defined in Procedure Groups?

Document ID : KB000110157
Last Modified Date : 01/10/2018
Show Technical Document Details
In order to speed up OS deployments, sometimes the initial set of packages are already installed in the OS image but when the OS is installed in a new target machine and the agent registers to the Domain Manager, the already installed packages do not get registered.
A way to achieve it is by running sd_acmd commands to add the installation records to the Domain Manager.
The list of initial set of packages are defined in a Procedure Group but when exporting the list from DSM-Explorer, the package name and version are exported as one field so it's difficult to build sd_acmd commands from it.
How to build sd_acmd commands to register already installed packages on a new OS image so they get registered to the Domain Manager?
They are already registered and defined in a Procedure Group.
CA Client Automation - All versions
Unzip the attached procedure group to

Run the following script to create sd_acmd lines from packages under a procedure group with the following parameters to connect to the SQL Server of the Enterprise or Domain Manager with the necessary SQL credentials and the Procedure Group name:

pg2sdacmd.bat <sql-server-name> <sql-userid> <sql-password> <procedure-group-name>

The created sd_acmd commands will need to be run after the OS installation by either a Software Delivery job or added at the end of the OS installation. The end of the file oobecustom.cmd of the OS image under DSM\Server\SDBS\var\managedpc\images\<image-name>\<image-name>\oeminst

File Attachments:
procedure group to