Last active
November 10, 2019 21:20
-
-
Save MateuszNad/316ea0480c0baf8284a13790db2efbac 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
$oldErrorActionPreference = $ErrorActionPreference | |
$ErrorActionPreference = 'Stop' | |
try | |
{ | |
Get-Item -Path F:\file, D:\temp | |
} | |
catch{ | |
Write-Warning $_.Exception.Message -ForegroundColor Yellow | |
} | |
finally | |
{ | |
Write-Host "koniec przykładu ..." | |
$ErrorActionPreference = $oldErrorActionPreference | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment