Read-Hostcall will wait until there is user interaction with that job. The job will be in a Waiting for Feedback state, and you can respond to that feedback by click the Response to Feedback button on the job page.
Invoke-PSUScriptwithin 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-PSUJobcmdlet to wait for a job to finish. Pipe the return value of
Wait-UAJobto wait for the job to complete.
Wait-PSUJobwill 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.
Invoke-PSUScriptto achieve this.
-Integratedparameter to switch to integrated mode. This parameter does not work outside of PowerShell Universal.