Hi! I'm trying to work out a suitable method to wait for a script to finish. I'm using 'run program in guest' to run a script on a VM which in turn triggers a CHEF-Client install. It's working well but its a "fire and forget" situation which isn't ideal, as I'd like to send a notification when it's completed. If I could wait for a service to be installed/started maybe, I could then notify the user when the install is complete. It takes approx 10 mins for the install to complete, but i'd rather not just use a wait timer in minutes.
Thanks for any advice on this one as always
Thanks, I have seen the Guest script manager package but not sure how to wait/query a service or process to be honest, i'll look into it furher. I've actually moved from PShell to a combination of the guest agent and vRO.
you can use the businessState property to pass workflow state back into the workflow and validate it via a workflowExecution polling action.
this would required your powershell script to set the state of the workflowExection.businessState property
The guest script manager allows you to set a timeout and it will poll the state of the script. It will return error codes and any output from the script. It works like a charm for me. I heavily leverage it.