Skip to content

Instantly share code, notes, and snippets.

@martin9700
Created May 30, 2015 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save martin9700/71b7a2d6411b616817c5 to your computer and use it in GitHub Desktop.
Save martin9700/71b7a2d6411b616817c5 to your computer and use it in GitHub Desktop.
Try {
Write-Verbose "Reading $PathName..."
$File = New-Object System.IO.StreamReader -Argument $PathName
}
Catch {
Write-Error "Unable to read $PathName because $($Error[0])"
Exit 999
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment