end of the video should refactor it

This commit is contained in:
2026-01-05 21:54:53 +01:00
parent 0ac9fb2303
commit d3cfde767f
8 changed files with 187 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
function Test {
[CmdletBinding()] #turns into adv function
param(
[int32] $PingCount
)
Test-Connection google.com -Count $PingCount
Write-Error -Message "It' a trap" -ErrorAction Stop
}
try {Test -ErrorAction Stop} catch {Write-Output "Launch problem!" Write-Output $_}