VMware Cloud Community
JoJoGabor
Expert
Expert

Return a value for use in a workflow

I have a need to get a value from a VM and passing this into the next step of the workflow but stumped as to how you do this. The powershell to get this SCCM ClientID which has to run on the VM being built is;

$ClientID = (Get-WmiObject -Computer $Env:COMPUTERNAME -Namespace root\ccm -Class CCM_Client).ClientId

So I then want to return the number that is $ClientID and pass that to another script which has to run on the Powershell host

I think the best way of doing this is by creating an action, but cant get this to work from the "Generate an action from a powershell script" workflow

ALternatively, how do I use the Guest operations wrapper scripts to return another variable apart from the Scriptexitcode and error codes?

Or can I use the VCO SDK commands to query WMI a different way to get this value and pass it on?

0 Kudos
0 Replies