In this tutorial, PowerShell expert Brien Posey guides viewers through essential techniques for managing errors within PowerShell scripts. Through practical demonstrations, Posey explores methods such as suppressing non-fatal errors, setting up Try and Catch blocks, and using warning messages to streamline script execution.
02:20 -ErrorAction SilentlyContinue
03:15 Try & Catch; Stop
07:13 Write-Warning
Brien Posey is a bestselling technology author, speaker, and 21x Microsoft MVP. In addition to his ongoing work in IT, Posey has trained as a commercial astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space.
For daily news, analysis, opinions and how-to’s about the IT industry, visit us at ITPro Today: https://www.itprotoday.com/
Music by AudioCoffee from Pixabay
#powershellscripting #errorhandling #powershell