Powershell Tip #50: Difference between Write-Error and throw

By | October 6, 2015

Tip: There is a difference between Write-Error (cmdlet) and throw (statement).

Write-Error: generates a non-terminating error

non-terminating-error-powershell

throw: generates a terminating error

terminating-error-powershell


previous-buttonnext-button

2 thoughts on “Powershell Tip #50: Difference between Write-Error and throw

  1. Pingback: Page not found | Powershell Guru

  2. Pingback: Powershell Tip #51: Avoid command name conflicts in a session | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *