mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-07-03 06:00:14 +02:00
Improve the error message line
This commit is contained in:
Scripts
add-firewall-rules.ps1add-memo.ps1alert.ps1build-repo.ps1build-repos.ps1cd-autostart.ps1cd-desktop.ps1cd-docs.ps1cd-downloads.ps1cd-dropbox.ps1cd-fonts.ps1cd-home.ps1cd-music.ps1cd-onedrive.ps1cd-pics.ps1cd-recycle-bin.ps1cd-repos.ps1cd-root.ps1cd-scripts.ps1cd-ssh.ps1cd-temp.ps1cd-up.ps1cd-up2.ps1cd-up3.ps1cd-up4.ps1cd-videos.ps1cd-windows.ps1change-wallpaper.ps1check-cpu.ps1check-date.ps1check-day.ps1check-dns.ps1check-drive-space.ps1check-drives.ps1check-dusk.ps1check-easter-sunday.ps1check-file-system.ps1check-independence-day.ps1check-ipv4-address.ps1check-ipv6-address.ps1check-iss-position.ps1check-mac-address.ps1check-midnight.ps1check-month.ps1check-moon-phase.ps1check-new-year.ps1check-noon.ps1check-operating-system.ps1check-ping.ps1check-santa.ps1check-smart-devices.ps1check-subnet-mask.ps1check-swap-space.ps1check-symlinks.ps1check-time-zone.ps1check-time.ps1check-uptime.ps1check-vpn.ps1check-weather.ps1check-week.ps1check-wind.ps1check-windows-system-files.ps1check-xml-file.ps1clean-repo.ps1clean-repos.ps1clear-recycle-bin.ps1clone-repos.ps1close-program.ps1convert-csv2txt.ps1convert-mysql2csv.ps1convert-ps2bat.ps1convert-ps2md.ps1convert-sql2csv.ps1convert-txt2wav.ps1copy-photos-sorted.ps1decrypt-file.ps1display-time.ps1download-dir.ps1download-file.ps1edit.ps1enable-god-mode.ps1encrypt-file.ps1export-to-manuals.ps1fetch-repo.ps1fetch-repos.ps1get-md5.ps1get-sha1.ps1get-sha256.ps1give-reply.ps1hibernate.ps1inspect-exe.ps1install-chrome-browser.ps1install-github-cli.ps1install-knot-resolver.ps1install-obs-studio.ps1install-signal-cli.ps1install-ssh-client.ps1install-ssh-server.ps1install-updates.ps1install-wsl.ps1introduce-powershell.ps1list-aliases.ps1list-anagrams.ps1list-automatic-variables.ps1list-bluetooth-devices.ps1list-branches.ps1list-city-weather.ps1list-cli-tools.ps1list-clipboard.ps1list-cmdlets.ps1list-commits.ps1list-console-colors.ps1list-countries.ps1list-credits.ps1list-crypto-rates.ps1list-dir-tree.ps1list-drives.ps1list-earthquakes.ps1list-empty-dirs.ps1list-empty-files.ps1list-environment-variables.ps1list-exchange-rates.ps1list-files.ps1list-folder.ps1list-headlines.ps1list-hidden-files.ps1list-installed-apps.ps1list-installed-software.ps1list-latest-tag.ps1list-latest-tags.ps1list-memos.ps1list-modules.ps1list-network-shares.ps1list-news.ps1list-os-releases.ps1list-os-updates.ps1list-outlook-inbox.ps1list-outlook-sent.ps1list-passwords.ps1list-pins.ps1list-print-jobs.ps1list-printers.ps1list-processes.ps1list-profiles.ps1list-recycle-bin.ps1list-repos.ps1list-scripts.ps1list-services.ps1list-submodules.ps1list-tags.ps1list-tasks.ps1list-timezone.ps1list-timezones.ps1list-tiobe-index.ps1list-unused-files.ps1list-user-groups.ps1list-voices.ps1list-weather.ps1list-workdir.ps1locate-city.ps1locate-ipaddress.ps1locate-zip-code.ps1log-off.ps1make-install.ps1moon.ps1new-branch.ps1new-email.ps1new-qrcode.ps1new-script.ps1new-shortcut.ps1new-symlink.ps1new-tag.ps1new-user.ps1new-zipfile.ps1open-auto-start-folder.ps1open-bing-maps.ps1open-calculator.ps1open-chrome.ps1open-clock.ps1open-cortana.ps1open-default-browser.ps1open-desktop-folder.ps1open-documents-folder.ps1open-downloads-folder.ps1open-dropbox-folder.ps1open-email-client.ps1open-file-explorer.ps1open-firefox.ps1open-git-extensions.ps1open-home-folder.ps1open-magnifier.ps1open-microsoft-paint.ps1open-microsoft-teams.ps1open-microsoft-weather.ps1open-music-folder.ps1open-note-pad.ps1open-obs-studio.ps1open-one-drive-folder.ps1open-paint-three-d.ps1open-pictures-folder.ps1open-recycle-bin-folder.ps1open-remote-desktop.ps1open-repos-folder.ps1open-screen-clip.ps1open-screen-sketch.ps1open-skype.ps1open-task-manager.ps1open-temporary-folder.ps1open-videos-folders.ps1open-visual-studio.ps1pick-commit.ps1play-files.ps1play-m3u.ps1play-mp3.ps1poweroff.ps1publish-to-ipfs.ps1pull-repo.ps1pull-repos.ps1query-smart-data.ps1reboot.ps1remind-me.ps1remove-empty-dirs.ps1remove-print-jobs.ps1remove-tag.ps1replace-in-files.ps1restart-network-adapters.ps1save-screenshot.ps1search-files.ps1send-email.ps1send-tcp.ps1send-udp.ps1set-profile.ps1set-timer.ps1set-wallpaper.ps1simulate-matrix.ps1simulate-presence.ps1smart-data2csv.ps1speak-checklist.ps1speak-countdown.ps1speak-danish.ps1speak-dutch.ps1speak-english.ps1speak-file.ps1speak-french.ps1speak-german.ps1speak-italian.ps1speak-latin.ps1speak-polish.ps1speak-portuguese.ps1speak-spanish.ps1speak-swedish.ps1speak-test.ps1speak-text.ps1spell-word.ps1start-calibre-server.ps1start-ipfs-server.ps1switch-branch.ps1switch-shelly1.ps1sync-repo.ps1tell-joke.ps1tell-quote.ps1translate-file.ps1translate-files.ps1translate-text.ps1turn-volume-down.ps1turn-volume-fully-up.ps1turn-volume-off.ps1turn-volume-on.ps1turn-volume-up.ps1upgrade-ubuntu.ps1upload-file.ps1wakeup.ps1weather-report.ps1weather.ps1what-is.ps1write-big.ps1write-braille.ps1write-calendar.ps1write-joke.ps1write-morse-code.ps1write-quote.ps1write-rot13.ps1write-typewriter.ps1write-vertical.ps1
@ -59,6 +59,6 @@ try {
|
|||||||
Start-Process powershell -Verb runAs -ArgumentList "-command & {$command} $arg"
|
Start-Process powershell -Verb runAs -ArgumentList "-command & {$command} $arg"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,6 @@ try {
|
|||||||
"✔️ added to 📄$Path"
|
"✔️ added to 📄$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,6 @@ try {
|
|||||||
|
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,6 @@ try {
|
|||||||
"✔️ built Git repository 📂$RepoDirName in $Elapsed sec"
|
"✔️ built Git repository 📂$RepoDirName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,6 @@ try {
|
|||||||
"✔️ built $FolderCount Git repositories at 📂$ParentDirName in $Elapsed sec"
|
"✔️ built $FolderCount Git repositories at 📂$ParentDirName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
Author: Markus Fleschutz / License: CC0
|
Author: Markus Fleschutz / License: CC0
|
||||||
#>
|
#>
|
||||||
|
|
||||||
function Get-CurrentUserSID { [CmdletBinding()] param()
|
function GetCurrentUserSID { [CmdletBinding()] param()
|
||||||
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
|
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
|
||||||
return ([System.DirectoryServices.AccountManagement.UserPrincipal]::Current).SID.Value
|
return ([System.DirectoryServices.AccountManagement.UserPrincipal]::Current).SID.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$Path = 'C:\$Recycle.Bin\' + "$(Get-CurrentUserSID)"
|
$Path = 'C:\$Recycle.Bin\' + "$(GetCurrentUserSID)"
|
||||||
if (-not(test-path "$Path" -pathType container)) {
|
if (-not(test-path "$Path" -pathType container)) {
|
||||||
throw "Recycle bin folder at 📂$Path doesn't exist (yet)"
|
throw "Recycle bin folder at 📂$Path doesn't exist (yet)"
|
||||||
}
|
}
|
||||||
@ -27,6 +27,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"📂$Path"
|
"📂$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,6 @@ try {
|
|||||||
& "$PSScriptRoot/set-wallpaper.ps1" -ImageFile "$Path"
|
& "$PSScriptRoot/set-wallpaper.ps1" -ImageFile "$Path"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "It's $Weekday, $CurrentDate"
|
& "$PSScriptRoot/give-reply.ps1" "It's $Weekday, $CurrentDate"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "It's $Weekday."
|
& "$PSScriptRoot/give-reply.ps1" "It's $Weekday."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Average domains per second DNS resolution"
|
& "$PSScriptRoot/give-reply.ps1" "$Average domains per second DNS resolution"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "Drive $Drive has $Free GB left ($Total GB total)"
|
& "$PSScriptRoot/give-reply.ps1" "Drive $Drive has $Free GB left ($Total GB total)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "File system on drive $Drive is clean."
|
& "$PSScriptRoot/give-reply.ps1" "File system on drive $Drive is clean."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,6 @@ try {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,6 @@ try {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "The International Space Station is currently at $($ISS.iss_position.longitude)° longitude and $($ISS.iss_position.latitude)° latitude."
|
& "$PSScriptRoot/give-reply.ps1" "The International Space Station is currently at $($ISS.iss_position.longitude)° longitude and $($ISS.iss_position.latitude)° latitude."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ try {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "It's $MonthName."
|
& "$PSScriptRoot/give-reply.ps1" "It's $MonthName."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$($Avg)ms average ping time ($($Min)ms min, $($Max)ms max)"
|
& "$PSScriptRoot/give-reply.ps1" "$($Avg)ms average ping time ($($Min)ms min, $($Max)ms max)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "Saint Nicholas Day is in $($Diff.Days) days."
|
& "$PSScriptRoot/give-reply.ps1" "Saint Nicholas Day is in $($Diff.Days) days."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,6 @@ try {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,6 @@ try {
|
|||||||
"✔️ checked $NumTotal symlinks in 📂$FullPath ($NumBroken are broken) in $Elapsed sec"
|
"✔️ checked $NumTotal symlinks in 📂$FullPath ($NumBroken are broken) in $Elapsed sec"
|
||||||
exit $NumBroken
|
exit $NumBroken
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "It's $($TimeZone.DisplayName)"
|
& "$PSScriptRoot/give-reply.ps1" "It's $($TimeZone.DisplayName)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "It's $CurrentTime"
|
& "$PSScriptRoot/give-reply.ps1" "It's $CurrentTime"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
& "$PSScriptRoot/give-reply.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ try {
|
|||||||
$FoundOne = $true
|
$FoundOne = $true
|
||||||
}
|
}
|
||||||
if (!$FoundOne) { throw "No VPN connection available" }
|
if (!$FoundOne) { throw "No VPN connection available" }
|
||||||
exit 0
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
& "$PSScriptRoot/give-reply.ps1" "Sorry: $($Error[0])."
|
& "$PSScriptRoot/give-reply.ps1" "Sorry: $($Error[0])."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -34,6 +34,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$($Temp)°C, $($Precip)mm rain, $($Humidity)% humidity, $($WindSpeed)km/h wind from $WindDir with $($Clouds)% clouds and $($Visib)km visibility at $Area ($Region)."
|
& "$PSScriptRoot/give-reply.ps1" "$($Temp)°C, $($Precip)mm rain, $($Humidity)% humidity, $($WindSpeed)km/h wind from $WindDir with $($Clouds)% clouds and $($Visib)km visibility at $Area ($Region)."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "It's week #$WeekNo."
|
& "$PSScriptRoot/give-reply.ps1" "It's week #$WeekNo."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "$($WindSpeed)km/h wind from $WindDir at $Area ($Region)."
|
& "$PSScriptRoot/give-reply.ps1" "$($WindSpeed)km/h wind from $WindDir at $Area ($Region)."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
"✔️ checked Windows system files"
|
"✔️ checked Windows system files"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,6 @@ try {
|
|||||||
"✔️ XML file is valid"
|
"✔️ XML file is valid"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ try {
|
|||||||
"✔️ cleaned repo 📂$RepoDirName in $Elapsed sec"
|
"✔️ cleaned repo 📂$RepoDirName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -45,6 +45,6 @@ try {
|
|||||||
"✔️ cleaned $FolderCount Git repositories at 📂$ParentDirName in $Elapsed sec"
|
"✔️ cleaned $FolderCount Git repositories at 📂$ParentDirName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,6 @@ try {
|
|||||||
& "$PSScriptRoot/give-reply.ps1" "It's clean now."
|
& "$PSScriptRoot/give-reply.ps1" "It's clean now."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,6 @@ try {
|
|||||||
"✔️ $Cloned Git repositories cloned, $Skipped skipped in 📂$ParentFolderName in $Elapsed sec"
|
"✔️ $Cloned Git repositories cloned, $Skipped skipped in 📂$ParentFolderName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,6 @@ try {
|
|||||||
$result | Export-Csv $csvfilepath -NoTypeInformation
|
$result | Export-Csv $csvfilepath -NoTypeInformation
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,6 @@ try {
|
|||||||
""
|
""
|
||||||
"*Generated by convert-ps2md.ps1 using the comment-based help of $ScriptName*"
|
"*Generated by convert-ps2md.ps1 using the comment-based help of $ScriptName*"
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,6 @@ try {
|
|||||||
$result | Export-Csv $csvfilepath -NoTypeInformation
|
$result | Export-Csv $csvfilepath -NoTypeInformation
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,6 @@ try {
|
|||||||
$SpeechSynthesizer.Dispose()
|
$SpeechSynthesizer.Dispose()
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -78,6 +78,6 @@ try {
|
|||||||
"✔️ $($Files.Count) photos copied from 📂$SourceDir to 📂$TargetDir in $Elapsed sec"
|
"✔️ $($Files.Count) photos copied from 📂$SourceDir to 📂$TargetDir in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -170,6 +170,6 @@ try {
|
|||||||
"✔️ Done."
|
"✔️ Done."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,6 @@ try {
|
|||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,6 @@ try {
|
|||||||
"✔️ downloaded directory from $URL in $Elapsed sec"
|
"✔️ downloaded directory from $URL in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,6 @@ try {
|
|||||||
"✔️ downloaded file from $URL in $Elapsed sec"
|
"✔️ downloaded file from $URL in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,6 @@ try {
|
|||||||
|
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,6 @@ try {
|
|||||||
"✔️ enabled god mode - see the new desktop icon"
|
"✔️ enabled god mode - see the new desktop icon"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -158,6 +158,6 @@ try {
|
|||||||
"✔️ Done."
|
"✔️ Done."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,6 @@ try {
|
|||||||
"✔️ exported $($Scripts.Count) PowerShell scripts in $Elapsed sec"
|
"✔️ exported $($Scripts.Count) PowerShell scripts in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,6 @@ try {
|
|||||||
"✔️ fetched $NumFolders Git repositories at 📂$ParentDirName in $Elapsed sec"
|
"✔️ fetched $NumFolders Git repositories at 📂$ParentDirName in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,6 @@ try {
|
|||||||
"✔️ MD5 hash is" $Result.Hash
|
"✔️ MD5 hash is" $Result.Hash
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,6 @@ try {
|
|||||||
"✔️ SHA1 hash is" $Result.Hash
|
"✔️ SHA1 hash is" $Result.Hash
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,6 @@ try {
|
|||||||
"✔️ SHA256 hash is:" $Result.Hash
|
"✔️ SHA256 hash is:" $Result.Hash
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,6 @@ try {
|
|||||||
"$text" > "$(GetTempDir)/last_reply_given.txt"
|
"$text" > "$(GetTempDir)/last_reply_given.txt"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,6 @@ try {
|
|||||||
"✔️ Done."
|
"✔️ Done."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,6 @@ try {
|
|||||||
get-childitem $PathToExe | % {$_.VersionInfo} | Select *
|
get-childitem $PathToExe | % {$_.VersionInfo} | Select *
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,6 @@ try {
|
|||||||
"✔️ installed Google Chrome in $Elapsed sec"
|
"✔️ installed Google Chrome in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,6 @@ try {
|
|||||||
"✔️ installed GitHub CLI in $Elapsed sec"
|
"✔️ installed GitHub CLI in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,6 @@ try {
|
|||||||
"✔️ installed Knot Resolver in $Elapsed sec"
|
"✔️ installed Knot Resolver in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,6 @@ try {
|
|||||||
"✔️ installed OBS Studio in $Elapsed sec"
|
"✔️ installed OBS Studio in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -42,6 +42,6 @@ try {
|
|||||||
"✔️ installed signal-cli $Version to /opt and /usr/local/bin in $Elapsed sec"
|
"✔️ installed signal-cli $Version to /opt and /usr/local/bin in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,6 @@ try {
|
|||||||
"✔️ installed SSH client in $Elapsed sec"
|
"✔️ installed SSH client in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,6 @@ try {
|
|||||||
"✔️ installed and started SSH server in $Elapsed sec"
|
"✔️ installed and started SSH server in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,6 @@ try {
|
|||||||
"✔️ installed updates in $Elapsed sec"
|
"✔️ installed updates in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,6 @@ try {
|
|||||||
" NOTE: reboot now, then visit the Microsoft Store and install a Linux distribution (e.g. Ubuntu, openSUSE, SUSE Linux, Kali Linux, Debian, Fedora, Pengwin, or Alpine)"
|
" NOTE: reboot now, then visit the Microsoft Store and install a Linux distribution (e.g. Ubuntu, openSUSE, SUSE Linux, Kali Linux, Debian, Fedora, Pengwin, or Alpine)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,6 @@ try {
|
|||||||
|
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user