4 January, 2022

Powershell Notes

if (-not (...)) {

}
try {
  Write-Host 'Hello World'
} catch {
  Write-Output 'Something went wrong'
}

What is the difference between Write-Host and Write-Output?