Invoke-UAScriptwithin your script to start another script. Both jobs will be shown in the UI. If you want to wait for the script to finish, use
Wait-UAJobcmdlet to wait for a job to finish. Pipe the return value of
Wait-UAJobto wait for the job to complete.
Wait-UAJobwill wait indefinitely unless the
-Timeoutparameter is specified.
Get-PSUJobPipelineOutputcmdlet to return the pipeline output that was produced by a job. This pipeline output will be deserialized objects that were written to the pipeline during the job. You can access this data from where you have access to the PowerShell Universal Management API.
$jobvariable, waits for the job to complete and then returns the pipeline and host output.
PSSerializerclass in PowerShell. You can pass any object into the serialize method.