I am new to powershell and just learning it. I have some experience in C#. I am trying to use the foreach-object -Parallel option but cant get all the Write-* functions to work.
function writeTest {
1..1 | ForEach-Object -Parallel {
Write-Host "host"
Write-Output "Output"
Write-Information "information" -InformationAction Continue
Write-Verbose "verbose"
Write-Warning "Warning"
Write-Error "error"
}
}
Function called like: writeTest -verbose
Outputs:
host
Output
WARNING: Warning
Write-Error: error
My question is why doesn't write-verbose and write-information display anything?
Please forgive any ignorance.