Last active
February 28, 2018 19:55
-
-
Save Sambardo/747419fd29f80056009e30925917932a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function MyFunction | |
{ | |
[cmdletbinding()] | |
param() | |
Write-error "Some custom error message" | |
Write-host "some host message" -ForegroundColor Green | |
get-process FAKE | |
} | |
write-host "running normally" -ForegroundColor Yellow | |
MyFunction | |
write-host "running with -erroraction silentlycontinue" -ForegroundColor Yellow | |
MyFunction -ErrorAction SilentlyContinue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment