I am using a PowerCLI script to clone virtual machines from a template and after the clone I need to add the new virtual machines to Altiris for further processing (deploying OS, Citrix XenApp and Applications in my case).
In Altiris I have universal jobs that identify what configuration is applicable, eg a Virtual Machine doesn’t need array configuration but a physical machine does.
I filter the Virtual Machines by using the Serial Number field in Altiris (a VMWare Virtual Machine always starts with the “VMware-“ followed by the VM’s UUID:

But I wanted to deploy the OS right after the clone operation and at this point Altiris has not yet read the serial number so I need to preconfigure this as well.

I wrote a PowerShell function that reads the UUID from a Virtual Machine and converts this to the desired format: