Product: PowerShell Universal
Version: 5.6.8
I have the following endpoint which just calls a script.
$Parameters = @{
Url = "/test"
Method = @('GET')
Endpoint = {
"calling script"
$CurrentJob = Invoke-PSUScript -Script "Examples/HelloWorld.ps1" -ErrorAction Continue
$null = Wait-PSUJob -Job $CurrentJob
return $CurrentJob
}
New-PSUEndpoint @Parameters
The script contents of helloWorld.ps1
#throw "This is an error message from throw" # This will throw an error and stop the script
#Write-Error "This is an error message from Write-Error" # This will write an error message to the console
Write-Warning "This is a warning message from Write-Warning" # This will write a warning message to the console
Write-Information "This is an information message from Write-Information" # This will write an information message to the console
Write-Verbose "This is a verbose message from Write-Verbose"
Write-Debug "This is a debug message from Write-Debug"
Write-Error "whoops" -ErrorAction Continue
How come I dont get any of that other output streams? It has something to do with Wait-PSUJob

