PowerShell 7 Tutorials for Beginners #10 : Error Handling (Try Catch Finally)

  Рет қаралды 9,111

JackedProgrammer

JackedProgrammer

Күн бұрын

Пікірлер: 15
@richardgarrow9260
@richardgarrow9260 Жыл бұрын
Jack I am quite surprised that you are not getting more hits as these videos are really good. Thanks
@shashikantovhal1769
@shashikantovhal1769 Жыл бұрын
Thank you so much for creating this series. As a beginner , the series helped me to become fearless about powershell.
@jackedprogrammer
@jackedprogrammer Жыл бұрын
Happy to hear that! Thank you!
@aeylia7535
@aeylia7535 Жыл бұрын
The quality of these videos man! I know for sure you'll make it big here
@kennethpaige7036
@kennethpaige7036 Жыл бұрын
This series was very helpful .. thank you so much!
@jadelise
@jadelise 9 ай бұрын
Nice Job! bite sized chunks, easy to digest. I will be subscribing
@MrWogle1
@MrWogle1 Жыл бұрын
One of my favorite things to do with error handling in PowerShell is to structure the catch statement like this: $ErrorMessage = "Error occurred when attempting to do X on Y. This is a terminating error.`n$($Error[0])" Write-ErrorLog -LogMessage = $ErrorMessage return $ErrorMessage This will spit out a custom error message that you write yourself, and then on a new line spit out the text from the last error that happened (which is the one you just caught). It makes debugging waaaaay easier.
@fonsohalbert
@fonsohalbert Жыл бұрын
This is amazing! Thank you for uploading
@Jon-rp4st
@Jon-rp4st 2 жыл бұрын
Thanks a lot, nice person!
@vitorrejano670
@vitorrejano670 2 жыл бұрын
Great video!
@Jan-nu6zc
@Jan-nu6zc Жыл бұрын
Thank u! Great Video
@netor-3y4
@netor-3y4 11 ай бұрын
$ErrorActionPreference = "Stop" try { $filePath = "C:\Scripts\10 - Error Handling" $files = Get-ChildItem -Path $filePath foreach ($file in $files) { Write-Output $file.Name } Write-Output "This is after the loop" } catch { Write-Output "Caught an error" } finally { Write-Output "This always runs no matter what!" }
@riccarrasquilla379
@riccarrasquilla379 8 ай бұрын
thanks for the video
@shokiroffff
@shokiroffff 3 ай бұрын
nice
@ВикторЛарионов-й3к
@ВикторЛарионов-й3к 9 ай бұрын
thanks
PowerShell 7 Tutorials for Beginners #11 : Modules
18:48
JackedProgrammer
Рет қаралды 6 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 55 МЛН
[BEFORE vs AFTER] Incredibox Sprunki - Freaky Song
00:15
Horror Skunx 2
Рет қаралды 20 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 8 МЛН
PowerShell Errors and Exceptions Handling
27:49
TechThoughts
Рет қаралды 30 М.
Handling Errors in PowerShell with Try..Catch..Finally
18:48
Trevor Sullivan
Рет қаралды 10 М.
PowerShell 7 Tutorials for Beginners #9 : For, Do, While (Loops)
26:40
JackedProgrammer
Рет қаралды 6 М.
PowerShell 7 Tutorials for Intermediates #5 : Pester (Testing)
18:28
JackedProgrammer
Рет қаралды 7 М.
Try / Catch for error handling in Powershell
8:52
PetterTech
Рет қаралды 1,2 М.
PowerShell 7 Tutorials for Intermediates #1 : Methods (Part 1 of 2)
36:50
You Should Learn PowerShell
13:18
Pro Tech Show
Рет қаралды 28 М.
How to use PowerShell Try, Catch and the Write-Verbose and Write-Debug
19:23
John Savill's Technical Training
Рет қаралды 20 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 55 МЛН