diff --git a/docs/add-firewall-rules.md b/docs/add-firewall-rules.md index ca9c652c..df9c6ddb 100644 --- a/docs/add-firewall-rules.md +++ b/docs/add-firewall-rules.md @@ -113,4 +113,4 @@ try { ``` -*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/alert.md b/docs/alert.md index b0d22604..2978bbf1 100644 --- a/docs/alert.md +++ b/docs/alert.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/build-repo.md b/docs/build-repo.md index 2078a317..734f1572 100644 --- a/docs/build-repo.md +++ b/docs/build-repo.md @@ -196,4 +196,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/build-repos.md b/docs/build-repos.md index 7b43d7a5..06f47ae5 100644 --- a/docs/build-repos.md +++ b/docs/build-repos.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-autostart.md b/docs/cd-autostart.md index 6273d810..0db2c1e1 100644 --- a/docs/cd-autostart.md +++ b/docs/cd-autostart.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-crashdumps.md b/docs/cd-crashdumps.md index e5f41f0b..d3c087f1 100644 --- a/docs/cd-crashdumps.md +++ b/docs/cd-crashdumps.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-desktop.md b/docs/cd-desktop.md index 3f08438a..e7b6887d 100644 --- a/docs/cd-desktop.md +++ b/docs/cd-desktop.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-docs.md b/docs/cd-docs.md index 8f25f6c2..40fbd700 100644 --- a/docs/cd-docs.md +++ b/docs/cd-docs.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-downloads.md b/docs/cd-downloads.md index 3c9617d4..1f0d76aa 100644 --- a/docs/cd-downloads.md +++ b/docs/cd-downloads.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-dropbox.md b/docs/cd-dropbox.md index 23c3c485..edd26b70 100644 --- a/docs/cd-dropbox.md +++ b/docs/cd-dropbox.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-etc.md b/docs/cd-etc.md index 4e681104..e96a1d72 100644 --- a/docs/cd-etc.md +++ b/docs/cd-etc.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-fonts.md b/docs/cd-fonts.md index 9c97c91e..50686236 100644 --- a/docs/cd-fonts.md +++ b/docs/cd-fonts.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-home.md b/docs/cd-home.md index f7b8e389..426e7177 100644 --- a/docs/cd-home.md +++ b/docs/cd-home.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-logs.md b/docs/cd-logs.md index d78a82d3..e8ee8971 100644 --- a/docs/cd-logs.md +++ b/docs/cd-logs.md @@ -48,4 +48,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-music.md b/docs/cd-music.md index 6e5a4486..38ff2881 100644 --- a/docs/cd-music.md +++ b/docs/cd-music.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 05/19/2024 10:25:16)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-onedrive.md b/docs/cd-onedrive.md index 0e47c70a..6a2958ca 100644 --- a/docs/cd-onedrive.md +++ b/docs/cd-onedrive.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-pics.md b/docs/cd-pics.md index 82306ed7..df81b170 100644 --- a/docs/cd-pics.md +++ b/docs/cd-pics.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-public.md b/docs/cd-public.md index d2550c52..d56e1bd0 100644 --- a/docs/cd-public.md +++ b/docs/cd-public.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-recent.md b/docs/cd-recent.md new file mode 100644 index 00000000..794a7e00 --- /dev/null +++ b/docs/cd-recent.md @@ -0,0 +1,63 @@ +Script: *cd-recent.ps1* +======================== + +This PowerShell script changes the working directory to the 'recent' folder. + +Parameters +---------- +```powershell +PS> ./cd-recent.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./cd-recent +πŸ“‚C:\Users\Markus\AppData\Roaming\Microsoft\Windows\Recent + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Sets the working directory to the 'recent' folder +.DESCRIPTION + This PowerShell script changes the working directory to the 'recent' folder. +.EXAMPLE + PS> ./cd-recent + πŸ“‚C:\Users\Markus\AppData\Roaming\Microsoft\Windows\Recent +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + $path = [Environment]::GetFolderPath('Recent') + if (-not(Test-Path "$path" -pathType container)) { + throw "Recent folder at πŸ“‚$path doesn't exist (yet)" + } + Set-Location "$path" + "πŸ“‚$path" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of cd-recent.ps1 as of 08/15/2024 09:50:44)* diff --git a/docs/cd-recycle-bin.md b/docs/cd-recycle-bin.md index d1da4792..1f2a8cd7 100644 --- a/docs/cd-recycle-bin.md +++ b/docs/cd-recycle-bin.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-repo.md b/docs/cd-repo.md index c62b82bf..39ba9f0a 100644 --- a/docs/cd-repo.md +++ b/docs/cd-repo.md @@ -1,7 +1,7 @@ Script: *cd-repo.ps1* ======================== -This PowerShell script changes the working directory to a Git repository. +This PowerShell script changes the working directory to a local Git repository. Parameters ---------- @@ -9,7 +9,7 @@ Parameters PS> ./cd-repo.ps1 [[-folderName] ] [] -folderName - Specifies the folder name + Specifies the Git repository's folder name Required? false Position? 1 @@ -26,7 +26,7 @@ Example ------- ```powershell PS> ./cd-repo.ps1 rust -πŸ“‚C:\Repos\rust β€’ on Git branch: ## main ... origin/main +πŸ“‚C:\Repos\rust - current branch is: ## main ... origin/main ``` @@ -45,12 +45,12 @@ Script Content .SYNOPSIS Sets the working directory to a repository .DESCRIPTION - This PowerShell script changes the working directory to a Git repository. + This PowerShell script changes the working directory to a local Git repository. .PARAMETER folderName - Specifies the folder name + Specifies the Git repository's folder name .EXAMPLE PS> ./cd-repo.ps1 rust - πŸ“‚C:\Repos\rust β€’ on Git branch: ## main ... origin/main + πŸ“‚C:\Repos\rust - current branch is: ## main ... origin/main .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -60,7 +60,7 @@ Script Content param([string]$folderName = "") try { - if ("$folderName" -eq "") { $folderName = Read-Host "Enter the folder name" } + if ("$folderName" -eq "") { $folderName = Read-Host "Enter the Git repository's folder name" } if (Test-Path "$HOME/Repos/" -pathType Container) { # try short name $path = "$HOME/Repos/" @@ -80,8 +80,7 @@ try { if (-not(Test-Path "$path" -pathType Container)) { throw "The path to πŸ“‚$path doesn't exist (yet)" } $path = Resolve-Path "$path" Set-Location "$path" - Write-Host "πŸ“‚$path β€’ on Git branch: " -noNewline - + Write-Host "πŸ“‚$path - current branch is: " -noNewline & git status --short --branch --show-stash exit 0 # success } catch { @@ -90,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-repo.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-repo.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-repos.md b/docs/cd-repos.md index fdbf7216..4d584967 100644 --- a/docs/cd-repos.md +++ b/docs/cd-repos.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-root.md b/docs/cd-root.md index 6cfae522..392a2f5d 100644 --- a/docs/cd-root.md +++ b/docs/cd-root.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-screenshots.md b/docs/cd-screenshots.md index 1375d77f..cdf4c656 100644 --- a/docs/cd-screenshots.md +++ b/docs/cd-screenshots.md @@ -55,4 +55,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-scripts.md b/docs/cd-scripts.md index e147b6d3..9ec3cc67 100644 --- a/docs/cd-scripts.md +++ b/docs/cd-scripts.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-ssh.md b/docs/cd-ssh.md index 168319bf..5ff52bdb 100644 --- a/docs/cd-ssh.md +++ b/docs/cd-ssh.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-temp.md b/docs/cd-temp.md index e4ea5395..530192ef 100644 --- a/docs/cd-temp.md +++ b/docs/cd-temp.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-templates.md b/docs/cd-templates.md index a6dc31e4..b13f45c2 100644 --- a/docs/cd-templates.md +++ b/docs/cd-templates.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-trash.md b/docs/cd-trash.md index bb98547a..d3b1657e 100644 --- a/docs/cd-trash.md +++ b/docs/cd-trash.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-up.md b/docs/cd-up.md index 57e5408d..3d980bbe 100644 --- a/docs/cd-up.md +++ b/docs/cd-up.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-up2.md b/docs/cd-up2.md index 8e567601..792e90ef 100644 --- a/docs/cd-up2.md +++ b/docs/cd-up2.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-up3.md b/docs/cd-up3.md index 54480fe4..7a36791f 100644 --- a/docs/cd-up3.md +++ b/docs/cd-up3.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-up4.md b/docs/cd-up4.md index 6360928b..eda5a3b2 100644 --- a/docs/cd-up4.md +++ b/docs/cd-up4.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-users.md b/docs/cd-users.md index 75bc4b52..664f2a59 100644 --- a/docs/cd-users.md +++ b/docs/cd-users.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-videos.md b/docs/cd-videos.md index 043669fb..c24c4269 100644 --- a/docs/cd-videos.md +++ b/docs/cd-videos.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/cd-windows.md b/docs/cd-windows.md index fea64541..48ec307c 100644 --- a/docs/cd-windows.md +++ b/docs/cd-windows.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/change-wallpaper.md b/docs/change-wallpaper.md index a6df013b..64c558aa 100644 --- a/docs/change-wallpaper.md +++ b/docs/change-wallpaper.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-admin.md b/docs/check-admin.md index 86388496..8d5cf476 100644 --- a/docs/check-admin.md +++ b/docs/check-admin.md @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./check-admin.ps1 -βœ… Yes +βœ… Yes, Markus has admin rights. ``` @@ -39,7 +39,7 @@ Script Content This PowerShell script checks if the user has administrator rights. .EXAMPLE PS> ./check-admin.ps1 - βœ… Yes + βœ… Yes, Markus has admin rights. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -53,18 +53,18 @@ try { $user = [Security.Principal.WindowsIdentity]::GetCurrent() $principal = (New-Object Security.Principal.WindowsPrincipal $user) if ($principal.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) { - "βœ… Yes" + "βœ… Yes, $USERNAME has admin rights." } elseif ($principal.IsInRole([Security.Principal.WindowsBuiltinRole]::Guest)) { - "⚠️ No, guest rights only" + "⚠️ No, $USERNAME, has guest rights only." } else { - "⚠️ No, normal user rights only" + "⚠️ No, $USERNAME has normal user rights only." } } - exit 0 # success + exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" - exit 1 + "⚠️ Error: $($Error[0]) (in script line $($_.InvocationInfo.ScriptLineNumber))" + exit 1 } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-admin.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-admin.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-apps.md b/docs/check-apps.md index 82b93d01..735a3b3d 100644 --- a/docs/check-apps.md +++ b/docs/check-apps.md @@ -65,7 +65,7 @@ try { $statusMsg += ", $numUpdates upgrades available" $crashDumps = GetCrashDumps - if ($crashDumps -ne 0) { $statusIcon = "⚠️"; $statusMsg += ", $crashDumps crash dumps found" } + if ($crashDumps -ne 0) { $statusIcon = "⚠️"; $statusMsg += " - found $crashDumps crash dump(s)" } } Write-Host "$statusIcon $statusMsg" exit 0 # success @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-bios.md b/docs/check-bios.md index 28cde924..1fe0a3c0 100644 --- a/docs/check-bios.md +++ b/docs/check-bios.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-cpu.md b/docs/check-cpu.md index d657ae14..5476bc50 100644 --- a/docs/check-cpu.md +++ b/docs/check-cpu.md @@ -61,7 +61,7 @@ function GetCPUTemperature { } try { - Write-Progress "Querying CPU status... " + Write-Progress "Querying CPU status..." $status = "βœ…" $arch = GetCPUArchitecture if ($IsLinux) { @@ -76,24 +76,24 @@ try { $arch = "$arch, " $deviceID = "$($details.DeviceID), " $speed = "$($details.MaxClockSpeed)MHz, " - $socket = "$($details.SocketDesignation) socket, " + $socket = "$($details.SocketDesignation) socket" } $cores = [System.Environment]::ProcessorCount $celsius = GetCPUTemperature if ($celsius -eq 99999.9) { $temp = "no temp" } elseif ($celsius -gt 50) { - $temp = "$($celsius)Β°C" + $temp = "$($celsius)Β°C HOT" $status = "⚠️" } elseif ($celsius -lt 0) { - $temp = "$($celsius)Β°C" + $temp = "$($celsius)Β°C COLD" $status = "⚠️" } else { - $temp = "$($celsius)Β°C" + $temp = "$($celsius)Β°C OK" } Write-Progress -completed "Done." - Write-Host "$status $cpuName ($($arch)$cores cores, $($deviceID)$($speed)$($socket)$temp)" + Write-Host "$status $cpuName ($($arch)$cores cores, $($deviceID)$($speed)$($socket)) - $temp" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-credentials.md b/docs/check-credentials.md index 72ad9a6f..afbf224b 100644 --- a/docs/check-credentials.md +++ b/docs/check-credentials.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-credentials.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-credentials.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-day.md b/docs/check-day.md index 03daa107..e1ad0462 100644 --- a/docs/check-day.md +++ b/docs/check-day.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-dns.md b/docs/check-dns.md index 5d433020..7ad6dae7 100644 --- a/docs/check-dns.md +++ b/docs/check-dns.md @@ -47,7 +47,7 @@ Script Content #> try { - Write-Progress "Measuring DNS resolution..." + #Write-Progress "Measuring DNS resolution..." $table = Import-CSV "$PSScriptRoot/../data/popular-domains.csv" $numRows = $table.Length @@ -59,7 +59,7 @@ try { } [float]$elapsed = $stopWatch.Elapsed.TotalSeconds - Write-Progress -completed " " + #Write-Progress -completed "Measuring DNS resolution..." $average = [math]::round($numRows / $elapsed, 1) if ($average -lt 10.0) { Write-Host "⚠️ DNS resolves $average domains per second only" @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-drive-space.md b/docs/check-drive-space.md index 7103614b..681ef641 100644 --- a/docs/check-drive-space.md +++ b/docs/check-drive-space.md @@ -35,7 +35,7 @@ Example ------- ```powershell PS> ./check-drive-space.ps1 C -βœ… Drive C: has 442GB free (56% of 1TB used) +βœ… Drive C: uses 56% of 1TB - 442GB free ``` @@ -61,7 +61,7 @@ Script Content Specifies the minimum level in bytes (10GB by default) .EXAMPLE PS> ./check-drive-space.ps1 C - βœ… Drive C: has 442GB free (56% of 1TB used) + βœ… Drive C: uses 56% of 1TB - 442GB free .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -101,7 +101,7 @@ try { Write-Host "⚠️ Drive $driveName with $(Bytes2String $total) is nearly full, $(Bytes2String $free) free" } else { [int64]$percent = ($used * 100) / $total - Write-Host "βœ… Drive $driveName has $(Bytes2String $free) free ($percent% of $(Bytes2String $total) used)" + Write-Host "βœ… Drive $driveName uses $percent% of $(Bytes2String $total) - $(Bytes2String $free) free" } exit 0 # success } catch { @@ -110,4 +110,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-drives.md b/docs/check-drives.md index abfb9c10..849c757c 100644 --- a/docs/check-drives.md +++ b/docs/check-drives.md @@ -26,8 +26,8 @@ Example ------- ```powershell PS> ./check-drives.ps1 -βœ… Drive C: has 512GB free (49% of 1TB used) -βœ… Drive D: has 641GB free (84% of 4TB used) +βœ… Drive C: uses 49% of 1TB - 512GB free +βœ… Drive D: uses 84% of 4TB - 641GB free ``` @@ -51,8 +51,8 @@ Script Content Specifies the minimum warning level (10GB by default) .EXAMPLE PS> ./check-drives.ps1 - βœ… Drive C: has 512GB free (49% of 1TB used) - βœ… Drive D: has 641GB free (84% of 4TB used) + βœ… Drive C: uses 49% of 1TB - 512GB free + βœ… Drive D: uses 84% of 4TB - 641GB free .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -90,7 +90,7 @@ try { Write-Host "⚠️ Drive $name with $(Bytes2String $total) is nearly full, $(Bytes2String $free) free" } else { [int64]$percent = ($used * 100) / $total - Write-Host "βœ… Drive $name has $(Bytes2String $free) free ($percent% of $(Bytes2String $total) used)" + Write-Host "βœ… Drive $name uses $percent% of $(Bytes2String $total) - $(Bytes2String $free) free" } } exit 0 # success @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-dusk.md b/docs/check-dusk.md index d57eb639..98023cc4 100644 --- a/docs/check-dusk.md +++ b/docs/check-dusk.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-easter-sunday.md b/docs/check-easter-sunday.md index 3c1839a2..efb8f0eb 100644 --- a/docs/check-easter-sunday.md +++ b/docs/check-easter-sunday.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-file-system.md b/docs/check-file-system.md index 6259b2b4..5a589aef 100644 --- a/docs/check-file-system.md +++ b/docs/check-file-system.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-file.md b/docs/check-file.md index 162b782a..c1064837 100644 --- a/docs/check-file.md +++ b/docs/check-file.md @@ -170,4 +170,4 @@ function Check-Header { param( $path ) Check-Header $Path ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-firewall.md b/docs/check-firewall.md index 8c1fe62b..6c55694f 100644 --- a/docs/check-firewall.md +++ b/docs/check-firewall.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-gpu.md b/docs/check-gpu.md index fc47810e..96ba8a14 100644 --- a/docs/check-gpu.md +++ b/docs/check-gpu.md @@ -24,7 +24,7 @@ Script Content This PowerShell script queries the GPU status and prints it. .EXAMPLE PS> ./check-gpu.ps1 - βœ… NVIDIA Quadro P400 GPU (2GB RAM, 3840x2160 pixels, 32-bit, 59Hz, driver 31.0.15.1740, status OK) + βœ… NVIDIA Quadro P400 GPU (2GB RAM, 3840x2160 pixels, 32-bit, 59Hz, driver 31.0.15.1740) - status OK .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -56,7 +56,7 @@ try { $RefreshRate = $Details.CurrentRefreshRate $DriverVersion = $Details.DriverVersion $Status = $Details.Status - Write-Host "βœ… $Model GPU ($(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $($BitsPerPixel)-bit, $($RefreshRate)Hz, driver $DriverVersion, status $Status)" + Write-Host "βœ… $Model GPU ($(Bytes2String $RAMSize) RAM, $($ResWidth)x$($ResHeight) pixels, $($BitsPerPixel)-bit, $($RefreshRate)Hz, driver $DriverVersion) - status $Status" } exit 0 # success } catch { @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-hardware.md b/docs/check-hardware.md index 797330b2..757b7595 100644 --- a/docs/check-hardware.md +++ b/docs/check-hardware.md @@ -63,4 +63,4 @@ Write-Host "`n H A R D W A R E" -foregroundColor green exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-health.md b/docs/check-health.md index 7578aae5..9b217e0a 100644 --- a/docs/check-health.md +++ b/docs/check-health.md @@ -58,4 +58,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-independence-day.md b/docs/check-independence-day.md index 818b1a8c..83581be2 100644 --- a/docs/check-independence-day.md +++ b/docs/check-independence-day.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 05/19/2024 10:25:17)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-ipv4-address.md b/docs/check-ipv4-address.md index 0c2d472f..4997abcd 100644 --- a/docs/check-ipv4-address.md +++ b/docs/check-ipv4-address.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-ipv6-address.md b/docs/check-ipv6-address.md index 8af7df4e..50d036ed 100644 --- a/docs/check-ipv6-address.md +++ b/docs/check-ipv6-address.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-iss-position.md b/docs/check-iss-position.md index 0444df1e..201e6c9f 100644 --- a/docs/check-iss-position.md +++ b/docs/check-iss-position.md @@ -55,4 +55,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-mac-address.md b/docs/check-mac-address.md index f70f049b..6aa49f37 100644 --- a/docs/check-mac-address.md +++ b/docs/check-mac-address.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-midnight.md b/docs/check-midnight.md index 5ae38f31..5c5f4ee4 100644 --- a/docs/check-midnight.md +++ b/docs/check-midnight.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-month.md b/docs/check-month.md index 9c516398..d50f1ecc 100644 --- a/docs/check-month.md +++ b/docs/check-month.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-moon-phase.md b/docs/check-moon-phase.md index e5273d14..2125b099 100644 --- a/docs/check-moon-phase.md +++ b/docs/check-moon-phase.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-network.md b/docs/check-network.md index cfb6c726..bfe1b072 100644 --- a/docs/check-network.md +++ b/docs/check-network.md @@ -55,13 +55,13 @@ Script Content #> Write-Host "`n N E T W O R K" -foregroundColor green +& "$PSScriptRoot/list-ip-addresses.ps1" & "$PSScriptRoot/ping-remote-hosts.ps1" & "$PSScriptRoot/check-firewall" & "$PSScriptRoot/check-dns.ps1" & "$PSScriptRoot/check-vpn.ps1" -& "$PSScriptRoot/list-public-ip.ps1" & "$PSScriptRoot/ping-local-hosts.ps1" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 08/15/2024 09:50:45)* diff --git a/docs/check-noon.md b/docs/check-noon.md index c27c8977..bf4d6121 100644 --- a/docs/check-noon.md +++ b/docs/check-noon.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-os.md b/docs/check-os.md index 8d0bdfcd..021c8bc9 100644 --- a/docs/check-os.md +++ b/docs/check-os.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-outlook.md b/docs/check-outlook.md index ec33a59f..a8ca2741 100644 --- a/docs/check-outlook.md +++ b/docs/check-outlook.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-password.md b/docs/check-password.md index 25ddbc3d..610be986 100644 --- a/docs/check-password.md +++ b/docs/check-password.md @@ -94,4 +94,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-pending-reboot.md b/docs/check-pending-reboot.md index a341134b..8edb38f0 100644 --- a/docs/check-pending-reboot.md +++ b/docs/check-pending-reboot.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-pnp-devices.md b/docs/check-pnp-devices.md new file mode 100644 index 00000000..698e94c4 --- /dev/null +++ b/docs/check-pnp-devices.md @@ -0,0 +1,68 @@ +Script: *check-pnp-devices.ps1* +======================== + +This PowerShell script checks all Plug'n'PLay devices connected to the local computer. + +Parameters +---------- +```powershell +PS> ./check-pnp-devices.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./check-pnp-devices.ps1 + + + +FriendlyName Status InstanceId +------------ ------ ---------- +Microsoft-Controller OK ROOT\SPACEPORT\0000 +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Checks PnP devices +.DESCRIPTION + This PowerShell script checks all Plug'n'PLay devices connected to the local computer. +.EXAMPLE + PS> ./check-pnp-devices.ps1 + + FriendlyName Status InstanceId + ------------ ------ ---------- + Microsoft-Controller OK ROOT\SPACEPORT\0000 + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Get-PnpDevice | Where-Object {$_.Status -like "Error"} | Format-Table -property FriendlyName,Status,InstanceId + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of check-pnp-devices.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-power.md b/docs/check-power.md index 0d182dac..e3ffc8ee 100644 --- a/docs/check-power.md +++ b/docs/check-power.md @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./check-power.ps1 -⚠️ Battery at 9% Β· 54 min remaining Β· power scheme 'HP Optimized' +⚠️ Battery at 9% with 54min remaining Β· power scheme 'HP Optimized' ``` @@ -39,7 +39,7 @@ Script Content This PowerShell script queries the power status and prints it. .EXAMPLE PS> ./check-power.ps1 - ⚠️ Battery at 9% Β· 54 min remaining Β· power scheme 'HP Optimized' + ⚠️ Battery at 9% with 54min remaining Β· power scheme 'HP Optimized' .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -68,23 +68,23 @@ try { } elseif ($remaining -eq 0) { $reply = "βœ… Battery at $percent%" } elseif ($remaining -le 5) { - $reply = "⚠️ Battery at $percent% Β· ONLY $($remaining)min remaining" + $reply = "⚠️ Battery at $percent% with ONLY $($remaining)min remaining" } elseif ($remaining -le 30) { - $reply = "⚠️ Battery at $percent% Β· only $($remaining)min remaining" + $reply = "⚠️ Battery at $percent% with only $($remaining)min remaining" } elseif ($percent -lt 10) { - $reply = "⚠️ Battery at $percent% Β· $($remaining)min remaining" - } elseif ($percent -ge 60) { - $reply = "βœ… Battery $percent% full Β· $($remaining)min remaining" + $reply = "⚠️ Battery at $percent% with $($remaining)min remaining" + } elseif ($percent -ge 80) { + $reply = "βœ… Battery $percent% full with $($remaining)min remaining" } else { - $reply = "βœ… Battery at $percent% Β· $($remaining)min remaining" + $reply = "βœ… Battery at $percent% with $($remaining)min remaining" } } $powerScheme = (powercfg /getactivescheme) $powerScheme = $powerScheme -Replace "^(.*) \(","" $powerScheme = $powerScheme -Replace "\)$","" - $reply += " Β· power scheme '$powerScheme'" + $reply += ", power scheme is '$powerScheme'" } - Write-Output $reply + Write-Host $reply exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-powershell.md b/docs/check-powershell.md index ad28ba58..195836a0 100644 --- a/docs/check-powershell.md +++ b/docs/check-powershell.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-ps1-file.md b/docs/check-ps1-file.md index ffedb682..d178c323 100644 --- a/docs/check-ps1-file.md +++ b/docs/check-ps1-file.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-ram.md b/docs/check-ram.md index 40c0e37c..57b2324f 100644 --- a/docs/check-ram.md +++ b/docs/check-ram.md @@ -24,7 +24,7 @@ Script Content This PowerShell script queries the status of the installed RAM memory modules and prints it. .EXAMPLE PS> ./check-ram.ps1 - βœ… 16GB DDR4 RAM @ 3200MHz by Micron (in CPU0/CPU0-DIMM3 @ 1.2V) + βœ… 16GB DDR4 RAM at 3200MHz/1.2V in CPU0/CPU0-DIMM3 by Micron .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -88,7 +88,7 @@ try { [float]$Voltage = $Bank.ConfiguredVoltage / 1000.0 $Manufacturer = $Bank.Manufacturer $Location = "$($Bank.BankLabel)/$($Bank.DeviceLocator)" - Write-Host "βœ… $Capacity $Type @ $($Speed)MHz by $Manufacturer (in $Location @ $($Voltage)V)" + Write-Host "βœ… $Capacity $Type at $($Speed)MHz,$($Voltage)V in $Location by $Manufacturer" } } exit 0 # success @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-repo.md b/docs/check-repo.md index b2dca926..a365f130 100644 --- a/docs/check-repo.md +++ b/docs/check-repo.md @@ -27,7 +27,7 @@ Example ```powershell PS> ./check-repo.ps1 C:\MyRepo ⏳ (1/10) Searching for Git executable... git version 2.41.0.windows.3 -⏳ (2/10) Checking local repository... πŸ“‚C:\MyRepo +⏳ (2/10) Checking local repository... C:\MyRepo ⏳ (3/10) Querying remote URL... git@github.com:fleschutz/PowerShell.git ⏳ (4/10) Querying current branch... main ⏳ (5/10) Fetching remote updates... OK @@ -58,7 +58,7 @@ Script Content .EXAMPLE PS> ./check-repo.ps1 C:\MyRepo ⏳ (1/10) Searching for Git executable... git version 2.41.0.windows.3 - ⏳ (2/10) Checking local repository... πŸ“‚C:\MyRepo + ⏳ (2/10) Checking local repository... C:\MyRepo ⏳ (3/10) Querying remote URL... git@github.com:fleschutz/PowerShell.git ⏳ (4/10) Querying current branch... main ⏳ (5/10) Fetching remote updates... OK @@ -83,7 +83,7 @@ try { Write-Host "⏳ (2/10) Checking local repository... " -noNewline $FullPath = Resolve-Path "$pathToRepo" if (!(Test-Path "$FullPath" -pathType Container)) { throw "Can't access folder: $FullPath" } - "πŸ“‚$FullPath" + "$FullPath" Write-Host "⏳ (3/10) Querying remote URL... " -noNewline & git -C "$FullPath" remote get-url origin @@ -121,7 +121,7 @@ try { $repoDirName = (Get-Item "$FullPath").Name [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Checked repo πŸ“‚$repoDirName in $($elapsed)s." + "βœ”οΈ Checked πŸ“‚$repoDirName repo in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -129,4 +129,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-repos.md b/docs/check-repos.md index ec1eb3c7..4624f5c6 100644 --- a/docs/check-repos.md +++ b/docs/check-repos.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-repos.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-repos.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-santa.md b/docs/check-santa.md index 66e16395..9faef17b 100644 --- a/docs/check-santa.md +++ b/docs/check-santa.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-smart-devices.md b/docs/check-smart-devices.md index dfb10a6b..a683d926 100644 --- a/docs/check-smart-devices.md +++ b/docs/check-smart-devices.md @@ -24,7 +24,7 @@ Script Content This PowerShell script queries the status of the SSD/HDD devices (supporting S.M.A.R.T.) and prints it. .EXAMPLE PS> ./check-smart-devices.ps1 - βœ… 1TB Samsung SSD 970 EVO via NVMe (37Β°C, 2388 hours, 289x on/off, v2B2QEXE7, selftest passed) + βœ… 1TB Samsung SSD 970 EVO via NVMe (37Β°C, 2388 hours, 289x on/off, v2B2QEXE7) - selftest OK .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -48,18 +48,18 @@ function Bytes2String([int64]$bytes) { } try { - Write-Progress "(1/3) Searching for smartmontools..." + #Write-Progress "(1/3) Searching for smartmontools..." $result = (smartctl --version) if ($lastExitCode -ne "0") { throw "Can't execute 'smartctl' - make sure smartmontools are installed" } - Write-Progress "(2/3) Scanning S.M.A.R.T devices..." + #Write-Progress "(2/3) Scanning S.M.A.R.T devices..." if ($IsLinux) { $devices = $(sudo smartctl --scan-open) } else { $devices = $(smartctl --scan-open) } - Write-Progress "(3/3) Querying S.M.A.R.T devices..." + #Write-Progress "Querying S.M.A.R.T devices..." foreach($device in $devices) { $array = $device.split(" ") $dev = $array[0] @@ -100,15 +100,15 @@ try { $powerOn = "$($details.power_cycle_count)x on/off" } if ($details.smart_status.passed) { - $selftest = "selftest passed" + $selftest = "selftest OK" } else { $selftest = "selftest FAILED" $status = "⚠️" } $firmwareVersion = $details.firmware_version - Write-Host "$status $capacity$modelName via $protocol ($temp, $hours, $powerOn, $selftest, v$firmwareVersion)" + Write-Host "$status $capacity$modelName via $protocol ($temp, $hours, $powerOn, v$firmwareVersion) - $selftest" } - Write-Progress -completed " " + #Write-Progress -completed "Done." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -116,4 +116,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-software.md b/docs/check-software.md index 41680c03..094e0baf 100644 --- a/docs/check-software.md +++ b/docs/check-software.md @@ -65,4 +65,4 @@ Write-Host "`n S O F T W A R E" -foregroundColor green exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-subnet-mask.md b/docs/check-subnet-mask.md index d06b4464..d5e8935a 100644 --- a/docs/check-subnet-mask.md +++ b/docs/check-subnet-mask.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-swap-space.md b/docs/check-swap-space.md index b1468b52..5bb4585d 100644 --- a/docs/check-swap-space.md +++ b/docs/check-swap-space.md @@ -9,7 +9,7 @@ Parameters PS> ./check-swap-space.ps1 [[-minLevel] ] [] -minLevel - Specifies the minimum level in GB (10 GB by default) + Specifies the minimum level in MB (10 MB by default) Required? false Position? 1 @@ -26,7 +26,7 @@ Example ------- ```powershell PS> ./check-swap-space.ps1 -βœ… Swap space has 748MB free (42% of 1GB used) +βœ… Swap space uses 21% of 1GB - 1005MB free ``` @@ -47,10 +47,10 @@ Script Content .DESCRIPTION This PowerShell script queries the current status of the swap space and prints it. .PARAMETER minLevel - Specifies the minimum level in GB (10 GB by default) + Specifies the minimum level in MB (10 MB by default) .EXAMPLE PS> ./check-swap-space.ps1 - βœ… Swap space has 748MB free (42% of 1GB used) + βœ… Swap space uses 21% of 1GB - 1005MB free .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -60,15 +60,15 @@ Script Content param([int]$minLevel = 10) function MB2String { param([int64]$bytes) - if ($bytes -lt 1000) { return "$($bytes)MB" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)GB" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)TB" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)PB" } - $bytes /= 1000 - if ($bytes -lt 1000) { return "$($bytes)EB" } + if ($bytes -lt 1024) { return "$($bytes)MB" } + $bytes /= 1024 + if ($bytes -lt 1024) { return "$($bytes)GB" } + $bytes /= 1024 + if ($bytes -lt 1024) { return "$($bytes)TB" } + $bytes /= 1024 + if ($bytes -lt 1024) { return "$($bytes)PB" } + $bytes /= 1024 + if ($bytes -lt 1024) { return "$($bytes)EB" } } try { @@ -94,11 +94,11 @@ try { Write-Output "⚠️ Swap space of $(MB2String $total) is full" } elseif ($free -lt $minLevel) { Write-Output "⚠️ Swap space has only $(MB2String $free) of $(MB2String $total) free" - } elseif ($used -lt 5) { - Write-Output "βœ… Swap space has all $(MB2String $free) free" + } elseif ($used -lt 3) { + Write-Output "βœ… Swap space unused - full $(MB2String $free) free" } else { [int64]$percent = ($used * 100) / $total - Write-Output "βœ… Swap space has $(MB2String $free) free ($percent% of $(MB2String $total) used)" + Write-Output "βœ… Swap space at $percent% of $(MB2String $total) - $(MB2String $free) free" } exit 0 # success } catch { @@ -107,4 +107,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-symlinks.md b/docs/check-symlinks.md index f79ab220..ccbd7d8d 100644 --- a/docs/check-symlinks.md +++ b/docs/check-symlinks.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-time-zone.md b/docs/check-time-zone.md index 12cea36a..879fc4e1 100644 --- a/docs/check-time-zone.md +++ b/docs/check-time-zone.md @@ -1,7 +1,7 @@ Script: *check-time-zone.ps1* ======================== -This PowerShell script queries the time zone and prints it. +This PowerShell script queries the local time zone and prints it. Parameters ---------- @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./check-time-zone.ps1 -βœ… 11:13 AM W. Europe Summer Time (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna (+01:00 DST) +βœ… 3:27 PM in W. Europe Summer Time (UTC+01:00:00 +1h DST) ``` @@ -36,10 +36,10 @@ Script Content .SYNOPSIS Checks the time zone .DESCRIPTION - This PowerShell script queries the time zone and prints it. + This PowerShell script queries the local time zone and prints it. .EXAMPLE PS> ./check-time-zone.ps1 - βœ… 11:13 AM W. Europe Summer Time (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna (+01:00 DST) + βœ… 3:27 PM in W. Europe Summer Time (UTC+01:00:00 +1h DST) .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -50,14 +50,15 @@ try { [system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US" $Time = $((Get-Date).ToShortTimeString()) $TZ = (Get-Timezone) + $offset = $TZ.BaseUtcOffset if ($TZ.SupportsDaylightSavingTime) { $TZName = $TZ.DaylightName - $DST=" (+01:00 DST)" + $DST=" +1h DST" } else { $TZName = $TZ.StandardName $DST="" } - Write-Host "βœ… $Time $TZName $($TZ.DisplayName)$($DST)" + Write-Host "βœ… $Time in $TZName (UTC+$($offset)$($DST))" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -65,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-uptime.md b/docs/check-uptime.md index df672fab..5ab5f6a6 100644 --- a/docs/check-uptime.md +++ b/docs/check-uptime.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-vpn.md b/docs/check-vpn.md index 646ec37b..d9a39801 100644 --- a/docs/check-vpn.md +++ b/docs/check-vpn.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-weather.md b/docs/check-weather.md index 4e213a6a..58d8f0d3 100644 --- a/docs/check-weather.md +++ b/docs/check-weather.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-week.md b/docs/check-week.md index b4c67a9e..874d792c 100644 --- a/docs/check-week.md +++ b/docs/check-week.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-wind.md b/docs/check-wind.md index 839ea8f9..3acc5267 100644 --- a/docs/check-wind.md +++ b/docs/check-wind.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-windows-system-files.md b/docs/check-windows-system-files.md index 24294fad..d11e64cd 100644 --- a/docs/check-windows-system-files.md +++ b/docs/check-windows-system-files.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-xml-file.md b/docs/check-xml-file.md index dd40bfae..ea9d3193 100644 --- a/docs/check-xml-file.md +++ b/docs/check-xml-file.md @@ -85,4 +85,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/check-xml-files.md b/docs/check-xml-files.md index 6d7246fa..5f62ade8 100644 --- a/docs/check-xml-files.md +++ b/docs/check-xml-files.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-files.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-files.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/clean-repo.md b/docs/clean-repo.md index 21d76fdb..ce7f08ee 100644 --- a/docs/clean-repo.md +++ b/docs/clean-repo.md @@ -7,10 +7,10 @@ NOTE: To be used with care! This cannot be undone! Parameters ---------- ```powershell -PS> ./clean-repo.ps1 [[-pathToRepo] ] [] +PS> ./clean-repo.ps1 [[-path] ] [] --pathToRepo - Specifies the file path to the local Git repository +-path + Specifies the file path to the local Git repository (current working directory by default) Required? false Position? 1 @@ -26,12 +26,12 @@ PS> ./clean-repo.ps1 [[-pathToRepo] ] [] Example ------- ```powershell -PS> ./clean-repo.ps1 C:\rust -⏳ (1/4) Searching for Git executable... git version 2.41.0.windows.3 -⏳ (2/4) Checking local repository... πŸ“‚C:\rust +PS> ./clean-repo.ps1 C:\Repos\rust +⏳ (1/4) Searching for Git executable... git version 2.45.0 +⏳ (2/4) Checking local repository... C:\Repos\rust ⏳ (3/4) Removing untracked files in repository... ⏳ (4/4) Removing untracked files in submodules... -βœ”οΈ Repo πŸ“‚rust is clean now (took 1s). +βœ”οΈ Cleaned up πŸ“‚rust repository in 2s. ``` @@ -52,22 +52,22 @@ Script Content .DESCRIPTION This PowerShell script deletes all untracked files and folders in a local Git repository (including submodules). NOTE: To be used with care! This cannot be undone! -.PARAMETER pathToRepo - Specifies the file path to the local Git repository +.PARAMETER path + Specifies the file path to the local Git repository (current working directory by default) .EXAMPLE - PS> ./clean-repo.ps1 C:\rust - ⏳ (1/4) Searching for Git executable... git version 2.41.0.windows.3 - ⏳ (2/4) Checking local repository... πŸ“‚C:\rust + PS> ./clean-repo.ps1 C:\Repos\rust + ⏳ (1/4) Searching for Git executable... git version 2.45.0 + ⏳ (2/4) Checking local repository... C:\Repos\rust ⏳ (3/4) Removing untracked files in repository... ⏳ (4/4) Removing untracked files in submodules... - βœ”οΈ Repo πŸ“‚rust is clean now (took 1s). + βœ”οΈ Cleaned up πŸ“‚rust repository in 2s. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$pathToRepo = "$PWD") +param([string]$path = "$PWD") try { $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -76,24 +76,24 @@ try { & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - "⏳ (2/4) Checking local repository... πŸ“‚$pathToRepo" - if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder '$pathToRepo' - maybe a typo or missing folder permissions?" } - $repoName = (Get-Item "$pathToRepo").Name + "⏳ (2/4) Checking local repository... $path" + if (-not(Test-Path "$path" -pathType container)) { throw "Can't access repo folder '$path' - maybe a typo or missing folder permissions?" } + $repoName = (Get-Item "$path").Name "⏳ (3/4) Removing untracked files in repository..." - & git -C "$pathToRepo" clean -xfd -f # to delete all untracked files in the main repo + & git -C "$path" clean -xfd -f # to delete all untracked files in the main repo if ($lastExitCode -ne "0") { Write-Warning "'git clean' failed with exit code $lastExitCode, retrying once..." - & git -C "$pathToRepo" clean -xfd -f + & git -C "$path" clean -xfd -f if ($lastExitCode -ne "0") { throw "'git clean' failed with exit code $lastExitCode" } } "⏳ (4/4) Removing untracked files in submodules..." - & git -C "$pathToRepo" submodule foreach --recursive git clean -xfd -f # to delete all untracked files in the submodules + & git -C "$path" submodule foreach --recursive git clean -xfd -f # to delete all untracked files in the submodules if ($lastExitCode -ne "0") { throw "'git clean' in the submodules failed with exit code $lastExitCode" } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Repo πŸ“‚$repoName is clean now (took $($elapsed)s)." + "βœ”οΈ Cleaned up πŸ“‚$repoName repository in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 05/19/2024 10:25:18)* +*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/clean-repos.md b/docs/clean-repos.md index 40d70c56..d24b25e1 100644 --- a/docs/clean-repos.md +++ b/docs/clean-repos.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/clear-dns-cache.md b/docs/clear-dns-cache.md index d9ad01d0..f49aa34a 100644 --- a/docs/clear-dns-cache.md +++ b/docs/clear-dns-cache.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/clear-recycle-bin.md b/docs/clear-recycle-bin.md index bf6e73b8..1c39e1ea 100644 --- a/docs/clear-recycle-bin.md +++ b/docs/clear-recycle-bin.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/clone-repos.md b/docs/clone-repos.md index c278736e..85365d39 100644 --- a/docs/clone-repos.md +++ b/docs/clone-repos.md @@ -27,7 +27,7 @@ Example ```powershell PS> ./clone-repos C:\MyRepos ... -βœ”οΈ Cloned 29 of 29 Git repos into πŸ“‚MyRepos in 123 sec +βœ”οΈ Cloned 29 additional Git repos into πŸ“‚MyRepos in 123s. ``` @@ -52,7 +52,7 @@ Script Content .EXAMPLE PS> ./clone-repos C:\MyRepos ... - βœ”οΈ Cloned 29 of 29 Git repos into πŸ“‚MyRepos in 123 sec + βœ”οΈ Cloned 29 additional Git repos into πŸ“‚MyRepos in 123s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -64,17 +64,17 @@ param([string]$targetDir = "$PWD") try { $stopWatch = [system.diagnostics.stopwatch]::startNew() - Write-Host "⏳ (1) Searching for Git executable... " -noNewline + Write-Host "⏳ (1) Searching for Git executable... " -noNewline & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2) Reading data/popular-repositories.csv... " -noNewline - $table = Import-CSV "$PSScriptRoot/../data/popular-repositories.csv" + Write-Host "⏳ (2) Reading data/popular-repos.csv... " -noNewline + $table = Import-CSV "$PSScriptRoot/../data/popular-repos.csv" $total = $table.count Write-Host "$total repos" $targetDirName = (Get-Item "$targetDir").Name - Write-Host "⏳ (3) Checking target folder... πŸ“‚$targetDirName" + Write-Host "⏳ (3) Checking target folder... πŸ“‚$targetDirName" if (-not(Test-Path "$targetDir" -pathType container)) { throw "Can't access directory: $targetDir" } [int]$step = 3 @@ -89,22 +89,22 @@ try { $step++ if (Test-Path "$targetDir/$folderName" -pathType container) { - "⏳ ($step/$($total + 4)) Skipping existing πŸ“‚$folderName (a $category)..." + "⏳ ($step/$($total + 3)) Skipping πŸ“‚$folderName - the $category exists already..." $skipped++ } elseif ($shallow -eq "yes") { - "⏳ ($step/$($total + 4)) Cloning into πŸ“‚$folderName (a $category, $branch branch, shallow)..." + "⏳ ($step/$($total + 3)) Cloning into πŸ“‚$folderName (a $category, $branch branch, shallow)..." & git clone --branch "$branch" --single-branch --recurse-submodules "$URL" "$targetDir/$folderName" if ($lastExitCode -ne "0") { throw "'git clone --branch $branch $URL' failed with exit code $lastExitCode" } $cloned++ } else { - "⏳ ($step/$($total + 4)) Cloning into πŸ“‚$folderName (a $category, $branch branch, full history)..." + "⏳ ($step/$($total + 3)) Cloning into πŸ“‚$folderName (a $category, $branch branch, full history)..." & git clone --branch "$branch" --recurse-submodules "$URL" "$targetDir/$folderName" if ($lastExitCode -ne "0") { throw "'git clone --branch $branch $URL' failed with exit code $lastExitCode" } $clone++ } } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Cloned $cloned of $total Git repos into πŸ“‚$targetDirName in $elapsed sec" + "βœ”οΈ Cloned $cloned additional Git repos into πŸ“‚$targetDirName in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -112,4 +112,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/clone-shallow.md b/docs/clone-shallow.md new file mode 100644 index 00000000..60d20abb --- /dev/null +++ b/docs/clone-shallow.md @@ -0,0 +1,77 @@ +Script: *clone-shallow.ps1* +======================== + +This PowerShell script clones popular Git repositories into a common target directory. + +Parameters +---------- +```powershell +PS> ./clone-shallow.ps1 [[-targetDir] ] [] + +-targetDir + Specifies the file path to the target directory (current working directory by default) + + Required? false + Position? 1 + Default value "$PWD" + Accept pipeline input? false + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./clone-shallow C:\MyRepos + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Clones a shallow Git repo +.DESCRIPTION + This PowerShell script clones popular Git repositories into a common target directory. +.PARAMETER URL +.PARAMETER branchName +.PARAMETER targetDir + Specifies the file path to the target directory (current working directory by default) +.EXAMPLE + PS> ./clone-shallow C:\MyRepos +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$targetDir = "$PWD") + +try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $ git clone --branch $branchName --single-branch --depth 1 --recurse-submodules $URL $targetDir + + + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ”οΈ Cloned the shallow repository in $elapsed sec" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of clone-shallow.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-calculator.md b/docs/close-calculator.md index c87ab72d..a3ecd4af 100644 --- a/docs/close-calculator.md +++ b/docs/close-calculator.md @@ -48,4 +48,4 @@ Stop-Process -name "CalculatorApp" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-chrome.md b/docs/close-chrome.md index aed900ef..ad3a0a2e 100644 --- a/docs/close-chrome.md +++ b/docs/close-chrome.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-cortana.md b/docs/close-cortana.md index 2b61f3a9..40c8d57e 100644 --- a/docs/close-cortana.md +++ b/docs/close-cortana.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-edge.md b/docs/close-edge.md index 28471c63..78143b8c 100644 --- a/docs/close-edge.md +++ b/docs/close-edge.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-file-explorer.md b/docs/close-file-explorer.md index 58ef4a9c..f21f662c 100644 --- a/docs/close-file-explorer.md +++ b/docs/close-file-explorer.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-firefox.md b/docs/close-firefox.md index 224a2618..aa07e762 100644 --- a/docs/close-firefox.md +++ b/docs/close-firefox.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-git-extensions.md b/docs/close-git-extensions.md index 9916c5c9..6cb31cd4 100644 --- a/docs/close-git-extensions.md +++ b/docs/close-git-extensions.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-magnifier.md b/docs/close-magnifier.md index e6dc3413..e012777b 100644 --- a/docs/close-magnifier.md +++ b/docs/close-magnifier.md @@ -48,4 +48,4 @@ tskill magnify exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-microsoft-paint.md b/docs/close-microsoft-paint.md index c35e8f71..5fe97151 100644 --- a/docs/close-microsoft-paint.md +++ b/docs/close-microsoft-paint.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-paint.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-paint.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-microsoft-store.md b/docs/close-microsoft-store.md index ce53dfc4..84608be9 100644 --- a/docs/close-microsoft-store.md +++ b/docs/close-microsoft-store.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-store.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-store.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-netflix.md b/docs/close-netflix.md index 2df67f28..cffe9e41 100644 --- a/docs/close-netflix.md +++ b/docs/close-netflix.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-netflix.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-netflix.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-notepad.md b/docs/close-notepad.md new file mode 100644 index 00000000..0dcc12dc --- /dev/null +++ b/docs/close-notepad.md @@ -0,0 +1,51 @@ +Script: *close-notepad.ps1* +======================== + +This PowerShell script closes the Notepad application gracefully. + +Parameters +---------- +```powershell +PS> ./close-notepad.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./close-notepad.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Closes the Notepad app +.DESCRIPTION + This PowerShell script closes the Notepad application gracefully. +.EXAMPLE + PS> ./close-notepad.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +& "$PSScriptRoot/close-program.ps1" "Notepad" "notepad" "notepad" +exit 0 # success +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of close-notepad.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-obs-studio.md b/docs/close-obs-studio.md index 69904747..acdecf3b 100644 --- a/docs/close-obs-studio.md +++ b/docs/close-obs-studio.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-obs-studio.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-obs-studio.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-one-calendar.md b/docs/close-one-calendar.md index ea5a69de..eda5f60c 100644 --- a/docs/close-one-calendar.md +++ b/docs/close-one-calendar.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-one-calendar.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-one-calendar.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-outlook.md b/docs/close-outlook.md index 631925f1..caad40f0 100644 --- a/docs/close-outlook.md +++ b/docs/close-outlook.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-outlook.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-outlook.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-paint-three-d.md b/docs/close-paint-three-d.md index 9724f820..921274f0 100644 --- a/docs/close-paint-three-d.md +++ b/docs/close-paint-three-d.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-paint-three-d.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-paint-three-d.ps1 as of 08/15/2024 09:50:46)* diff --git a/docs/close-program.md b/docs/close-program.md index 0dd7cbf9..a85938ab 100644 --- a/docs/close-program.md +++ b/docs/close-program.md @@ -6,9 +6,9 @@ This PowerShell script closes a program's processes gracefully. Parameters ---------- ```powershell -PS> ./close-program.ps1 [[-FullProgramName] ] [[-ProgramName] ] [[-ProgramAliasName] ] [] +PS> ./close-program.ps1 [[-fullProgramName] ] [[-programName] ] [[-programAliasName] ] [] --FullProgramName +-fullProgramName Specifies the full program name Required? false @@ -17,7 +17,7 @@ PS> ./close-program.ps1 [[-FullProgramName] ] [[-ProgramName] ] Accept pipeline input? false Accept wildcard characters? false --ProgramName +-programName Specifies the program name Required? false @@ -26,7 +26,7 @@ PS> ./close-program.ps1 [[-FullProgramName] ] [[-ProgramName] ] Accept pipeline input? false Accept wildcard characters? false --ProgramAliasName +-programAliasName Specifies the program alias name Required? false @@ -60,14 +60,14 @@ Script Content ```powershell <# .SYNOPSIS - Closes a program's processes + Closes a program .DESCRIPTION This PowerShell script closes a program's processes gracefully. -.PARAMETER FullProgramName +.PARAMETER fullProgramName Specifies the full program name -.PARAMETER ProgramName +.PARAMETER programName Specifies the program name -.PARAMETER ProgramAliasName +.PARAMETER programAliasName Specifies the program alias name .EXAMPLE PS> ./close-program "Google Chrome" "chrome.exe" @@ -77,39 +77,39 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$FullProgramName = "", [string]$ProgramName = "", [string]$ProgramAliasName = "") +param([string]$fullProgramName = "", [string]$programName = "", [string]$programAliasName = "") try { - if ($ProgramName -eq "") { - get-process | where-object {$_.mainWindowTitle} | format-table Id, Name, mainWindowtitle -AutoSize - $ProgramName = read-host "Enter program name" + if ($programName -eq "") { + Get-Process | where-object {$_.mainWindowTitle} | format-table Id, Name, mainWindowtitle -AutoSize + $programName = Read-Host "Enter the program name" } - if ($FullProgramName -eq "") { - $FullProgramName = $ProgramName + if ($fullProgramName -eq "") { + $fullProgramName = $programName } - $Processes = get-process -name $ProgramName -errorAction 'silentlycontinue' - if ($Processes.Count -ne 0) { - foreach ($Process in $Processes) { - $Process.CloseMainWindow() | Out-Null + $processes = Get-Process -name $programName -errorAction 'silentlycontinue' + if ($processes.Count -ne 0) { + foreach ($process in $processes) { + $process.CloseMainWindow() | Out-Null } Start-Sleep -milliseconds 100 - stop-process -name $ProgramName -force -errorAction 'silentlycontinue' + Stop-Process -name $programName -force -errorAction 'silentlycontinue' } else { - $Processes = get-process -name $ProgramAliasName -errorAction 'silentlycontinue' - if ($Processes.Count -eq 0) { - throw "$FullProgramName isn't running" + $processes = Get-Process -name $programAliasName -errorAction 'silentlycontinue' + if ($processes.Count -eq 0) { + throw "$fullProgramName isn't running" } - foreach ($Process in $Processes) { + foreach ($process in $processes) { $_.CloseMainWindow() | Out-Null } Start-Sleep -milliseconds 100 - stop-process -name $ProgramName -force -errorAction 'silentlycontinue' + Stop-Process -name $programName -force -errorAction 'silentlycontinue' } - if ($($Processes.Count) -eq 1) { - "βœ”οΈ $FullProgramName closed, 1 process stopped" + if ($($processes.Count) -eq 1) { + "βœ”οΈ $fullProgramName closed." } else { - "βœ”οΈ $FullProgramName closed, $($Processes.Count) processes stopped" + "βœ”οΈ $fullProgramName closed and $($processes.Count) processes stopped." } exit 0 # success } catch { @@ -118,4 +118,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-program.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-program.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-serenade.md b/docs/close-serenade.md index 42a03eb7..199ab430 100644 --- a/docs/close-serenade.md +++ b/docs/close-serenade.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-serenade.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-serenade.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-snipping-tool.md b/docs/close-snipping-tool.md index f2e50753..2a2eb08a 100644 --- a/docs/close-snipping-tool.md +++ b/docs/close-snipping-tool.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-snipping-tool.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-snipping-tool.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-spotify.md b/docs/close-spotify.md index 10038566..c3319bf9 100644 --- a/docs/close-spotify.md +++ b/docs/close-spotify.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-spotify.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-spotify.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-task-manager.md b/docs/close-task-manager.md index cb09f6c6..1e863355 100644 --- a/docs/close-task-manager.md +++ b/docs/close-task-manager.md @@ -48,4 +48,4 @@ tskill taskmgr exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-task-manager.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-task-manager.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-three-d-viewer.md b/docs/close-three-d-viewer.md index c39ec233..0189eba9 100644 --- a/docs/close-three-d-viewer.md +++ b/docs/close-three-d-viewer.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-three-d-viewer.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-three-d-viewer.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-thunderbird.md b/docs/close-thunderbird.md index e8eaaeb7..d58c6d5f 100644 --- a/docs/close-thunderbird.md +++ b/docs/close-thunderbird.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-thunderbird.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-thunderbird.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-visual-studio.md b/docs/close-visual-studio.md index 9f0e061a..6ab3b720 100644 --- a/docs/close-visual-studio.md +++ b/docs/close-visual-studio.md @@ -52,4 +52,4 @@ if ($lastExitCode -ne "0") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-visual-studio.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-visual-studio.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-vlc.md b/docs/close-vlc.md index b5bf2b39..6acf528a 100644 --- a/docs/close-vlc.md +++ b/docs/close-vlc.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-vlc.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-vlc.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/close-windows-terminal.md b/docs/close-windows-terminal.md index 3edcea51..d2cb5c05 100644 --- a/docs/close-windows-terminal.md +++ b/docs/close-windows-terminal.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-windows-terminal.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-windows-terminal.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/configure-git.md b/docs/configure-git.md index 7cf76c3e..1dee7c7f 100644 --- a/docs/configure-git.md +++ b/docs/configure-git.md @@ -144,4 +144,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of configure-git.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of configure-git.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/connect-vpn.md b/docs/connect-vpn.md index 0af9198c..2600d0af 100644 --- a/docs/connect-vpn.md +++ b/docs/connect-vpn.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of connect-vpn.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of connect-vpn.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-csv2txt.md b/docs/convert-csv2txt.md index a2e53e6e..a36384a0 100644 --- a/docs/convert-csv2txt.md +++ b/docs/convert-csv2txt.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-csv2txt.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-csv2txt.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-dir2zip.md b/docs/convert-dir2zip.md new file mode 100644 index 00000000..164c5ac5 --- /dev/null +++ b/docs/convert-dir2zip.md @@ -0,0 +1,91 @@ +Script: *convert-dir2zip.ps1* +======================== + +This PowerShell script creates a new compressed .ZIP file from a directory (including subfolders). + +Parameters +---------- +```powershell +PS> ./convert-dir2zip.ps1 [[-dirPath] ] [[-zipPath] ] [] + +-dirPath + Specifies the path to the directory + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +-zipPath + Specifies the path to the target .ZIP file (default is dirPath.zip) + + Required? false + Position? 2 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./convert-dir2zip.ps1 C:\Windows Win.zip +βœ”οΈ Converted into compressed Win.zip in 291s. + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Converts a directory into a compressed .ZIP file +.DESCRIPTION + This PowerShell script creates a new compressed .ZIP file from a directory (including subfolders). +.PARAMETER dirPath + Specifies the path to the directory +.PARAMETER zipPath + Specifies the path to the target .ZIP file (default is dirPath.zip) +.EXAMPLE + PS> ./convert-dir2zip.ps1 C:\Windows Win.zip + βœ”οΈ Converted into compressed Win.zip in 291s. +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$dirPath = "", [string]$zipPath = "") + +try { + if ($dirPath -eq "" ) { $dirPath = Read-Host "Enter the path to the folder" } + + $StopWatch = [system.diagnostics.stopwatch]::startNew() + $dirPath = Resolve-Path $dirPath + if ($zipPath -eq "" ) { $zipPath = "$dirPath.zip" } + + Compress-Archive -path $dirPath -destinationPath $zipPath + + [int]$elapsed = $StopWatch.Elapsed.TotalSeconds + "βœ”οΈ Converted into compressed $zipPath in $($elapsed)s." + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of convert-dir2zip.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-docx2md.md b/docs/convert-docx2md.md index 71b50a68..c741f076 100644 --- a/docs/convert-docx2md.md +++ b/docs/convert-docx2md.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-docx2md.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-docx2md.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-frames2mp4.md b/docs/convert-frames2mp4.md index bc90cd5c..c06c500e 100644 --- a/docs/convert-frames2mp4.md +++ b/docs/convert-frames2mp4.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-frames2mp4.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-frames2mp4.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-image2ascii.md b/docs/convert-image2ascii.md index b8f1892f..324eed5a 100644 --- a/docs/convert-image2ascii.md +++ b/docs/convert-image2ascii.md @@ -114,4 +114,4 @@ Script Content } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2ascii.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2ascii.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-image2blurred-frames.md b/docs/convert-image2blurred-frames.md index 9eb240eb..30f82c56 100644 --- a/docs/convert-image2blurred-frames.md +++ b/docs/convert-image2blurred-frames.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2blurred-frames.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2blurred-frames.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-image2pixelated-frames.md b/docs/convert-image2pixelated-frames.md index 0da17dcb..27a01426 100644 --- a/docs/convert-image2pixelated-frames.md +++ b/docs/convert-image2pixelated-frames.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2pixelated-frames.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2pixelated-frames.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-md2docx.md b/docs/convert-md2docx.md index 7fb92c95..bf5e87fd 100644 --- a/docs/convert-md2docx.md +++ b/docs/convert-md2docx.md @@ -22,4 +22,4 @@ Script Content gci -r -i *.md |foreach{$docx=$_.directoryname+"\"+$_.basename+".docx";pandoc -f markdown -s --citeproc $_.name -o $docx} ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2docx.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2docx.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-md2html.md b/docs/convert-md2html.md index 84e5f4d2..40f462ef 100644 --- a/docs/convert-md2html.md +++ b/docs/convert-md2html.md @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2html.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2html.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-md2pdf.md b/docs/convert-md2pdf.md index 27c7da22..44d5a68a 100644 --- a/docs/convert-md2pdf.md +++ b/docs/convert-md2pdf.md @@ -20,4 +20,4 @@ Script Content gci -r -i *.md |foreach{$pdf=$_.directoryname+"\"+$_.basename+".pdf";pandoc -f markdown -s --citeproc $_.name -o $pdf} ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2pdf.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2pdf.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-mysql2csv.md b/docs/convert-mysql2csv.md index 293a2328..5d0cc1ec 100644 --- a/docs/convert-mysql2csv.md +++ b/docs/convert-mysql2csv.md @@ -119,4 +119,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-mysql2csv.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-mysql2csv.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-ps2bat.md b/docs/convert-ps2bat.md index 1b8b503e..b087c67a 100644 --- a/docs/convert-ps2bat.md +++ b/docs/convert-ps2bat.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2bat.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2bat.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-ps2md.md b/docs/convert-ps2md.md index 1382f3f1..f715eda0 100644 --- a/docs/convert-ps2md.md +++ b/docs/convert-ps2md.md @@ -185,4 +185,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2md.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2md.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-sql2csv.md b/docs/convert-sql2csv.md index 5da397c0..c6bab983 100644 --- a/docs/convert-sql2csv.md +++ b/docs/convert-sql2csv.md @@ -120,4 +120,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-sql2csv.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-sql2csv.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/convert-txt2wav.md b/docs/convert-txt2wav.md index 53f78942..48c5b036 100644 --- a/docs/convert-txt2wav.md +++ b/docs/convert-txt2wav.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-txt2wav.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-txt2wav.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/copy-photos-sorted.md b/docs/copy-photos-sorted.md index 875d136a..27a19bca 100644 --- a/docs/copy-photos-sorted.md +++ b/docs/copy-photos-sorted.md @@ -21,15 +21,15 @@ Script Content .SYNOPSIS Copy photos sorted by year and month .DESCRIPTION - This PowerShell script copies image files from sourceDir to targetDir sorted by year and month. + This PowerShell script copies image files from to sorted by year and month. .PARAMETER sourceDir Specifies the path to the source folder .PARAMTER targetDir Specifies the path to the target folder .EXAMPLE PS> ./copy-photos-sorted.ps1 D:\iPhone\DCIM C:\MyPhotos - ⏳ Copying IMG_20230903_134445.jpg to C:\MyPhotos\2023\09 SEP\... - βœ”οΈ Copied 1 photo to πŸ“‚C:\MyPhotos in 41 sec + ⏳ Copying IMG_20240903_134445.jpg to C:\MyPhotos\2024\09 SEP\... + βœ”οΈ Copied 1 photo (0 skipped) to πŸ“‚C:\MyPhotos in 41s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -58,12 +58,13 @@ function CopyFile { param([string]$sourcePath, [string]$targetDir, [int]$date, [ $TargetPath = "$targetDir/$year/$monthDir/$filename" if (Test-Path "$TargetPath" -pathType leaf) { Write-Host "⏳ Skipping existing $targetDir\$year\$monthDir\$filename..." - } else { - Write-Host "⏳ Copying $filename to $targetDir\$year\$monthDir\..." - New-Item -path "$targetDir" -name "$year" -itemType "directory" -force | out-null - New-Item -path "$targetDir/$year" -name "$monthDir" -itemType "directory" -force | out-null - Copy-Item "$sourcePath" "$TargetPath" -force + return 1 } + Write-Host "⏳ Copying $filename to $targetDir\$year\$monthDir\..." + New-Item -path "$targetDir" -name "$year" -itemType "directory" -force | out-null + New-Item -path "$targetDir/$year" -name "$monthDir" -itemType "directory" -force | out-null + Copy-Item "$sourcePath" "$TargetPath" -force + return 0 } try { @@ -78,32 +79,35 @@ try { Write-Host "⏳ Checking target directory πŸ“‚$($targetDir)..." if (-not(Test-Path "$targetDir" -pathType container)) { throw "Can't access target directory: $targetDir" } + [int]$skipped = 0 foreach($file in $files) { $filename = (Get-Item "$file").Name if ("$filename" -like "IMG_*_*.jpg") { - $Array = $filename.split("_") - CopyFile "$file" "$targetDir" $Array[1] "$filename" + $array = $filename.split("_") + $skipped += CopyFile "$file" "$targetDir" $array[1] "$filename" } elseif ("$filename" -like "IMG-*-*.jpg") { - $Array = $filename.split("-") - CopyFile "$file" "$targetDir" $Array[1] "$filename" + $array = $filename.split("-") + $skipped += CopyFile "$file" "$targetDir" $array[1] "$filename" } elseif ("$filename" -like "PANO_*_*.jpg") { - $Array = $filename.split("_") - CopyFile "$file" "$targetDir" $Array[1] "$filename" + $array = $filename.split("_") + $skipped += CopyFile "$file" "$targetDir" $array[1] "$filename" } elseif ("$filename" -like "PANO-*-*.jpg") { - $Array = $filename.split("-") - CopyFile "$file" "$targetDir" $Array[1] "$filename" + $array = $filename.split("-") + $skipped += CopyFile "$file" "$targetDir" $array[1] "$filename" } elseif ("$filename" -like "SAVE_*_*.jpg") { - $Array = $filename.split("_") - CopyFile "$file" "$targetDir" $Array[1] "$filename" + $array = $filename.split("_") + $skipped += CopyFile "$file" "$targetDir" $array[1] "$filename" } elseif ("$filename" -like "PXL_*_*.jpg") { - $Array = $filename.split("_") - CopyFile "$file" "$targetDir" $Array[1] "$filename" + $array = $filename.split("_") + $skipped += CopyFile "$file" "$targetDir" $array[1] "$filename" } else { Write-Host "⏳ Skipping $filename with unknown filename format..." + $skipped++ } } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Copied $($files.Count) photos to πŸ“‚$targetDir in $elapsed sec" + [int]$copied = $files.Count - $skipped + "βœ”οΈ Copied $copied photos ($skipped skipped) to πŸ“‚$targetDir in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -111,4 +115,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of copy-photos-sorted.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of copy-photos-sorted.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/count-characters.md b/docs/count-characters.md index d73ec924..a386828f 100644 --- a/docs/count-characters.md +++ b/docs/count-characters.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of count-characters.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of count-characters.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/count-lines.md b/docs/count-lines.md index 220d790e..74fa9d8c 100644 --- a/docs/count-lines.md +++ b/docs/count-lines.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of count-lines.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of count-lines.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/decrypt-file.md b/docs/decrypt-file.md index 3a980d9a..b06db7ad 100644 --- a/docs/decrypt-file.md +++ b/docs/decrypt-file.md @@ -197,4 +197,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of decrypt-file.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of decrypt-file.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/disable-ipv6.md b/docs/disable-ipv6.md index 85448299..24bb868b 100644 --- a/docs/disable-ipv6.md +++ b/docs/disable-ipv6.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of disable-ipv6.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of disable-ipv6.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/disconnect-vpn.md b/docs/disconnect-vpn.md index 45bfc2b0..d3775f92 100644 --- a/docs/disconnect-vpn.md +++ b/docs/disconnect-vpn.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of disconnect-vpn.ps1 as of 05/19/2024 10:25:19)* +*(generated by convert-ps2md.ps1 using the comment-based help of disconnect-vpn.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/download-dir.md b/docs/download-dir.md index e502a9e0..d5ac55d8 100644 --- a/docs/download-dir.md +++ b/docs/download-dir.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of download-dir.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of download-dir.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/download-file.md b/docs/download-file.md index fb57c4d9..4b630755 100644 --- a/docs/download-file.md +++ b/docs/download-file.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of download-file.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of download-file.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/edit.md b/docs/edit.md index 8abef8f3..818efc00 100644 --- a/docs/edit.md +++ b/docs/edit.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of edit.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of edit.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/enable-crash-dumps.md b/docs/enable-crash-dumps.md index 2f3920fa..f908a47c 100644 --- a/docs/enable-crash-dumps.md +++ b/docs/enable-crash-dumps.md @@ -330,4 +330,4 @@ Else exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enable-crash-dumps.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-crash-dumps.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/enable-god-mode.md b/docs/enable-god-mode.md index 1968e793..64097ce0 100644 --- a/docs/enable-god-mode.md +++ b/docs/enable-god-mode.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enable-god-mode.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-god-mode.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/enable-ipv6.md b/docs/enable-ipv6.md index 5fcfb068..ab139788 100644 --- a/docs/enable-ipv6.md +++ b/docs/enable-ipv6.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enable-ipv6.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-ipv6.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/encrypt-file.md b/docs/encrypt-file.md index 24305905..4a67a4fa 100644 --- a/docs/encrypt-file.md +++ b/docs/encrypt-file.md @@ -182,4 +182,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of encrypt-file.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of encrypt-file.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/enter-chat.md b/docs/enter-chat.md index 923cab5b..90d7a6cf 100644 --- a/docs/enter-chat.md +++ b/docs/enter-chat.md @@ -125,4 +125,4 @@ function Get-ChatChannel } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of enter-chat.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of enter-chat.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/export-to-manuals.md b/docs/export-to-manuals.md index ced28305..27365157 100644 --- a/docs/export-to-manuals.md +++ b/docs/export-to-manuals.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of export-to-manuals.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of export-to-manuals.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/fetch-repo.md b/docs/fetch-repo.md index fa6d4a2e..39856a2a 100644 --- a/docs/fetch-repo.md +++ b/docs/fetch-repo.md @@ -1,15 +1,14 @@ Script: *fetch-repo.ps1* ======================== -This PowerShell script fetches the latest updates into a local Git repository (including submodules). +This PowerShell script fetches remote updates into a local Git repository (including submodules). Parameters ---------- ```powershell -PS> ./fetch-repo.ps1 [[-RepoDir] ] [] +PS> ./fetch-repo.ps1 [[-pathToRepo] ] [] --RepoDir - Specifies the file path to the local Git repository (default is working directory). +-pathToRepo Required? false Position? 1 @@ -25,11 +24,11 @@ PS> ./fetch-repo.ps1 [[-RepoDir] ] [] Example ------- ```powershell -PS> ./fetch-repo.ps1 C:\MyRepo +PS> ./fetch-repo.ps1 ⏳ (1/3) Searching for Git executable... git version 2.41.0.windows.3 -⏳ (2/3) Checking local repository... +⏳ (2/3) Checking local repository... C:\Repos\rust ⏳ (3/3) Fetching updates... -βœ”οΈ Fetched updates into repo πŸ“‚MyRepo (took 2 sec) +βœ”οΈ Fetched updates into πŸ“‚rust repo in 2s. ``` @@ -46,42 +45,42 @@ Script Content ```powershell <# .SYNOPSIS - Fetches Git repository updates + Fetches updates into a Git repo .DESCRIPTION - This PowerShell script fetches the latest updates into a local Git repository (including submodules). + This PowerShell script fetches remote updates into a local Git repository (including submodules). .PARAMETER RepoDir Specifies the file path to the local Git repository (default is working directory). .EXAMPLE - PS> ./fetch-repo.ps1 C:\MyRepo + PS> ./fetch-repo.ps1 ⏳ (1/3) Searching for Git executable... git version 2.41.0.windows.3 - ⏳ (2/3) Checking local repository... + ⏳ (2/3) Checking local repository... C:\Repos\rust ⏳ (3/3) Fetching updates... - βœ”οΈ Fetched updates into repo πŸ“‚MyRepo (took 2 sec) + βœ”οΈ Fetched updates into πŸ“‚rust repo in 2s. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$RepoDir = "$PWD") +param([string]$pathToRepo = "$PWD") try { - $StopWatch = [system.diagnostics.stopwatch]::startNew() + $stopWatch = [system.diagnostics.stopwatch]::startNew() Write-Host "⏳ (1/3) Searching for Git executable... " -noNewline & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/3) Checking local repository..." - if (!(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder: $RepoDir" } - $RepoDirName = (Get-Item "$RepoDir").Name + Write-Host "⏳ (2/3) Checking local repository... $pathToRepo" + if (!(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access folder: $pathToRepo" } + $repoDirName = (Get-Item "$pathToRepo").Name Write-Host "⏳ (3/3) Fetching updates..." - & git -C "$RepoDir" fetch --all --recurse-submodules --tags --prune --prune-tags --force --quiet + & git -C "$pathToRepo" fetch --all --recurse-submodules --tags --prune --prune-tags --force --quiet if ($lastExitCode -ne "0") { throw "'git fetch --all' failed with exit code $lastExitCode" } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "βœ”οΈ Fetched updates into repo πŸ“‚$RepoDirName (took $Elapsed sec)" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ”οΈ Fetched updates into πŸ“‚$repoDirName repo in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -89,4 +88,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repo.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repo.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/fetch-repos.md b/docs/fetch-repos.md index e5e796e3..639c3ff7 100644 --- a/docs/fetch-repos.md +++ b/docs/fetch-repos.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repos.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repos.ps1 as of 08/15/2024 09:50:47)* diff --git a/docs/firefox-installer.md b/docs/firefox-installer.md index a0f582f4..ebe7e212 100644 --- a/docs/firefox-installer.md +++ b/docs/firefox-installer.md @@ -64,4 +64,4 @@ try { ``` -*(generated by convert-ps2md.ps1 using the comment-based help of firefox-installer.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of firefox-installer.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/get-md5.md b/docs/get-md5.md index c2265018..97638c62 100644 --- a/docs/get-md5.md +++ b/docs/get-md5.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of get-md5.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-md5.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/get-sha1.md b/docs/get-sha1.md index 200cfe47..841f2978 100644 --- a/docs/get-sha1.md +++ b/docs/get-sha1.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of get-sha1.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-sha1.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/get-sha256.md b/docs/get-sha256.md index c10802f3..0cb653b5 100644 --- a/docs/get-sha256.md +++ b/docs/get-sha256.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of get-sha256.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-sha256.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/hibernate.md b/docs/hibernate.md index e2bdb6b1..1b4864e4 100644 --- a/docs/hibernate.md +++ b/docs/hibernate.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of hibernate.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of hibernate.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/import-vm.md b/docs/import-vm.md index 0d081b20..8c6a82f4 100644 --- a/docs/import-vm.md +++ b/docs/import-vm.md @@ -23,4 +23,4 @@ Start-VM $VMName exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of import-vm.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of import-vm.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/inspect-exe.md b/docs/inspect-exe.md index 0dff64b9..a0b9e21a 100644 --- a/docs/inspect-exe.md +++ b/docs/inspect-exe.md @@ -68,4 +68,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of inspect-exe.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of inspect-exe.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-audacity.md b/docs/install-audacity.md index 9839d821..5413b56e 100644 --- a/docs/install-audacity.md +++ b/docs/install-audacity.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-audacity.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-audacity.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-basic-apps.md b/docs/install-basic-apps.md index d48c1868..b6b1b82a 100644 --- a/docs/install-basic-apps.md +++ b/docs/install-basic-apps.md @@ -93,4 +93,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-apps.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-apps.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-basic-snaps.md b/docs/install-basic-snaps.md index b09bc540..2764cea6 100644 --- a/docs/install-basic-snaps.md +++ b/docs/install-basic-snaps.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-snaps.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-snaps.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-calibre-server.md b/docs/install-calibre-server.md index 5b626097..7275740d 100644 --- a/docs/install-calibre-server.md +++ b/docs/install-calibre-server.md @@ -119,4 +119,4 @@ exit 1 } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-calibre-server.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-calibre-server.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-chocolatey.md b/docs/install-chocolatey.md index 42cf3ee7..30ed6256 100644 --- a/docs/install-chocolatey.md +++ b/docs/install-chocolatey.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-chocolatey.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-chocolatey.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-chrome.md b/docs/install-chrome.md index 6434bc89..bddb6014 100644 --- a/docs/install-chrome.md +++ b/docs/install-chrome.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-chrome.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-chrome.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-crystal-disk-info.md b/docs/install-crystal-disk-info.md index 00b1661f..8e8b3f56 100644 --- a/docs/install-crystal-disk-info.md +++ b/docs/install-crystal-disk-info.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-info.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-info.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-crystal-disk-mark.md b/docs/install-crystal-disk-mark.md index 87584904..bf58c8bf 100644 --- a/docs/install-crystal-disk-mark.md +++ b/docs/install-crystal-disk-mark.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-mark.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-mark.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-discord.md b/docs/install-discord.md index 56bb15c9..f596a4bb 100644 --- a/docs/install-discord.md +++ b/docs/install-discord.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-discord.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-discord.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-edge.md b/docs/install-edge.md index 97744490..fdff7e91 100644 --- a/docs/install-edge.md +++ b/docs/install-edge.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-edge.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-edge.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-evcc.md b/docs/install-evcc.md index a237c227..224cd6e3 100644 --- a/docs/install-evcc.md +++ b/docs/install-evcc.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-evcc.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-evcc.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-firefox.md b/docs/install-firefox.md index cb945e9e..52aa2b71 100644 --- a/docs/install-firefox.md +++ b/docs/install-firefox.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-firefox.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-firefox.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-git-extensions.md b/docs/install-git-extensions.md index d4677c17..48e56959 100644 --- a/docs/install-git-extensions.md +++ b/docs/install-git-extensions.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-git-extensions.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-git-extensions.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-git-for-windows.md b/docs/install-git-for-windows.md index 18cee1ca..c46f03dc 100644 --- a/docs/install-git-for-windows.md +++ b/docs/install-git-for-windows.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-git-for-windows.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-git-for-windows.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-github-cli.md b/docs/install-github-cli.md index 8dfcd22c..39387d4d 100644 --- a/docs/install-github-cli.md +++ b/docs/install-github-cli.md @@ -68,4 +68,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-github-cli.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-github-cli.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-irfanview.md b/docs/install-irfanview.md index 446724d2..77172f7a 100644 --- a/docs/install-irfanview.md +++ b/docs/install-irfanview.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-irfanview.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-irfanview.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-knot-resolver.md b/docs/install-knot-resolver.md index bb1dfbfa..94eb6cad 100644 --- a/docs/install-knot-resolver.md +++ b/docs/install-knot-resolver.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-knot-resolver.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-knot-resolver.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-microsoft-teams.md b/docs/install-microsoft-teams.md index e8693094..5516370b 100644 --- a/docs/install-microsoft-teams.md +++ b/docs/install-microsoft-teams.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-microsoft-teams.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-microsoft-teams.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-netflix.md b/docs/install-netflix.md index 4bb16f78..533df130 100644 --- a/docs/install-netflix.md +++ b/docs/install-netflix.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-netflix.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-netflix.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-nine-zip.md b/docs/install-nine-zip.md index 77c061b1..e8b95a42 100644 --- a/docs/install-nine-zip.md +++ b/docs/install-nine-zip.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-nine-zip.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-nine-zip.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-obs-studio.md b/docs/install-obs-studio.md index fc6b1b33..a6a338b9 100644 --- a/docs/install-obs-studio.md +++ b/docs/install-obs-studio.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-obs-studio.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-obs-studio.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-octoprint.md b/docs/install-octoprint.md index 3ef1fb8a..472702ec 100644 --- a/docs/install-octoprint.md +++ b/docs/install-octoprint.md @@ -32,4 +32,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-octoprint.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-octoprint.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-one-calendar.md b/docs/install-one-calendar.md index d7f19d22..b80bba09 100644 --- a/docs/install-one-calendar.md +++ b/docs/install-one-calendar.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-one-calendar.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-one-calendar.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-opera-browser.md b/docs/install-opera-browser.md index 3fe45b2e..9423f8da 100644 --- a/docs/install-opera-browser.md +++ b/docs/install-opera-browser.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-browser.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-browser.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-opera-gx.md b/docs/install-opera-gx.md index be965960..eab162b4 100644 --- a/docs/install-opera-gx.md +++ b/docs/install-opera-gx.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-gx.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-gx.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-paint-3d.md b/docs/install-paint-3d.md index 94bf0d11..ebcd4fbb 100644 --- a/docs/install-paint-3d.md +++ b/docs/install-paint-3d.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-paint-3d.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-paint-3d.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-power-toys.md b/docs/install-power-toys.md index 9f863379..5ac30460 100644 --- a/docs/install-power-toys.md +++ b/docs/install-power-toys.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-power-toys.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-power-toys.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-powershell.md b/docs/install-powershell.md index 6cb4fc93..1c66b56e 100644 --- a/docs/install-powershell.md +++ b/docs/install-powershell.md @@ -635,4 +635,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-powershell.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-powershell.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-rufus.md b/docs/install-rufus.md index 38266c15..8f3c65cb 100644 --- a/docs/install-rufus.md +++ b/docs/install-rufus.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-rufus.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-rufus.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-salesforce-cli.md b/docs/install-salesforce-cli.md new file mode 100644 index 00000000..bbe3dda4 --- /dev/null +++ b/docs/install-salesforce-cli.md @@ -0,0 +1,73 @@ +Script: *install-salesforce-cli.ps1* +======================== + +This PowerShell script downloads and installs the Salesforce CLI on Windows. + +Parameters +---------- +```powershell +PS> ./install-salesforce-cli.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./install-salesforce-cli.ps1 +(The Salesforce CLI installer will be downloaded and run.) + +``` + +Notes +----- +Author: Gavin R. McDavitt + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Installs the Salesforce CLI (sfdx). +.DESCRIPTION + This PowerShell script downloads and installs the Salesforce CLI on Windows. +.EXAMPLE + PS> ./install-salesforce-cli.ps1 + (The Salesforce CLI installer will be downloaded and run.) +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Gavin R. McDavitt +#> + +try { + # Define the URL of the Salesforce CLI installer + $url = "https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-x64.exe" + + # Define the output path for the downloaded installer + $output = "$env:USERPROFILE\Downloads\sfdx-windows-x64.exe" + + # Download the installer + Invoke-WebRequest -Uri $url -OutFile $output + + # Run the installer + Start-Process -FilePath $output -ArgumentList "/silent" -Wait + + # Verify the installation + sfdx --version + Write-Output "Salesforce CLI installed successfully." + + exit 0 # success +} catch { + Write-Output "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of install-salesforce-cli.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-signal-cli.md b/docs/install-signal-cli.md index 59c35ad0..c8c519ef 100644 --- a/docs/install-signal-cli.md +++ b/docs/install-signal-cli.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-signal-cli.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-signal-cli.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-skype.md b/docs/install-skype.md index a9903fb6..ec369bb8 100644 --- a/docs/install-skype.md +++ b/docs/install-skype.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-skype.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-skype.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-spotify.md b/docs/install-spotify.md index 302fdbb9..eaaa7718 100644 --- a/docs/install-spotify.md +++ b/docs/install-spotify.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-spotify.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-spotify.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-ssh-client.md b/docs/install-ssh-client.md index 240ee279..dcaa55df 100644 --- a/docs/install-ssh-client.md +++ b/docs/install-ssh-client.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-client.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-client.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-ssh-server.md b/docs/install-ssh-server.md index a0b49ed2..876a5732 100644 --- a/docs/install-ssh-server.md +++ b/docs/install-ssh-server.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-server.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-server.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-thunderbird.md b/docs/install-thunderbird.md index 3dcd0dc1..e25e2088 100644 --- a/docs/install-thunderbird.md +++ b/docs/install-thunderbird.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-thunderbird.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-thunderbird.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-twitter.md b/docs/install-twitter.md index ba0af957..7cf40a97 100644 --- a/docs/install-twitter.md +++ b/docs/install-twitter.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-twitter.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-twitter.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-unbound-server.md b/docs/install-unbound-server.md index 037d73f2..f8f9e7f3 100644 --- a/docs/install-unbound-server.md +++ b/docs/install-unbound-server.md @@ -99,4 +99,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-unbound-server.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-unbound-server.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-updates.md b/docs/install-updates.md index 817f0797..760b116d 100644 --- a/docs/install-updates.md +++ b/docs/install-updates.md @@ -110,4 +110,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-updates.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-updates.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-visual-studio-code.md b/docs/install-visual-studio-code.md index 1e2f9715..00f286e2 100644 --- a/docs/install-visual-studio-code.md +++ b/docs/install-visual-studio-code.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-visual-studio-code.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-visual-studio-code.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-vivaldi.md b/docs/install-vivaldi.md index 3057f218..e55c4629 100644 --- a/docs/install-vivaldi.md +++ b/docs/install-vivaldi.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-vivaldi.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-vivaldi.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-vlc.md b/docs/install-vlc.md index c83716c1..fcb38cf2 100644 --- a/docs/install-vlc.md +++ b/docs/install-vlc.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-vlc.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-vlc.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-windows-terminal.md b/docs/install-windows-terminal.md index 22d9888c..0fdbe7ea 100644 --- a/docs/install-windows-terminal.md +++ b/docs/install-windows-terminal.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-windows-terminal.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-windows-terminal.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-wsl.md b/docs/install-wsl.md index 274132c3..8f223a92 100644 --- a/docs/install-wsl.md +++ b/docs/install-wsl.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-wsl.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-wsl.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/install-zoom.md b/docs/install-zoom.md index 27342a89..d7f48c7e 100644 --- a/docs/install-zoom.md +++ b/docs/install-zoom.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-zoom.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-zoom.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/introduce-powershell.md b/docs/introduce-powershell.md index ddcd4bac..95a7dc23 100644 --- a/docs/introduce-powershell.md +++ b/docs/introduce-powershell.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-aliases.md b/docs/list-aliases.md index a42dd5e2..ec223c6c 100644 --- a/docs/list-aliases.md +++ b/docs/list-aliases.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-aliases.ps1 as of 05/19/2024 10:25:20)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-aliases.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-anagrams.md b/docs/list-anagrams.md index 932514e3..9dfe5f2e 100644 --- a/docs/list-anagrams.md +++ b/docs/list-anagrams.md @@ -120,4 +120,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-anagrams.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-anagrams.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-apps.md b/docs/list-apps.md index 55ddfe97..67cea4c3 100644 --- a/docs/list-apps.md +++ b/docs/list-apps.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-apps.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-apps.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-ascii-table.md b/docs/list-ascii-table.md index 60a5388e..d5a31f7d 100644 --- a/docs/list-ascii-table.md +++ b/docs/list-ascii-table.md @@ -120,4 +120,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-ascii-table.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ascii-table.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-automatic-variables.md b/docs/list-automatic-variables.md index 2f359bab..2cd44a6a 100644 --- a/docs/list-automatic-variables.md +++ b/docs/list-automatic-variables.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-automatic-variables.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-automatic-variables.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-battery-status.md b/docs/list-battery-status.md index ac402194..7418d619 100644 --- a/docs/list-battery-status.md +++ b/docs/list-battery-status.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-battery-status.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-battery-status.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-bios.md b/docs/list-bios.md index c3f16e4e..be8a96d7 100644 --- a/docs/list-bios.md +++ b/docs/list-bios.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-bios.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-bios.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-bluetooth-devices.md b/docs/list-bluetooth-devices.md index fe62ecfa..2ceaf0ba 100644 --- a/docs/list-bluetooth-devices.md +++ b/docs/list-bluetooth-devices.md @@ -1,7 +1,7 @@ Script: *list-bluetooth-devices.ps1* ======================== -This PowerShell script lists all Bluetooth devices connected to the computer. +This PowerShell script lists all Bluetooth devices connected to the local computer. Parameters ---------- @@ -20,9 +20,9 @@ PS> ./list-bluetooth-devices.ps1 -Status Class FriendlyName InstanceId ------- ----- ------------ ---------- -OK Bluetooth Realtek Bluetooth 5.3 Adapter USB\VID_... +FriendlyName Status InstanceId +------------ ------ ---------- +G3 Headset OK BTHENUM\DEV_FC58FA7A51C6\8&152049BE&0&BLUETOOTHDEVICE_FC58FA7A51C6 ... ``` @@ -42,13 +42,13 @@ Script Content .SYNOPSIS Lists Bluetooth devices .DESCRIPTION - This PowerShell script lists all Bluetooth devices connected to the computer. + This PowerShell script lists all Bluetooth devices connected to the local computer. .EXAMPLE PS> ./list-bluetooth-devices.ps1 - Status Class FriendlyName InstanceId - ------ ----- ------------ ---------- - OK Bluetooth Realtek Bluetooth 5.3 Adapter USB\VID_... + FriendlyName Status InstanceId + ------------ ------ ---------- + G3 Headset OK BTHENUM\DEV_FC58FA7A51C6\8&152049BE&0&BLUETOOTHDEVICE_FC58FA7A51C6 ... .LINK https://github.com/fleschutz/PowerShell @@ -57,7 +57,7 @@ Script Content #> try { - Get-PnpDevice | Where-Object {$_.Class -eq "Bluetooth"} + Get-PnpDevice | Where-Object {$_.Class -eq "Bluetooth"} | Sort-Object -property FriendlyName | Format-Table -property FriendlyName,Status,InstanceId exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-bluetooth-devices.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-bluetooth-devices.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-branches.md b/docs/list-branches.md index 23c7a097..f0dc7c4a 100644 --- a/docs/list-branches.md +++ b/docs/list-branches.md @@ -107,4 +107,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-branches.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-branches.ps1 as of 08/15/2024 09:50:48)* diff --git a/docs/list-calendar.md b/docs/list-calendar.md index f385e5d2..4ff44ead 100644 --- a/docs/list-calendar.md +++ b/docs/list-calendar.md @@ -244,4 +244,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-calendar.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-calendar.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-cheat-sheet.md b/docs/list-cheat-sheet.md index f06359c7..b56b2c62 100644 --- a/docs/list-cheat-sheet.md +++ b/docs/list-cheat-sheet.md @@ -75,4 +75,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cheat-sheet.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cheat-sheet.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-city-weather.md b/docs/list-city-weather.md index 689b977e..fabf7bfa 100644 --- a/docs/list-city-weather.md +++ b/docs/list-city-weather.md @@ -51,4 +51,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-city-weather.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-city-weather.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-cli-tools.md b/docs/list-cli-tools.md index 0ed9ce7c..84d52379 100644 --- a/docs/list-cli-tools.md +++ b/docs/list-cli-tools.md @@ -358,4 +358,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cli-tools.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cli-tools.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-clipboard.md b/docs/list-clipboard.md index 55ac3ad0..f12230e7 100644 --- a/docs/list-clipboard.md +++ b/docs/list-clipboard.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-clipboard.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-clipboard.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-cmdlets.md b/docs/list-cmdlets.md index ca0a0cac..03747d2b 100644 --- a/docs/list-cmdlets.md +++ b/docs/list-cmdlets.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cmdlets.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cmdlets.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-coffee-prices.md b/docs/list-coffee-prices.md index 4c3a3c6c..2f6e0c64 100644 --- a/docs/list-coffee-prices.md +++ b/docs/list-coffee-prices.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-coffee-prices.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-coffee-prices.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-commit-stats.md b/docs/list-commit-stats.md index b55aa9a9..4b915591 100644 --- a/docs/list-commit-stats.md +++ b/docs/list-commit-stats.md @@ -93,4 +93,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-commit-stats.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-commit-stats.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-commits.md b/docs/list-commits.md index 15b94804..ab37b3f4 100644 --- a/docs/list-commits.md +++ b/docs/list-commits.md @@ -121,4 +121,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-commits.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-commits.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-console-colors.md b/docs/list-console-colors.md index 58af8891..8932d81e 100644 --- a/docs/list-console-colors.md +++ b/docs/list-console-colors.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-console-colors.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-console-colors.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-countries.md b/docs/list-countries.md index a7e53ca5..f6663b63 100644 --- a/docs/list-countries.md +++ b/docs/list-countries.md @@ -52,4 +52,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-countries.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-countries.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-cpu.md b/docs/list-cpu.md index 77a78d6b..7a9daa05 100644 --- a/docs/list-cpu.md +++ b/docs/list-cpu.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cpu.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cpu.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-credits.md b/docs/list-credits.md index 73935704..a3b93b4a 100644 --- a/docs/list-credits.md +++ b/docs/list-credits.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-credits.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-credits.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-crypto-rates.md b/docs/list-crypto-rates.md index fe9edb00..ef0cb53e 100644 --- a/docs/list-crypto-rates.md +++ b/docs/list-crypto-rates.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-crypto-rates.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-crypto-rates.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-defender-settings.md b/docs/list-defender-settings.md index 6550db8b..c1993445 100644 --- a/docs/list-defender-settings.md +++ b/docs/list-defender-settings.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-defender-settings.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-defender-settings.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-dir-tree.md b/docs/list-dir-tree.md index ab54774d..cf82393e 100644 --- a/docs/list-dir-tree.md +++ b/docs/list-dir-tree.md @@ -122,4 +122,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-dir-tree.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-dir-tree.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-dns-servers.md b/docs/list-dns-servers.md index 222288e6..06ca55d8 100644 --- a/docs/list-dns-servers.md +++ b/docs/list-dns-servers.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-dns-servers.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-dns-servers.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-drives.md b/docs/list-drives.md index dd2702d6..8b96ca36 100644 --- a/docs/list-drives.md +++ b/docs/list-drives.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-drives.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-drives.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-earthquakes.md b/docs/list-earthquakes.md index b5b6b852..d9776ca8 100644 --- a/docs/list-earthquakes.md +++ b/docs/list-earthquakes.md @@ -93,4 +93,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-earthquakes.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-earthquakes.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-emojis.md b/docs/list-emojis.md index 280caa74..cdc9bd52 100644 --- a/docs/list-emojis.md +++ b/docs/list-emojis.md @@ -72,4 +72,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-emojis.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-emojis.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-empty-dirs.md b/docs/list-empty-dirs.md index b7c31001..60f38634 100644 --- a/docs/list-empty-dirs.md +++ b/docs/list-empty-dirs.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-dirs.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-dirs.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-empty-files.md b/docs/list-empty-files.md index b37fc8b5..bc609adb 100644 --- a/docs/list-empty-files.md +++ b/docs/list-empty-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-files.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-files.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-encrypted-files.md b/docs/list-encrypted-files.md index 91ca589f..88b20597 100644 --- a/docs/list-encrypted-files.md +++ b/docs/list-encrypted-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-encrypted-files.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-encrypted-files.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-environment-variables.md b/docs/list-environment-variables.md index 29ff1643..67c4052f 100644 --- a/docs/list-environment-variables.md +++ b/docs/list-environment-variables.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-environment-variables.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-environment-variables.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-error-types.md b/docs/list-error-types.md index 2d98f7a2..70a77289 100644 --- a/docs/list-error-types.md +++ b/docs/list-error-types.md @@ -26,4 +26,4 @@ Script Content } | Select BaseType,Name,FullName ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-error-types.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-error-types.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-exchange-rates.md b/docs/list-exchange-rates.md index 650eec76..29f784a2 100644 --- a/docs/list-exchange-rates.md +++ b/docs/list-exchange-rates.md @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-exchange-rates.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-exchange-rates.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-executables.md b/docs/list-executables.md index 6dc3c026..2a121f37 100644 --- a/docs/list-executables.md +++ b/docs/list-executables.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-executables.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-executables.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-fibonacci.md b/docs/list-fibonacci.md index 8d4fe4c0..da9ee2bf 100644 --- a/docs/list-fibonacci.md +++ b/docs/list-fibonacci.md @@ -43,4 +43,4 @@ foreach ($i in 0..100) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-fibonacci.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fibonacci.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-files.md b/docs/list-files.md index f6fee035..b79d3dd6 100644 --- a/docs/list-files.md +++ b/docs/list-files.md @@ -68,4 +68,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-files.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-files.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-folder.md b/docs/list-folder.md index a7b0bc72..7cb60fa2 100644 --- a/docs/list-folder.md +++ b/docs/list-folder.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-folder.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-folder.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-fritzbox-calls.md b/docs/list-fritzbox-calls.md index 3adb5ea2..88d88c9a 100644 --- a/docs/list-fritzbox-calls.md +++ b/docs/list-fritzbox-calls.md @@ -153,4 +153,4 @@ echo $Result exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-calls.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-calls.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-fritzbox-devices.md b/docs/list-fritzbox-devices.md index 4660d7b5..c5de803c 100644 --- a/docs/list-fritzbox-devices.md +++ b/docs/list-fritzbox-devices.md @@ -105,4 +105,4 @@ $HostTable | format-table -property Active,IPAddress,MACAddress,HostName,Interfa exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-devices.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-devices.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-headlines.md b/docs/list-headlines.md index e0265ac2..cb4b77d4 100644 --- a/docs/list-headlines.md +++ b/docs/list-headlines.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-headlines.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-headlines.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-hidden-files.md b/docs/list-hidden-files.md index 5d685e08..b3e4d9ac 100644 --- a/docs/list-hidden-files.md +++ b/docs/list-hidden-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-installed-languages.md b/docs/list-installed-languages.md index 39d5331b..3fbc2e16 100644 --- a/docs/list-installed-languages.md +++ b/docs/list-installed-languages.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-languages.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-languages.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-installed-scripts.md b/docs/list-installed-scripts.md index a1560914..b3d62302 100644 --- a/docs/list-installed-scripts.md +++ b/docs/list-installed-scripts.md @@ -48,4 +48,4 @@ Get-InstalledScript exit # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-scripts.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-scripts.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-installed-software.md b/docs/list-installed-software.md index db2bd1d6..5b18e39b 100644 --- a/docs/list-installed-software.md +++ b/docs/list-installed-software.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-software.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-software.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-ip-addresses.md b/docs/list-ip-addresses.md new file mode 100644 index 00000000..d25e768d --- /dev/null +++ b/docs/list-ip-addresses.md @@ -0,0 +1,81 @@ +Script: *list-ip-addresses.ps1* +======================== + +list-ip-addresses.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists the IP addresses +.DESCRIPTION + This PowerShell script queries all IP address information and prints it. +.EXAMPLE + PS> ./list-ip-addresses.ps1 + βœ… Public IP 185.72.229.161, 2003:f2:6128:fd01:e543:601:30c2:a028 near Munich, Germany +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +function WriteLocalInterface($interface) { + $IPv4 = $IPv6 = $prefixLen = "" + $addresses = Get-NetIPAddress + foreach ($addr in $addresses) { + if ($addr.InterfaceAlias -like "$($interface)*") { + if ($addr.AddressFamily -eq "IPv4") { + $IPv4 = $addr.IPAddress + $prefixLen = $addr.PrefixLength + } else { + $IPv6 = $addr.IPAddress + } + } + } + if ($IPv4 -ne "" -or $IPv6 -ne "") { + Write-Host "βœ… Local $interface IP $IPv4/$prefixLen, $IPv6" + } +} + +try { + if (!$IsLinux) { + WriteLocalInterface "Ethernet" + WriteLocalInterface "WLAN" + WriteLocalInterface "Bluetooth" + } + if ($IsLinux) { + [string]$publicIPv4 = (curl -4 --silent ifconfig.co) + [string]$publicIPv6 = (curl -6 --silent ifconfig.co) + [string]$city = (curl --silent ifconfig.co/city) + [string]$country = (curl --silent ifconfig.co/country) + } else { + [string]$publicIPv4 = (curl.exe -4 --silent ifconfig.co) + [string]$publicIPv6 = (curl.exe -6 --silent ifconfig.co) + [string]$city = (curl.exe --silent ifconfig.co/city) + [string]$country = (curl.exe --silent ifconfig.co/country) + } + if ("$publicIPv4" -eq "") { $publicIPv4 = "no IPv4" } + if ("$publicIPv6" -eq "") { $publicIPv6 = "no IPv6" } + if ("$city" -eq "") { $city = "unknown city" } + if ("$country" -eq "") { $country = "unknown country" } + Write-Host "βœ… Public IP $publicIPv4, $publicIPv6 near $city, $country" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-ip-addresses.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-ipv6.md b/docs/list-ipv6.md index b2e997e1..bb818f9b 100644 --- a/docs/list-ipv6.md +++ b/docs/list-ipv6.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-ipv6.ps1 as of 05/19/2024 10:25:21)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ipv6.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-latest-tag.md b/docs/list-latest-tag.md index 230b98e1..706e4b7a 100644 --- a/docs/list-latest-tag.md +++ b/docs/list-latest-tag.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tag.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tag.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-latest-tags.md b/docs/list-latest-tags.md index b512e267..e6d738e9 100644 --- a/docs/list-latest-tags.md +++ b/docs/list-latest-tags.md @@ -85,4 +85,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tags.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tags.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-mDNS.md b/docs/list-mDNS.md new file mode 100644 index 00000000..2f36e9d8 --- /dev/null +++ b/docs/list-mDNS.md @@ -0,0 +1,24 @@ +Script: *list-mDNS.ps1* +======================== + +list-mDNS.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +Get-NetUDPEndpoint -localPort 5353 | Select-Object LocalAddress,LocalPort,OwningProcess,@{ Name="Process"; Expression={((Get-Process -Id $_.OwningProcess).Name )} } +exit 0 # success +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-mDNS.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-memos.md b/docs/list-memos.md index 5c7c36d2..524294ef 100644 --- a/docs/list-memos.md +++ b/docs/list-memos.md @@ -1,7 +1,7 @@ Script: *list-memos.ps1* ======================== -This PowerShell script lists all memo entries in Memos.csv in your home folder. +This PowerShell script lists all entries in 'Remember.csv' in your home folder. Parameters ---------- @@ -33,9 +33,9 @@ Script Content ```powershell <# .SYNOPSIS - Lists your memo entries + Lists your remembered entries .DESCRIPTION - This PowerShell script lists all memo entries in Memos.csv in your home folder. + This PowerShell script lists all entries in 'Remember.csv' in your home folder. .EXAMPLE PS> ./list-memos.ps1 .LINK @@ -44,26 +44,23 @@ Script Content Author: Markus Fleschutz | License: CC0 #> - try { - $Path = "~/Memos.csv" - if (Test-Path "$Path" -pathType leaf) { - write-progress "Reading $Path ..." - $Table = Import-CSV "$Path" - write-progress -completed "Reading $Path" - - "" - "Time Text" - "---- ----" - foreach($Row in $Table) { - $Time = $Row.Time - $Text = $Row.Text - "$Time $Text" - } - } else { - "Sorry, no memos saved yet" + $path = "~/Remember.csv" + if (-not(Test-Path "$path" -pathType leaf)) { + "Nothing to remember." exit 1 } + + Write-Progress "Reading $path ..." + $table = Import-CSV "$path" + Write-Progress -completed "Done." + + foreach($row in $table) { + $unixTimestamp = [int64]$row.TIMESTAMP + $time = (Get-Date -day 1 -month 1 -year 1970 -hour 0 -minute 0 -second 0).AddSeconds($unixTimestamp) + $text = $row.TEXT.trim() + "⚠️ NOTE: $text (remembered $time)" + } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -71,4 +68,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-memos.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-memos.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-motherboard.md b/docs/list-motherboard.md index 7569e593..ce56951e 100644 --- a/docs/list-motherboard.md +++ b/docs/list-motherboard.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-motherboard.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-motherboard.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-mysql-tables.md b/docs/list-mysql-tables.md index 14f078cc..67577b17 100644 --- a/docs/list-mysql-tables.md +++ b/docs/list-mysql-tables.md @@ -90,4 +90,4 @@ $result = Invoke-MySqlQuery -ConnectionString "server=$server; database=$databa $result | Export-Csv $csvfilepath -NoTypeInformation ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-mysql-tables.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-mysql-tables.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-network-connections.md b/docs/list-network-connections.md index 07362105..c1aa11ab 100644 --- a/docs/list-network-connections.md +++ b/docs/list-network-connections.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-network-connections.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-connections.ps1 as of 08/15/2024 09:50:49)* diff --git a/docs/list-network-neighbors.md b/docs/list-network-neighbors.md index ce95829d..70be7cfa 100644 --- a/docs/list-network-neighbors.md +++ b/docs/list-network-neighbors.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-network-neighbors.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-neighbors.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-network-routes.md b/docs/list-network-routes.md index fbaaa912..2746660c 100644 --- a/docs/list-network-routes.md +++ b/docs/list-network-routes.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-network-routes.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-routes.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-network-shares.md b/docs/list-network-shares.md index 3fe77c0c..830ddbcf 100644 --- a/docs/list-network-shares.md +++ b/docs/list-network-shares.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-network-shares.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-shares.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-news.md b/docs/list-news.md index 7d5c669a..0a247102 100644 --- a/docs/list-news.md +++ b/docs/list-news.md @@ -112,4 +112,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-news.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-news.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-nic.md b/docs/list-nic.md index d954044f..1c959973 100644 --- a/docs/list-nic.md +++ b/docs/list-nic.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-nic.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-nic.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-nina-warnings.md b/docs/list-nina-warnings.md index 94cc1b19..4840fdbc 100644 --- a/docs/list-nina-warnings.md +++ b/docs/list-nina-warnings.md @@ -1,61 +1,102 @@ Script: *list-nina-warnings.ps1* ======================== -list-nina-warnings.ps1 - +This PowerShell script queries the current NINA warnings and lists it. Parameters ---------- ```powershell +PS> ./list-nina-warnings.ps1 [[-ARS] ] [] +-ARS + Specifies the official regional key in Germany ("Amtlicher RegionalschlΓΌssel", e.g. 09777, none by default) + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Accept wildcard characters? false [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` +Example +------- +```powershell +PS> ./list-nina-warnings.ps1 + + + +⚠️ Official SEVERE WEATHER WARNING of SEVERE THUNDERSTORMS with VERY HEAVY RAIN and HAIL + πŸ•˜ 2024-06-26T07:53:00+02:00 ... 2024-06-26T08:45:00+02:00 (by DWD, Update, Severe, Immediate) + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + Script Content -------------- ```powershell <# .SYNOPSIS - Lists the current weather warnings by NINA + Lists the current NINA warnings .DESCRIPTION - This PowerShell script queries the current NINA weather warnings and lists it. + This PowerShell script queries the current NINA warnings and lists it. +.PARAMETER ARS + Specifies the official regional key in Germany ("Amtlicher RegionalschlΓΌssel", e.g. 09777, none by default) .EXAMPLE PS> ./list-nina-warnings.ps1 + + ⚠️ Official SEVERE WEATHER WARNING of SEVERE THUNDERSTORMS with VERY HEAVY RAIN and HAIL + πŸ•˜ 2024-06-26T07:53:00+02:00 ... 2024-06-26T08:45:00+02:00 (by DWD, Update, Severe, Immediate) .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -function ListWarningsOf([string]$category, [string]$source) +param([string]$ARS = "") + +function ListWarningsOf([string]$source, [string]$URL) { - Write-Progress "Loading NINA warnings..." - $warnings = (Invoke-WebRequest -URI https://warnung.bund.de/api31/$category/mapData.json -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json + Write-Progress "Loading NINA - $source warnings..." + $warnings = (Invoke-WebRequest -URI $URL -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json Write-Progress -completed "Done." foreach($warning in $warnings) { - $message = $warning.i18nTitle.en + $title = $warning.i18nTitle.en + if ("$title" -eq "") { $title = $warning.i18nTitle.de } $startDate = $warning.startDate $expiresDate = $warning.expiresDate $severity = $warning.severity $urgency = $warning.urgency $type = $warning.type - Write-Output "* $message" - Write-Output " from $startDate to $expiresDate ($source $type, $severity, $urgency)" Write-Output "" + Write-Output "⚠️ $title" + if ("$type" -ne "") { + Write-Output " πŸ•˜ $($startDate)...$expiresDate (by $source, $type, $severity, $urgency)" + } } } try { - Write-Output "" - ListWarningsOf "katwarn" "Katwarn" - ListWarningsOf "dwd" "DWD" - ListWarningsOf "police" "Police" - ListWarningsOf "lhp" "LHP" - ListWarningsOf "biwapp" "Biwapp" + if ("$ARS" -ne "") { + ListWarningsOf "Region" "https://warnung.bund.de/api31/dashboard/$($ARS)0000000.json" + } else { + ListWarningsOf "Katwarn" "https://warnung.bund.de/api31/katwarn/mapData.json" + ListWarningsOf "DWD" "https://warnung.bund.de/api31/dwd/mapData.json" + ListWarningsOf "Police" "https://warnung.bund.de/api31/police/mapData.json" + ListWarningsOf "LHP" "https://warnung.bund.de/api31/lhp/mapData.json" + ListWarningsOf "Biwapp" "https://warnung.bund.de/api31/biwapp/mapData.json" + } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -63,4 +104,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-nina-warnings.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-nina-warnings.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-os-releases.md b/docs/list-os-releases.md index 4ceb624e..dcc66f73 100644 --- a/docs/list-os-releases.md +++ b/docs/list-os-releases.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-os-releases.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os-releases.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-os-updates.md b/docs/list-os-updates.md index 43700aa1..e611a7e2 100644 --- a/docs/list-os-updates.md +++ b/docs/list-os-updates.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-os-updates.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os-updates.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-os.md b/docs/list-os.md index b25b7c5a..7227660b 100644 --- a/docs/list-os.md +++ b/docs/list-os.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-os.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-outlook-inbox.md b/docs/list-outlook-inbox.md index b2cdb75b..4acfc051 100644 --- a/docs/list-outlook-inbox.md +++ b/docs/list-outlook-inbox.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-inbox.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-inbox.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-outlook-sent.md b/docs/list-outlook-sent.md index a28c8295..c82ef9cf 100644 --- a/docs/list-outlook-sent.md +++ b/docs/list-outlook-sent.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-sent.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-sent.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-passwords.md b/docs/list-passwords.md index 55c7f61c..b4b1f0d0 100644 --- a/docs/list-passwords.md +++ b/docs/list-passwords.md @@ -111,4 +111,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-passwords.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-passwords.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-pi.md b/docs/list-pi.md index 603d1630..ee3f48b7 100644 --- a/docs/list-pi.md +++ b/docs/list-pi.md @@ -117,4 +117,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-pi.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pi.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-pins.md b/docs/list-pins.md index 319bd820..24cb6d59 100644 --- a/docs/list-pins.md +++ b/docs/list-pins.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-pins.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pins.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-power-schemes.md b/docs/list-power-schemes.md index 131b1441..f8322acd 100644 --- a/docs/list-power-schemes.md +++ b/docs/list-power-schemes.md @@ -21,4 +21,4 @@ powercfg /list exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-power-schemes.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-power-schemes.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-powershell-modules.md b/docs/list-powershell-modules.md index 17a8d421..f9a59e45 100644 --- a/docs/list-powershell-modules.md +++ b/docs/list-powershell-modules.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-modules.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-modules.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-powershell-profiles.md b/docs/list-powershell-profiles.md index e6c12128..1459fe4f 100644 --- a/docs/list-powershell-profiles.md +++ b/docs/list-powershell-profiles.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-profiles.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-profiles.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-powershell-verbs.md b/docs/list-powershell-verbs.md index 778bff74..b0be17fc 100644 --- a/docs/list-powershell-verbs.md +++ b/docs/list-powershell-verbs.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-verbs.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-powershell-verbs.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-print-jobs.md b/docs/list-print-jobs.md index 223ded49..78b2145f 100644 --- a/docs/list-print-jobs.md +++ b/docs/list-print-jobs.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-print-jobs.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-print-jobs.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-printers.md b/docs/list-printers.md index 296df0e3..6c7aff1c 100644 --- a/docs/list-printers.md +++ b/docs/list-printers.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-printers.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-printers.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-processes.md b/docs/list-processes.md index 3462d64e..1a5fcfc8 100644 --- a/docs/list-processes.md +++ b/docs/list-processes.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-processes.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-processes.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-pull-requests.md b/docs/list-pull-requests.md index ea3d8b04..b5c2313b 100644 --- a/docs/list-pull-requests.md +++ b/docs/list-pull-requests.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-pull-requests.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pull-requests.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-ram.md b/docs/list-ram.md index db7f4ef6..9293594c 100644 --- a/docs/list-ram.md +++ b/docs/list-ram.md @@ -63,4 +63,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-ram.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ram.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-read-only-files.md b/docs/list-read-only-files.md index 25358fe8..7ca6599c 100644 --- a/docs/list-read-only-files.md +++ b/docs/list-read-only-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-read-only-files.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-read-only-files.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-recycle-bin.md b/docs/list-recycle-bin.md index a5b8f7e6..83b7b903 100644 --- a/docs/list-recycle-bin.md +++ b/docs/list-recycle-bin.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-recycle-bin.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-recycle-bin.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-repos.md b/docs/list-repos.md index 2133f82b..d23b304e 100644 --- a/docs/list-repos.md +++ b/docs/list-repos.md @@ -103,4 +103,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-repos.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-repos.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-scripts.md b/docs/list-scripts.md index c7aebd60..4788948e 100644 --- a/docs/list-scripts.md +++ b/docs/list-scripts.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-scripts.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-scripts.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-scsi-devices.md b/docs/list-scsi-devices.md new file mode 100644 index 00000000..5de653a8 --- /dev/null +++ b/docs/list-scsi-devices.md @@ -0,0 +1,68 @@ +Script: *list-scsi-devices.ps1* +======================== + +This PowerShell script lists all SCSI devices connected to the local computer. + +Parameters +---------- +```powershell +PS> ./list-scsi-devices.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./list-scsi-devices.ps1 + + + +FriendlyName Status InstanceId +------------ ------ ---------- +Microsoft-Controller OK ROOT\SPACEPORT\0000 +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists SCSI devices +.DESCRIPTION + This PowerShell script lists all SCSI devices connected to the local computer. +.EXAMPLE + PS> ./list-scsi-devices.ps1 + + FriendlyName Status InstanceId + ------------ ------ ---------- + Microsoft-Controller OK ROOT\SPACEPORT\0000 + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Get-PnpDevice | Where-Object {$_.Class -like "SCSI*"} | Sort-Object -property FriendlyName | Format-Table -property FriendlyName,Status,InstanceId + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-scsi-devices.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-services.md b/docs/list-services.md index 295451ff..80ccec40 100644 --- a/docs/list-services.md +++ b/docs/list-services.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-services.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-services.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-special-folders.md b/docs/list-special-folders.md index 8ef9e35b..8c593326 100644 --- a/docs/list-special-folders.md +++ b/docs/list-special-folders.md @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-special-folders.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-special-folders.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-sql-tables.md b/docs/list-sql-tables.md index 0ad2e419..fa49def6 100644 --- a/docs/list-sql-tables.md +++ b/docs/list-sql-tables.md @@ -93,4 +93,4 @@ $result = Invoke-SqlServerQuery -Credential $creds -ConnectionTimeout 10000 -Dat $result | Export-Csv $csvfilepath -NoTypeInformation ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-sql-tables.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-sql-tables.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-submodules.md b/docs/list-submodules.md index bbab25e7..5b0942d6 100644 --- a/docs/list-submodules.md +++ b/docs/list-submodules.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-submodules.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-submodules.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-suggestions.md b/docs/list-suggestions.md index 51a98b6e..ee3283c2 100644 --- a/docs/list-suggestions.md +++ b/docs/list-suggestions.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-suggestions.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-suggestions.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-system-devices.md b/docs/list-system-devices.md new file mode 100644 index 00000000..b1fa3481 --- /dev/null +++ b/docs/list-system-devices.md @@ -0,0 +1,68 @@ +Script: *list-system-devices.ps1* +======================== + +This PowerShell script lists all system devices connected to the local computer. + +Parameters +---------- +```powershell +PS> ./list-system-devices.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./list-system-devices.ps1 + + + +FriendlyName Status InstanceId +------------ ------ ---------- +Microsoft-Controller OK ROOT\SPACEPORT\0000 +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists system devices +.DESCRIPTION + This PowerShell script lists all system devices connected to the local computer. +.EXAMPLE + PS> ./list-system-devices.ps1 + + FriendlyName Status InstanceId + ------------ ------ ---------- + Microsoft-Controller OK ROOT\SPACEPORT\0000 + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Get-PnpDevice | Where-Object {$_.Class -like "System"} | Format-Table -property FriendlyName,Status,InstanceId + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-system-devices.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-system-files.md b/docs/list-system-files.md index 6664a2e1..f8a89c7f 100644 --- a/docs/list-system-files.md +++ b/docs/list-system-files.md @@ -81,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-system-files.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-system-files.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-system-info.md b/docs/list-system-info.md index 62672588..aa04abb7 100644 --- a/docs/list-system-info.md +++ b/docs/list-system-info.md @@ -141,4 +141,4 @@ $info exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-system-info.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-system-info.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-tags.md b/docs/list-tags.md index f3c3216c..c72f8e3d 100644 --- a/docs/list-tags.md +++ b/docs/list-tags.md @@ -110,4 +110,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tags.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tags.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-tasks.md b/docs/list-tasks.md index f4c949ab..771c2d65 100644 --- a/docs/list-tasks.md +++ b/docs/list-tasks.md @@ -44,4 +44,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tasks.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tasks.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-timezone.md b/docs/list-timezone.md index 601807c1..699433cb 100644 --- a/docs/list-timezone.md +++ b/docs/list-timezone.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-timezone.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-timezone.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-timezones.md b/docs/list-timezones.md index 76b21920..456e14e2 100644 --- a/docs/list-timezones.md +++ b/docs/list-timezones.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-timezones.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-timezones.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-tiobe-index.md b/docs/list-tiobe-index.md index c07ebebd..6df49d40 100644 --- a/docs/list-tiobe-index.md +++ b/docs/list-tiobe-index.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tiobe-index.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tiobe-index.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-unused-files.md b/docs/list-unused-files.md index 36becfbd..e4318e46 100644 --- a/docs/list-unused-files.md +++ b/docs/list-unused-files.md @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-unused-files.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-unused-files.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-updates.md b/docs/list-updates.md index 165be62b..d0440e92 100644 --- a/docs/list-updates.md +++ b/docs/list-updates.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-updates.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-updates.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-usb-devices.md b/docs/list-usb-devices.md new file mode 100644 index 00000000..b48b4818 --- /dev/null +++ b/docs/list-usb-devices.md @@ -0,0 +1,68 @@ +Script: *list-usb-devices.ps1* +======================== + +This PowerShell script lists all USB devices connected to the local computer. + +Parameters +---------- +```powershell +PS> ./list-usb-devices.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./list-usb-devices.ps1 + + + +FriendlyName Status InstanceId +------------ ------ ---------- +USB-Root-Hub (USB 3.0) OK USB\ROOT_HUB30\4&2060378&0&0 +... + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists USB devices +.DESCRIPTION + This PowerShell script lists all USB devices connected to the local computer. +.EXAMPLE + PS> ./list-usb-devices.ps1 + + FriendlyName Status InstanceId + ------------ ------ ---------- + USB-Root-Hub (USB 3.0) OK USB\ROOT_HUB30\4&2060378&0&0 + ... +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Get-PnpDevice | Where-Object {$_.Class -eq "USB"} | Sort-Object -property FriendlyName | Format-Table -property FriendlyName,Status,InstanceId + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-usb-devices.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-user-accounts.md b/docs/list-user-accounts.md index cdd644af..9e86408a 100644 --- a/docs/list-user-accounts.md +++ b/docs/list-user-accounts.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-user-accounts.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-user-accounts.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-user-groups.md b/docs/list-user-groups.md index 68dbd1a9..fc487dac 100644 --- a/docs/list-user-groups.md +++ b/docs/list-user-groups.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-user-groups.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-user-groups.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-voices.md b/docs/list-voices.md index 0bda2dcd..0ecbf0d8 100644 --- a/docs/list-voices.md +++ b/docs/list-voices.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-voices.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-voices.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-weather.md b/docs/list-weather.md index d4e708c5..255e73c8 100644 --- a/docs/list-weather.md +++ b/docs/list-weather.md @@ -156,7 +156,7 @@ try { $desc = GetDescription $hourly.weatherDesc.value.trim() if ($hour -eq 0) { if ($day -eq 0) { - Write-Host "TODAY 🌑°C β˜‚οΈmm πŸ’§ πŸ’¨km/h β˜€οΈUV ☁️ πŸ‘km at $area ($region, $country)" -foregroundColor green + Write-Host "TODAY 🌑°C β˜‚οΈmm πŸ’§ πŸ’¨km/h β˜€οΈUV ☁️ πŸ‘km at $area ($region, $country)" -foregroundColor green } elseif ($day -eq 1) { $date = (Get-Date).AddDays(1) [string]$dayOfWeek = $date.DayOfWeek @@ -177,4 +177,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-weather.ps1 as of 05/19/2024 10:25:22)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-weather.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-wifi.md b/docs/list-wifi.md index 1ceb3854..9dd4b8ea 100644 --- a/docs/list-wifi.md +++ b/docs/list-wifi.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-wifi.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-wifi.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-window-titles.md b/docs/list-window-titles.md index c48254fe..ca3421b0 100644 --- a/docs/list-window-titles.md +++ b/docs/list-window-titles.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-window-titles.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-window-titles.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-workdir.md b/docs/list-workdir.md index b9f9fd6e..97f98274 100644 --- a/docs/list-workdir.md +++ b/docs/list-workdir.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-workdir.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-workdir.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/list-wsl-distros.md b/docs/list-wsl-distros.md index cb075c44..094b2856 100644 --- a/docs/list-wsl-distros.md +++ b/docs/list-wsl-distros.md @@ -23,4 +23,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-wsl-distros.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-wsl-distros.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/locate-city.md b/docs/locate-city.md index 3c080ff8..4c344e8d 100644 --- a/docs/locate-city.md +++ b/docs/locate-city.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-city.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-city.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/locate-ipaddress.md b/docs/locate-ipaddress.md index c8b23535..c200446a 100644 --- a/docs/locate-ipaddress.md +++ b/docs/locate-ipaddress.md @@ -46,4 +46,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-ipaddress.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-ipaddress.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/locate-my-phone.md b/docs/locate-my-phone.md index 4f0d4833..b4b71f4d 100644 --- a/docs/locate-my-phone.md +++ b/docs/locate-my-phone.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-my-phone.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-my-phone.ps1 as of 08/15/2024 09:50:50)* diff --git a/docs/locate-zip-code.md b/docs/locate-zip-code.md index 9a9c73c4..c12df9d3 100644 --- a/docs/locate-zip-code.md +++ b/docs/locate-zip-code.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-zip-code.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-zip-code.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/lock-desktop.md b/docs/lock-desktop.md index 819b6ab9..9a63088a 100644 --- a/docs/lock-desktop.md +++ b/docs/lock-desktop.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of lock-desktop.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of lock-desktop.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/log-off.md b/docs/log-off.md index 6c5f6507..e7fe623b 100644 --- a/docs/log-off.md +++ b/docs/log-off.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of log-off.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of log-off.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/make-install.md b/docs/make-install.md index 64f28db7..1f455d4a 100644 --- a/docs/make-install.md +++ b/docs/make-install.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of make-install.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of make-install.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-BubbleSort.md b/docs/measure-BubbleSort.md index 68489a88..072693ac 100644 --- a/docs/measure-BubbleSort.md +++ b/docs/measure-BubbleSort.md @@ -92,4 +92,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-BubbleSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-BubbleSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-BucketSort.md b/docs/measure-BucketSort.md index fd515a3e..f25377cc 100644 --- a/docs/measure-BucketSort.md +++ b/docs/measure-BucketSort.md @@ -120,4 +120,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-BucketSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-BucketSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-CountingSort.md b/docs/measure-CountingSort.md index 3327b780..872f9fc5 100644 --- a/docs/measure-CountingSort.md +++ b/docs/measure-CountingSort.md @@ -111,4 +111,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-CountingSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-CountingSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-HeapSort.md b/docs/measure-HeapSort.md index 47aa95eb..ce4c4870 100644 --- a/docs/measure-HeapSort.md +++ b/docs/measure-HeapSort.md @@ -126,4 +126,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-HeapSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-HeapSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-InsertionSort.md b/docs/measure-InsertionSort.md index f602b75f..4fbe3eab 100644 --- a/docs/measure-InsertionSort.md +++ b/docs/measure-InsertionSort.md @@ -95,4 +95,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-InsertionSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-InsertionSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-MergeSort.md b/docs/measure-MergeSort.md index 2b8b24c7..57f0717a 100644 --- a/docs/measure-MergeSort.md +++ b/docs/measure-MergeSort.md @@ -120,4 +120,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-MergeSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-MergeSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-QuickSort.md b/docs/measure-QuickSort.md index e3858faa..5f59d9e5 100644 --- a/docs/measure-QuickSort.md +++ b/docs/measure-QuickSort.md @@ -101,4 +101,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-QuickSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-QuickSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-SelectionSort.md b/docs/measure-SelectionSort.md index 9abf97ce..7f1174d3 100644 --- a/docs/measure-SelectionSort.md +++ b/docs/measure-SelectionSort.md @@ -94,4 +94,4 @@ $elapsed3 = "{0:N3}" -f $elapsed # formatted to 3 decimal places exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-SelectionSort.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-SelectionSort.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/measure-sorting-algorithms.md b/docs/measure-sorting-algorithms.md index 236124f2..acc6eeac 100644 --- a/docs/measure-sorting-algorithms.md +++ b/docs/measure-sorting-algorithms.md @@ -73,4 +73,4 @@ param([int]$numIntegers = 3000) exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of measure-sorting-algorithms.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-sorting-algorithms.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/merry-christmas.md b/docs/merry-christmas.md index 4b0165dc..78d78af6 100644 --- a/docs/merry-christmas.md +++ b/docs/merry-christmas.md @@ -50,4 +50,4 @@ $Reply = "Merry Christmas to you too!", "Happy Christmas to you too!" | Get-Rand exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of merry-christmas.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of merry-christmas.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/minimize-all-windows.md b/docs/minimize-all-windows.md index facf84de..b1798834 100644 --- a/docs/minimize-all-windows.md +++ b/docs/minimize-all-windows.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of minimize-all-windows.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of minimize-all-windows.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/move-mouse-pointer.md b/docs/move-mouse-pointer.md index 023b2971..008e3fa5 100644 --- a/docs/move-mouse-pointer.md +++ b/docs/move-mouse-pointer.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of move-mouse-pointer.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of move-mouse-pointer.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/move-vm.md b/docs/move-vm.md index cd3980a9..6c4a059c 100644 --- a/docs/move-vm.md +++ b/docs/move-vm.md @@ -22,4 +22,4 @@ Move-VM $VMName HOST2 -IncludeStorage -DestinationStoragePath "D:\VirtualMachine exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of move-vm.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of move-vm.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/my-profile.md b/docs/my-profile.md index 0092bfe5..4f17f197 100644 --- a/docs/my-profile.md +++ b/docs/my-profile.md @@ -20,21 +20,22 @@ Script Content # MY POWERSHELL PROFILE (defines the look & feel of PowerShell) # WINDOW TITLE -if ($IsLinux) { $Username = $(whoami) } else { $Username = $env:USERNAME } -$host.ui.RawUI.WindowTitle = "$Username @ $(hostname)" +if ($IsLinux) { $username = $(whoami) } else { $username = $env:USERNAME } +$host.ui.RawUI.WindowTitle = "$username @ $(hostname)" # GREETING -Write-Host "Welcome $USERNAME at $(hostname), what's up?" -foregroundColor green +Write-Host "πŸ‘‹ Welcome $username to $(hostname)'s PowerShell - type 'hlp' for help." -foregroundColor green # COMMAND PROMPT function prompt { Write-Host "`n➀ " -noNewline -foregroundColor yellow; return " " } # ALIAS NAMES del alias:pwd -force -errorAction SilentlyContinue +set-alias -name hlp -value open-help.ps1 set-alias -name pwd -value list-workdir.ps1 # pwd = print working directory set-alias -name ll -value get-childitem # ll = list folder (long format) del alias:ls -force -errorAction SilentlyContinue set-alias -name ls -value list-folder.ps1 # ls = list folder (short format) ``` -*(generated by convert-ps2md.ps1 using the comment-based help of my-profile.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of my-profile.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-branch.md b/docs/new-branch.md index 09d8170d..80c3424e 100644 --- a/docs/new-branch.md +++ b/docs/new-branch.md @@ -34,14 +34,14 @@ PS> ./new-branch.ps1 [[-newBranch] ] [[-pathToRepo] ] [ ./new-branch.ps1 test123 C:\Repos\rust -⏳ (1/6) Searching for Git executable... git version 2.42.0.windows.2 -⏳ (2/6) Checking local repository... πŸ“‚C:\Repos\rust -⏳ (3/6) Fetching remote updates... +PS> ./new-branch.ps1 test123 +⏳ (1/6) Searching for Git executable... git version 2.45.0 +⏳ (2/6) Checking local repository... C:\Repos\rust +⏳ (3/6) Fetching remote updates... git@github.org:rust/rust.git ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... -βœ”οΈ Created branch 'test123' in repo πŸ“‚rust (based on 'main', took 18s) +βœ”οΈ Created branch 'test123' based on 'main' in πŸ“‚rust repo in 18s. ``` @@ -66,14 +66,14 @@ Script Content .PARAMETER pathToRepo Specifies the file path to the local Git repository (current working directory per default) .EXAMPLE - PS> ./new-branch.ps1 test123 C:\Repos\rust - ⏳ (1/6) Searching for Git executable... git version 2.42.0.windows.2 - ⏳ (2/6) Checking local repository... πŸ“‚C:\Repos\rust - ⏳ (3/6) Fetching remote updates... + PS> ./new-branch.ps1 test123 + ⏳ (1/6) Searching for Git executable... git version 2.45.0 + ⏳ (2/6) Checking local repository... C:\Repos\rust + ⏳ (3/6) Fetching remote updates... git@github.org:rust/rust.git ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... - βœ”οΈ Created branch 'test123' in repo πŸ“‚rust (based on 'main', took 18s) + βœ”οΈ Created branch 'test123' based on 'main' in πŸ“‚rust repo in 18s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -91,13 +91,16 @@ try { & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/6) Checking local repository... πŸ“‚$pathToRepo" + Write-Host "⏳ (2/6) Checking local repository... $pathToRepo" if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder: $pathToRepo" } $result = (git -C "$pathToRepo" status) if ($lastExitCode -ne "0") { throw "'git status' in $pathToRepo failed with exit code $lastExitCode" } $repoName = (Get-Item "$pathToRepo").Name - "⏳ (3/6) Fetching remote updates..." + Write-Host "⏳ (3/6) Fetching remote updates... " -noNewline + & git -C "$pathToRepo" remote get-url origin + if ($lastExitCode -ne "0") { throw "'git remote get-url origin' failed with exit code $lastExitCode" } + & git -C "$pathToRepo" fetch --all --recurse-submodules --prune --prune-tags --force if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } @@ -117,7 +120,7 @@ try { if ($lastExitCode -ne "0") { throw "'git submodule update' failed with exit code $lastExitCode" } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "βœ”οΈ Created branch '$newBranch' in repo πŸ“‚$repoName (based on '$currentBranch', took $($elapsed)s)" + "βœ”οΈ Created branch '$newBranch' based on '$currentBranch' in πŸ“‚$repoName repo in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -125,4 +128,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-branch.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-branch.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-dir.md b/docs/new-dir.md index c54baccb..68d8c1e3 100644 --- a/docs/new-dir.md +++ b/docs/new-dir.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-dir.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-dir.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-email.md b/docs/new-email.md index bacf7cda..e1d40c42 100644 --- a/docs/new-email.md +++ b/docs/new-email.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-email.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-email.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-linux-vm.md b/docs/new-linux-vm.md index 7619d51b..d044e10f 100644 --- a/docs/new-linux-vm.md +++ b/docs/new-linux-vm.md @@ -38,4 +38,4 @@ $VMName = "linux" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-linux-vm.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-linux-vm.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-qrcode.md b/docs/new-qrcode.md index f77fbc10..4d5bac20 100644 --- a/docs/new-qrcode.md +++ b/docs/new-qrcode.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-qrcode.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-qrcode.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-script.md b/docs/new-script.md index 57014dfc..076616b5 100644 --- a/docs/new-script.md +++ b/docs/new-script.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-script.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-script.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-shortcut.md b/docs/new-shortcut.md index 2f348591..572c75a1 100644 --- a/docs/new-shortcut.md +++ b/docs/new-shortcut.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-shortcut.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-shortcut.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-symlink.md b/docs/new-symlink.md index 15bc05fb..3ca292cb 100644 --- a/docs/new-symlink.md +++ b/docs/new-symlink.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-symlink.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-symlink.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-tag.md b/docs/new-tag.md index a396e10b..f1b5f037 100644 --- a/docs/new-tag.md +++ b/docs/new-tag.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-tag.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-tag.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-user.md b/docs/new-user.md index f5aae69c..d22c592e 100644 --- a/docs/new-user.md +++ b/docs/new-user.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-user.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-user.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/new-windows-vm.md b/docs/new-windows-vm.md index 8c1f10cf..528a4e07 100644 --- a/docs/new-windows-vm.md +++ b/docs/new-windows-vm.md @@ -37,4 +37,4 @@ $VMName = "windows" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-windows-vm.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-windows-vm.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/on-desktop-login.md b/docs/on-desktop-login.md index ebf6f1e2..ae5d1f78 100644 --- a/docs/on-desktop-login.md +++ b/docs/on-desktop-login.md @@ -47,7 +47,6 @@ Script Content #> try { - & "$PSScriptRoot/write-big.ps1" "Welcome back" " " & "$PSScriptRoot/check-uptime.ps1" & "$PSScriptRoot/check-pending-reboot.ps1" @@ -66,8 +65,7 @@ try { & "$PSScriptRoot/cd-repos.ps1" & "$PSScriptRoot/fetch-repos.ps1" " " - & "$PSScriptRoot/play-big-ben.ps1" - & "$PSScriptRoot/write-clock.ps1" + & "$PSScriptRoot/watch-news.ps1" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -75,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of on-desktop-login.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of on-desktop-login.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-URL.md b/docs/open-URL.md new file mode 100644 index 00000000..c5df4ab4 --- /dev/null +++ b/docs/open-URL.md @@ -0,0 +1,87 @@ +Script: *open-URL.ps1* +======================== + +This PowerShell script launches a new tab in the default Web browser with the given URL. + +Parameters +---------- +```powershell +PS> ./open-URL.ps1 [[-URL] ] [[-text] ] [] + +-URL + Specifies the URL + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +-text + Specifies the text to write to the console + + Required? false + Position? 2 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./open-URL.ps1 https://cnn.com + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Opens an URL in the default browser +.DESCRIPTION + This PowerShell script launches a new tab in the default Web browser with the given URL. +.PARAMETER URL + Specifies the URL +.PARAMETER text + Specifies the text to write to the console +.EXAMPLE + PS> ./open-URL.ps1 https://cnn.com +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$URL = "", [string]$text = "") + +try { + if ($URL -eq "") { $URL = Read-Host "Enter the URL" } + + if ($text -ne "") { + Write-Host $text -noNewline + Write-Host $URL -foregroundColor blue + } + Start-Process $URL + + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of open-URL.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-apps-folder.md b/docs/open-apps-folder.md index 4542bcf5..aa615c78 100644 --- a/docs/open-apps-folder.md +++ b/docs/open-apps-folder.md @@ -49,4 +49,4 @@ exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-apps-folder.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-apps-folder.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-auto-start-folder.md b/docs/open-auto-start-folder.md index 4c8e1f30..584bd427 100644 --- a/docs/open-auto-start-folder.md +++ b/docs/open-auto-start-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-auto-start-folder.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-auto-start-folder.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-bing-maps.md b/docs/open-bing-maps.md index 4e342f61..a3bd5904 100644 --- a/docs/open-bing-maps.md +++ b/docs/open-bing-maps.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-bing-maps.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-bing-maps.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-booking-com.md b/docs/open-booking-com.md index b4b6b262..d4094bdd 100644 --- a/docs/open-booking-com.md +++ b/docs/open-booking-com.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-booking-com.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-booking-com.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-c-drive.md b/docs/open-c-drive.md index 5cfa7815..5503e31b 100644 --- a/docs/open-c-drive.md +++ b/docs/open-c-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-c-drive.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-c-drive.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-calculator.md b/docs/open-calculator.md index c4880c43..835d8ba1 100644 --- a/docs/open-calculator.md +++ b/docs/open-calculator.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-calculator.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-calculator.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-chrome.md b/docs/open-chrome.md index 3cdc211b..71e76b9d 100644 --- a/docs/open-chrome.md +++ b/docs/open-chrome.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-chrome.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-chrome.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-clock.md b/docs/open-clock.md index 9d6040ab..047adb2b 100644 --- a/docs/open-clock.md +++ b/docs/open-clock.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-clock.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-clock.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-cortana.md b/docs/open-cortana.md index 3e9c9f2a..1ff8b174 100644 --- a/docs/open-cortana.md +++ b/docs/open-cortana.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-cortana.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-cortana.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-d-drive.md b/docs/open-d-drive.md index 431f9d9a..2698ed5b 100644 --- a/docs/open-d-drive.md +++ b/docs/open-d-drive.md @@ -47,4 +47,4 @@ Script Content & "$PSScriptRoot/open-file-explorer.ps1" "D:" ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-d-drive.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-d-drive.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-dashboards.md b/docs/open-dashboards.md index 1b14aa4f..f29f8eac 100644 --- a/docs/open-dashboards.md +++ b/docs/open-dashboards.md @@ -84,4 +84,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-dashboards.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-dashboards.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-deep-l-translator.md b/docs/open-deep-l-translator.md index 45cef5fd..efb982bf 100644 --- a/docs/open-deep-l-translator.md +++ b/docs/open-deep-l-translator.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-deep-l-translator.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-deep-l-translator.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-default-browser.md b/docs/open-default-browser.md index ae1f54bf..a5891ab4 100644 --- a/docs/open-default-browser.md +++ b/docs/open-default-browser.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-default-browser.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-default-browser.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-desktop-folder.md b/docs/open-desktop-folder.md index 73cf5789..82177443 100644 --- a/docs/open-desktop-folder.md +++ b/docs/open-desktop-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-desktop-folder.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-desktop-folder.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-documents-folder.md b/docs/open-documents-folder.md index cd2c2d5b..5a3721a3 100644 --- a/docs/open-documents-folder.md +++ b/docs/open-documents-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-documents-folder.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-documents-folder.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-downloads-folder.md b/docs/open-downloads-folder.md index e09de1e4..9723eda8 100644 --- a/docs/open-downloads-folder.md +++ b/docs/open-downloads-folder.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-downloads-folder.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-downloads-folder.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-dropbox-folder.md b/docs/open-dropbox-folder.md index e3ded002..4ea8e9f7 100644 --- a/docs/open-dropbox-folder.md +++ b/docs/open-dropbox-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-dropbox-folder.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-dropbox-folder.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-duck-duck-go.md b/docs/open-duck-duck-go.md index 276b287e..fd7c1e70 100644 --- a/docs/open-duck-duck-go.md +++ b/docs/open-duck-duck-go.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-duck-duck-go.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-duck-duck-go.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-e-drive.md b/docs/open-e-drive.md index 31670694..db7edb15 100644 --- a/docs/open-e-drive.md +++ b/docs/open-e-drive.md @@ -47,4 +47,4 @@ Script Content & "$PSScriptRoot/open-file-explorer.ps1" "E:" ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-e-drive.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-e-drive.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-edge.md b/docs/open-edge.md index 1a25b0ef..d20e8fd2 100644 --- a/docs/open-edge.md +++ b/docs/open-edge.md @@ -48,4 +48,4 @@ Start-Process microsoft-edge:// exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-edge.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-edge.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-egg-timer.md b/docs/open-egg-timer.md index ae9a4077..603f3799 100644 --- a/docs/open-egg-timer.md +++ b/docs/open-egg-timer.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-egg-timer.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-egg-timer.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-email-client.md b/docs/open-email-client.md index 2162a6fd..a8f243b3 100644 --- a/docs/open-email-client.md +++ b/docs/open-email-client.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-email-client.ps1 as of 05/19/2024 10:25:23)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-email-client.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-f-drive.md b/docs/open-f-drive.md index 4653bf0d..eeb84257 100644 --- a/docs/open-f-drive.md +++ b/docs/open-f-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-f-drive.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-f-drive.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-file-explorer.md b/docs/open-file-explorer.md index ceba08c0..da606f0b 100644 --- a/docs/open-file-explorer.md +++ b/docs/open-file-explorer.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-file-explorer.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-file-explorer.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-fire-place.md b/docs/open-fire-place.md index 65433b57..804225f2 100644 --- a/docs/open-fire-place.md +++ b/docs/open-fire-place.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-fire-place.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-fire-place.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-firefox.md b/docs/open-firefox.md index eb74e165..31107542 100644 --- a/docs/open-firefox.md +++ b/docs/open-firefox.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-firefox.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-firefox.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-flight-radar.md b/docs/open-flight-radar.md index 8f99f421..d6c3aee7 100644 --- a/docs/open-flight-radar.md +++ b/docs/open-flight-radar.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-flight-radar.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-flight-radar.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-g-drive.md b/docs/open-g-drive.md index 35c2ff66..19e22670 100644 --- a/docs/open-g-drive.md +++ b/docs/open-g-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-g-drive.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-g-drive.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-git-extensions.md b/docs/open-git-extensions.md index 48e9fa32..c8b45470 100644 --- a/docs/open-git-extensions.md +++ b/docs/open-git-extensions.md @@ -48,4 +48,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-git-extensions.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-git-extensions.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-google-books.md b/docs/open-google-books.md index 20db46d6..bbcd43b6 100644 --- a/docs/open-google-books.md +++ b/docs/open-google-books.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-books.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-books.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-google-calendar.md b/docs/open-google-calendar.md index b9bd078e..b6168710 100644 --- a/docs/open-google-calendar.md +++ b/docs/open-google-calendar.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-calendar.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-calendar.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-google-contacts.md b/docs/open-google-contacts.md index aa6cc932..1b07cf50 100644 --- a/docs/open-google-contacts.md +++ b/docs/open-google-contacts.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-contacts.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-contacts.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-google-docs.md b/docs/open-google-docs.md index 83f80300..edba5426 100644 --- a/docs/open-google-docs.md +++ b/docs/open-google-docs.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-docs.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-docs.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-google-earth.md b/docs/open-google-earth.md index b6b2b422..4c757683 100644 --- a/docs/open-google-earth.md +++ b/docs/open-google-earth.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-earth.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-earth.ps1 as of 08/15/2024 09:50:51)* diff --git a/docs/open-google-mail.md b/docs/open-google-mail.md index 88de7a2f..35558b11 100644 --- a/docs/open-google-mail.md +++ b/docs/open-google-mail.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-mail.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-mail.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-google-maps.md b/docs/open-google-maps.md index f55ea05b..a8b3e63a 100644 --- a/docs/open-google-maps.md +++ b/docs/open-google-maps.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-maps.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-maps.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-google-news.md b/docs/open-google-news.md index 0bafa335..d982bd02 100644 --- a/docs/open-google-news.md +++ b/docs/open-google-news.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-news.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-news.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-google-photos.md b/docs/open-google-photos.md index c3a4a93b..e6a4e9db 100644 --- a/docs/open-google-photos.md +++ b/docs/open-google-photos.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-photos.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-photos.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-google-play.md b/docs/open-google-play.md index 97b8e2c3..cbf9503d 100644 --- a/docs/open-google-play.md +++ b/docs/open-google-play.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-play.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-play.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-google-search.md b/docs/open-google-search.md index 4244433f..c7cbc79f 100644 --- a/docs/open-google-search.md +++ b/docs/open-google-search.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-search.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-search.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-google-stadia.md b/docs/open-google-stadia.md index ab1fe27a..26ff5850 100644 --- a/docs/open-google-stadia.md +++ b/docs/open-google-stadia.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-stadia.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-stadia.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-google-translate.md b/docs/open-google-translate.md index 8b7f9d37..05f8142d 100644 --- a/docs/open-google-translate.md +++ b/docs/open-google-translate.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-google-translate.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-translate.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-help.md b/docs/open-help.md new file mode 100644 index 00000000..27d415e6 --- /dev/null +++ b/docs/open-help.md @@ -0,0 +1,70 @@ +Script: *open-help.ps1* +======================== + +This PowerShell script launches new tabs in the Web browser with help pages. + +Parameters +---------- +```powershell +PS> ./open-help.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./open-help.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Provide help to the user +.DESCRIPTION + This PowerShell script launches new tabs in the Web browser with help pages. +.EXAMPLE + PS> ./open-help.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + "" + & "$PSScriptRoot/write-typewriter.ps1" "OK - DON'T PANIC - HELP IS ON THE WAY..." 150 + "" + & "$PSScriptRoot/open-URL.ps1" -text "1. See the official PowerShell documentation at: " "https://docs.microsoft.com/en-us/powershell" + Start-Sleep -milliseconds 50 + + & "$PSScriptRoot/open-URL.ps1" -text "2. A PowerShell tutorial is at: " "https://www.guru99.com/powershell-tutorial.html" + Start-Sleep -milliseconds 50 + + & "$PSScriptRoot/open-URL.ps1" -text "3. PowerShell FAQ's can be found here: " "https://github.com/fleschutz/PowerShell/blob/main/docs/FAQ.md" + Start-Sleep -milliseconds 50 + + & "$PSScriptRoot/open-URL.ps1" -text "4. A PowerShell Cheat Sheet is at: " "https://github.com/fleschutz/PowerShell/blob/main/docs/cheat-sheet.md" + "" + "NOTE: Use + to open the links in your browser." + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of open-help.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-home-folder.md b/docs/open-home-folder.md index cdd117e6..9582b319 100644 --- a/docs/open-home-folder.md +++ b/docs/open-home-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-home-folder.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-home-folder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-internet-archive.md b/docs/open-internet-archive.md index ba5014b8..40250790 100644 --- a/docs/open-internet-archive.md +++ b/docs/open-internet-archive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-internet-archive.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-internet-archive.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-jitsi-meet.md b/docs/open-jitsi-meet.md index e8bc51ae..1c7e2f7b 100644 --- a/docs/open-jitsi-meet.md +++ b/docs/open-jitsi-meet.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-jitsi-meet.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-jitsi-meet.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-m-drive.md b/docs/open-m-drive.md index a4996bd3..45daad67 100644 --- a/docs/open-m-drive.md +++ b/docs/open-m-drive.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-m-drive.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-m-drive.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-magnifier.md b/docs/open-magnifier.md index db6794e2..b1ab92cf 100644 --- a/docs/open-magnifier.md +++ b/docs/open-magnifier.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-magnifier.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-magnifier.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-microsoft-paint.md b/docs/open-microsoft-paint.md index 6e45c49f..90001c7a 100644 --- a/docs/open-microsoft-paint.md +++ b/docs/open-microsoft-paint.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-paint.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-paint.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-microsoft-solitaire.md b/docs/open-microsoft-solitaire.md index 4579232e..84e52fa0 100644 --- a/docs/open-microsoft-solitaire.md +++ b/docs/open-microsoft-solitaire.md @@ -48,4 +48,4 @@ Start-Process xboxliveapp-1297287741: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-solitaire.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-solitaire.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-microsoft-store.md b/docs/open-microsoft-store.md index 1f249e1c..a1632aed 100644 --- a/docs/open-microsoft-store.md +++ b/docs/open-microsoft-store.md @@ -48,4 +48,4 @@ Start-Process ms-windows-store: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-store.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-store.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-microsoft-teams.md b/docs/open-microsoft-teams.md index 8884d5f0..10afa14d 100644 --- a/docs/open-microsoft-teams.md +++ b/docs/open-microsoft-teams.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-teams.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-teams.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-music-folder.md b/docs/open-music-folder.md index ddfedf89..2c3b91f5 100644 --- a/docs/open-music-folder.md +++ b/docs/open-music-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-music-folder.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-music-folder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-netflix.md b/docs/open-netflix.md index 3b00346e..bf3d42b4 100644 --- a/docs/open-netflix.md +++ b/docs/open-netflix.md @@ -48,4 +48,4 @@ Start-Process netflix: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-netflix.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-netflix.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-notepad.md b/docs/open-notepad.md index ba74680c..d9f58cdd 100644 --- a/docs/open-notepad.md +++ b/docs/open-notepad.md @@ -1,26 +1,56 @@ -## open-notepad.ps1 - Starts Notepad +Script: *open-notepad.ps1* +======================== -This script launches the Notepad application. +This PowerShell script launches the Notepad application. -## Parameters +Parameters +---------- ```powershell -/home/markus/Repos/PowerShell/Scripts/open-notepad.ps1 [] +PS> ./open-notepad.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` -## Example +Example +------- ```powershell -PS> ./open-notepad +PS> ./open-notepad.ps1 ``` -## Notes -Author: Markus Fleschutz Β· License: CC0 +Notes +----- +Author: Markus Fleschutz | License: CC0 -## Related Links +Related Links +------------- https://github.com/fleschutz/PowerShell -*Generated by convert-ps2md.ps1 using the comment-based help of open-notepad.ps1* +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Launches the Notepad app +.DESCRIPTION + This PowerShell script launches the Notepad application. +.EXAMPLE + PS> ./open-notepad.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Start-Process notepad.exe + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of open-notepad.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-obs-studio.md b/docs/open-obs-studio.md index c8b108e0..ee3b422f 100644 --- a/docs/open-obs-studio.md +++ b/docs/open-obs-studio.md @@ -47,4 +47,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-obs-studio.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-obs-studio.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-office-365.md b/docs/open-office-365.md index 4443e94f..cc09d826 100644 --- a/docs/open-office-365.md +++ b/docs/open-office-365.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-office-365.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-office-365.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-one-drive-folder.md b/docs/open-one-drive-folder.md index 1d6509fa..ada73c92 100644 --- a/docs/open-one-drive-folder.md +++ b/docs/open-one-drive-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-one-drive-folder.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-one-drive-folder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-outlook.md b/docs/open-outlook.md index efcde2b5..bbc5bb0f 100644 --- a/docs/open-outlook.md +++ b/docs/open-outlook.md @@ -47,4 +47,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-outlook.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-outlook.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-paint-three-d.md b/docs/open-paint-three-d.md index 029cd20b..1489d83e 100644 --- a/docs/open-paint-three-d.md +++ b/docs/open-paint-three-d.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-paint-three-d.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-paint-three-d.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-pictures-folder.md b/docs/open-pictures-folder.md index eecd9845..1980b62c 100644 --- a/docs/open-pictures-folder.md +++ b/docs/open-pictures-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-pictures-folder.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-pictures-folder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-rdp.md b/docs/open-rdp.md index b919d460..aa570350 100644 --- a/docs/open-rdp.md +++ b/docs/open-rdp.md @@ -64,4 +64,4 @@ if ($hostname -eq "") { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-rdp.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-rdp.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-recycle-bin-folder.md b/docs/open-recycle-bin-folder.md index a705ba8a..f09e3ba5 100644 --- a/docs/open-recycle-bin-folder.md +++ b/docs/open-recycle-bin-folder.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-recycle-bin-folder.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-recycle-bin-folder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-remote-desktop.md b/docs/open-remote-desktop.md index 53004760..d20f63bf 100644 --- a/docs/open-remote-desktop.md +++ b/docs/open-remote-desktop.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-remote-desktop.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-remote-desktop.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-repos-folder.md b/docs/open-repos-folder.md index e7604706..6703f871 100644 --- a/docs/open-repos-folder.md +++ b/docs/open-repos-folder.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-repos-folder.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-repos-folder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-screen-clip.md b/docs/open-screen-clip.md index 4a04097d..98454c1b 100644 --- a/docs/open-screen-clip.md +++ b/docs/open-screen-clip.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-clip.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-clip.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-screen-sketch.md b/docs/open-screen-sketch.md index 1245392c..20203789 100644 --- a/docs/open-screen-sketch.md +++ b/docs/open-screen-sketch.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-sketch.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-sketch.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-skype.md b/docs/open-skype.md index 85399f8f..c3059d6a 100644 --- a/docs/open-skype.md +++ b/docs/open-skype.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-skype.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-skype.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-snipping-tool.md b/docs/open-snipping-tool.md index a57960b9..7febb323 100644 --- a/docs/open-snipping-tool.md +++ b/docs/open-snipping-tool.md @@ -48,4 +48,4 @@ Start-Process SnippingTool.exe exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-snipping-tool.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-snipping-tool.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-speed-test.md b/docs/open-speed-test.md index 6b0d099b..490ba5e5 100644 --- a/docs/open-speed-test.md +++ b/docs/open-speed-test.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-speed-test.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-speed-test.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-spotify.md b/docs/open-spotify.md index 7a44a05f..a6b3db22 100644 --- a/docs/open-spotify.md +++ b/docs/open-spotify.md @@ -48,4 +48,4 @@ Start-Process spotify: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-spotify.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-spotify.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-stack-overflow.md b/docs/open-stack-overflow.md index 5d5e4005..cd43d25f 100644 --- a/docs/open-stack-overflow.md +++ b/docs/open-stack-overflow.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-stack-overflow.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-stack-overflow.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-start-page.md b/docs/open-start-page.md index ccc0f637..2a356d7f 100644 --- a/docs/open-start-page.md +++ b/docs/open-start-page.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-start-page.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-start-page.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-street-map.md b/docs/open-street-map.md index c73ba937..f81f7ab7 100644 --- a/docs/open-street-map.md +++ b/docs/open-street-map.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-street-map.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-street-map.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-task-manager.md b/docs/open-task-manager.md index 032b041d..cc2b82a9 100644 --- a/docs/open-task-manager.md +++ b/docs/open-task-manager.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-task-manager.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-task-manager.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-temporary-folder.md b/docs/open-temporary-folder.md index 047cba25..465cea1c 100644 --- a/docs/open-temporary-folder.md +++ b/docs/open-temporary-folder.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-temporary-folder.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-temporary-folder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-three-d-viewer.md b/docs/open-three-d-viewer.md index b0ad2723..5503e1cf 100644 --- a/docs/open-three-d-viewer.md +++ b/docs/open-three-d-viewer.md @@ -48,4 +48,4 @@ Start-Process com.microsoft.3dviewer: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-three-d-viewer.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-three-d-viewer.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-thunderbird.md b/docs/open-thunderbird.md index 155fe642..8db25954 100644 --- a/docs/open-thunderbird.md +++ b/docs/open-thunderbird.md @@ -45,4 +45,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-thunderbird.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-thunderbird.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-videos-folders.md b/docs/open-videos-folders.md index d465ace9..5942190f 100644 --- a/docs/open-videos-folders.md +++ b/docs/open-videos-folders.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-videos-folders.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-videos-folders.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-visual-studio.md b/docs/open-visual-studio.md index caf7ca14..e52afd17 100644 --- a/docs/open-visual-studio.md +++ b/docs/open-visual-studio.md @@ -47,4 +47,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-visual-studio.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-visual-studio.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-voice-recorder.md b/docs/open-voice-recorder.md new file mode 100644 index 00000000..f5c688b2 --- /dev/null +++ b/docs/open-voice-recorder.md @@ -0,0 +1,56 @@ +Script: *open-voice-recorder.ps1* +======================== + +This PowerShell script launches the Windows Voice Recorder application. + +Parameters +---------- +```powershell +PS> ./open-voice-recorder.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./open-voice-recorder.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Launches the Voice Recorder app +.DESCRIPTION + This PowerShell script launches the Windows Voice Recorder application. +.EXAMPLE + PS> ./open-voice-recorder.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Start-Process explorer.exe shell:appsFolder\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe!App + exit 0 # success +} catch { + "⚠️ Error: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of open-voice-recorder.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-vpn-settings.md b/docs/open-vpn-settings.md index 2fd29a5d..65c85fb5 100644 --- a/docs/open-vpn-settings.md +++ b/docs/open-vpn-settings.md @@ -48,4 +48,4 @@ Start-Process ms-settings:network-vpn exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-vpn-settings.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-vpn-settings.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-windows-defender.md b/docs/open-windows-defender.md index 911a189f..39ee6287 100644 --- a/docs/open-windows-defender.md +++ b/docs/open-windows-defender.md @@ -48,4 +48,4 @@ Start-Process windowsdefender: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-defender.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-defender.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-windows-terminal.md b/docs/open-windows-terminal.md index b266afad..b7df90ee 100644 --- a/docs/open-windows-terminal.md +++ b/docs/open-windows-terminal.md @@ -48,4 +48,4 @@ Start-Process wt.exe exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-terminal.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-terminal.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/open-xing.md b/docs/open-xing.md index d25a5ab9..1ba064ab 100644 --- a/docs/open-xing.md +++ b/docs/open-xing.md @@ -48,4 +48,4 @@ Start-Process xing: exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-xing.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-xing.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/pick-commit.md b/docs/pick-commit.md index ed507b1a..89350be6 100644 --- a/docs/pick-commit.md +++ b/docs/pick-commit.md @@ -151,4 +151,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pick-commit.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of pick-commit.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/ping-host.md b/docs/ping-host.md index c4ea7644..290ecbde 100644 --- a/docs/ping-host.md +++ b/docs/ping-host.md @@ -132,4 +132,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of ping-host.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-host.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/ping-local-hosts.md b/docs/ping-local-hosts.md index 5c17ab32..ed403fe5 100644 --- a/docs/ping-local-hosts.md +++ b/docs/ping-local-hosts.md @@ -58,9 +58,7 @@ param([int]$timeout = 600) # ms ping timeout try { - Write-Progress "Sending pings to the local hosts..." - - $names = @('accesspoint','AD','AP','amnesiac','archlinux','auriga','berlin','boston','brother','canon','castor','cisco','echodot','epson','epson2550','epson2815','fedora','fireball','firewall','fritz.box','fritz!repeater','gassensor','gateway','hippo','heizung','hodor','homemanager','io','iphone','jarvis','jenkins','LA','laptop','linux','jupiter','mars','mercury','miami','mobile','none','none-1','none-2','NY','octo','office','officepc','paris','PI','pixel-6a','PC','pluto','printer','proxy','R2D2','raspberry','rocket','rome','router','sentinel','server','shelly','shelly1','smartphone','smartwatch','soundbar','sunnyboy','surface','switch','tablet','tau','tigercat','tolino','TV','ubuntu','vega','venus','xrx','zeus') # sorted alphabetically + $names = @('accesspoint','AD','AP','amnesiac','archlinux','auriga','berlin','boston','brother','canon','castor','cisco','echodot','epson','epson2550','epson2815','fedora','fireball','firewall','fritz.box','fritz.repeater','gassensor','gateway','hippo','heizung','hodor','homemanager','io','iphone','jarvis','jenkins','LA','laptop','linux','jupiter','mars','mercury','miami','mobile','none','none-1','none-2','NY','octo','office','officepc','paris','PI','pixel-6a','PC','pluto','printer','proxy','R2D2','raspberry','rocket','rome','router','sentinel','server','shelly','shelly1','smartphone','smartwatch','soundbar','sunnyboy','surface','switch','tablet','tau','tigercat','tolino','TV','ubuntu','vega','venus','xrx','zeus') # sorted alphabetically $queue = [System.Collections.Queue]::new() foreach($name in $names) { $ping = [System.Net.Networkinformation.Ping]::new() @@ -68,17 +66,15 @@ try { } [string]$up = "" + Write-Host "βœ… Up: " -noNewline while ($queue.Count -gt 0) { $obj = $queue.Dequeue() try { if ($obj.Async.Wait($timeout)) { - if ($obj.Async.Result.Status -ne "TimedOut") { $up += "$($obj.Host) " } + if ($obj.Async.Result.Status -ne "TimedOut") { Write-Host "$($obj.Host) " -noNewline } continue } } catch { continue } $queue.Enqueue($obj) } - - Write-Progress -completed "Done." - Write-Host "βœ… Up: $up" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -86,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of ping-local-hosts.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-local-hosts.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/ping-remote-hosts.md b/docs/ping-remote-hosts.md index 6448fe93..3d6a9af9 100644 --- a/docs/ping-remote-hosts.md +++ b/docs/ping-remote-hosts.md @@ -26,7 +26,7 @@ Example ------- ```powershell PS> ./ping-remote-hosts.ps1 -βœ… Online with 18ms latency (13...109ms, 0/10 ping loss) +βœ… Online with 0/10 ping loss and 11...40ms latency - 18ms average ``` @@ -50,7 +50,7 @@ Script Content Specifies the hosts to ping, seperated by commata (10 Internet servers by default) .EXAMPLE PS> ./ping-remote-hosts.ps1 - βœ… Online with 18ms latency (13...109ms, 0/10 ping loss) + βœ… Online with 0/10 ping loss and 11...40ms latency - 18ms average .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -61,7 +61,7 @@ param([string]$hosts = "bing.com,cnn.com,dropbox.com,github.com,google.com,ibm.c try { $hostsArray = $hosts.Split(",") - $tasks = $hostsArray | foreach { (New-Object Net.NetworkInformation.Ping).SendPingAsync($_,750) } + $tasks = $hostsArray | foreach { (New-Object Net.NetworkInformation.Ping).SendPingAsync($_,1000) } [int]$min = 9999999 [int]$max = [int]$avg = [int]$success = 0 [int]$total = $hostsArray.Count @@ -77,7 +77,7 @@ try { [int]$loss = $total - $success if ($success -ne 0) { $avg /= $success - Write-Host "βœ… Online with $($avg)ms latency ($($min)...$($max)ms, $loss/$total ping loss)" + Write-Host "βœ… Online with $loss/$total ping loss and $($min)...$($max)ms latency - $($avg)ms average" } else { Write-Host "⚠️ Offline ($loss/$total ping loss)" } @@ -88,4 +88,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of ping-remote-hosts.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-remote-hosts.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/ping-weather.md b/docs/ping-weather.md index 29889613..1a7a7358 100644 --- a/docs/ping-weather.md +++ b/docs/ping-weather.md @@ -99,4 +99,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of ping-weather.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-weather.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-bee-sound.md b/docs/play-bee-sound.md index a7b8e9cb..4084a76a 100644 --- a/docs/play-bee-sound.md +++ b/docs/play-bee-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-bee-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-bee-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-beep-sound.md b/docs/play-beep-sound.md index c03c92cc..2e066633 100644 --- a/docs/play-beep-sound.md +++ b/docs/play-beep-sound.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-beep-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-beep-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-big-ben.md b/docs/play-big-ben.md index 5b09988a..b357a728 100644 --- a/docs/play-big-ben.md +++ b/docs/play-big-ben.md @@ -50,4 +50,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-big-ben.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-big-ben.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-cat-sound.md b/docs/play-cat-sound.md index 227f4bf8..b12a58b9 100644 --- a/docs/play-cat-sound.md +++ b/docs/play-cat-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-cat-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-cat-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-cow-sound.md b/docs/play-cow-sound.md index 8ced66d7..cbcfde66 100644 --- a/docs/play-cow-sound.md +++ b/docs/play-cow-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-cow-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-cow-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-dog-sound.md b/docs/play-dog-sound.md index 93dc0591..1c8bf93b 100644 --- a/docs/play-dog-sound.md +++ b/docs/play-dog-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-dog-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-dog-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-donkey-sound.md b/docs/play-donkey-sound.md index f7c5f196..c1a8b9cd 100644 --- a/docs/play-donkey-sound.md +++ b/docs/play-donkey-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-donkey-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-donkey-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-elephant-sound.md b/docs/play-elephant-sound.md index 86387382..c704cfaa 100644 --- a/docs/play-elephant-sound.md +++ b/docs/play-elephant-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-elephant-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-elephant-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-elk-sound.md b/docs/play-elk-sound.md index a545ad97..6b53eb06 100644 --- a/docs/play-elk-sound.md +++ b/docs/play-elk-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-elk-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-elk-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-files.md b/docs/play-files.md index 0ebea90c..8a591ffe 100644 --- a/docs/play-files.md +++ b/docs/play-files.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-files.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-files.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-frog-sound.md b/docs/play-frog-sound.md index 9f221788..96e9c53a 100644 --- a/docs/play-frog-sound.md +++ b/docs/play-frog-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-frog-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-frog-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-goat-sound.md b/docs/play-goat-sound.md index 8cc8f121..9d2440b8 100644 --- a/docs/play-goat-sound.md +++ b/docs/play-goat-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-goat-sound.ps1 as of 05/19/2024 10:25:24)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-goat-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-gorilla-sound.md b/docs/play-gorilla-sound.md index 552821e7..b0038f3b 100644 --- a/docs/play-gorilla-sound.md +++ b/docs/play-gorilla-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-gorilla-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-gorilla-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-happy-birthday.md b/docs/play-happy-birthday.md index 51a0d4af..816dd567 100644 --- a/docs/play-happy-birthday.md +++ b/docs/play-happy-birthday.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-happy-birthday.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-happy-birthday.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-horse-sound.md b/docs/play-horse-sound.md index f8b36a09..317f0983 100644 --- a/docs/play-horse-sound.md +++ b/docs/play-horse-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-horse-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-horse-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-imperial-march.md b/docs/play-imperial-march.md index 452c9f6a..d4fedaa7 100644 --- a/docs/play-imperial-march.md +++ b/docs/play-imperial-march.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-imperial-march.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-imperial-march.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-jingle-bells.md b/docs/play-jingle-bells.md index 76c6c64c..02c187ed 100644 --- a/docs/play-jingle-bells.md +++ b/docs/play-jingle-bells.md @@ -201,4 +201,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-jingle-bells.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-jingle-bells.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-lion-sound.md b/docs/play-lion-sound.md index ef3b32ca..958e94a1 100644 --- a/docs/play-lion-sound.md +++ b/docs/play-lion-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-lion-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-lion-sound.ps1 as of 08/15/2024 09:50:52)* diff --git a/docs/play-m3u.md b/docs/play-m3u.md index 01eb6306..e8c0c1a7 100644 --- a/docs/play-m3u.md +++ b/docs/play-m3u.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-m3u.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-m3u.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-mission-impossible.md b/docs/play-mission-impossible.md index cd39b706..e9316013 100644 --- a/docs/play-mission-impossible.md +++ b/docs/play-mission-impossible.md @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-mission-impossible.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-mission-impossible.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-mp3.md b/docs/play-mp3.md index c22705fc..f23b024b 100644 --- a/docs/play-mp3.md +++ b/docs/play-mp3.md @@ -93,4 +93,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-mp3.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-mp3.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-parrot-sound.md b/docs/play-parrot-sound.md index 4aaf0f0d..eb608fd2 100644 --- a/docs/play-parrot-sound.md +++ b/docs/play-parrot-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-parrot-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-parrot-sound.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-pig-sound.md b/docs/play-pig-sound.md index 645b4d34..5de1f69d 100644 --- a/docs/play-pig-sound.md +++ b/docs/play-pig-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-pig-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-pig-sound.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-pong.md b/docs/play-pong.md index 94f5adad..cbf70b2e 100644 --- a/docs/play-pong.md +++ b/docs/play-pong.md @@ -176,4 +176,4 @@ while ($true) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-pong.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-pong.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-rattlesnake-sound.md b/docs/play-rattlesnake-sound.md index b8e74b2e..c4f59e91 100644 --- a/docs/play-rattlesnake-sound.md +++ b/docs/play-rattlesnake-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-rattlesnake-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-rattlesnake-sound.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-rick.md b/docs/play-rick.md index 0ae5acf4..885e0b4b 100644 --- a/docs/play-rick.md +++ b/docs/play-rick.md @@ -49,4 +49,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-rick.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-rick.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-snake.md b/docs/play-snake.md index cb787ab2..1e3ac030 100644 --- a/docs/play-snake.md +++ b/docs/play-snake.md @@ -86,4 +86,4 @@ Start-Sleep -milliseconds 300 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-snake.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-snake.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-super-mario.md b/docs/play-super-mario.md index 5edc9f2c..80bf5737 100644 --- a/docs/play-super-mario.md +++ b/docs/play-super-mario.md @@ -71,4 +71,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-super-mario.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-super-mario.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-system-sounds.md b/docs/play-system-sounds.md index b07aeada..36eb1ab8 100644 --- a/docs/play-system-sounds.md +++ b/docs/play-system-sounds.md @@ -55,4 +55,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-system-sounds.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-system-sounds.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-tetris-melody.md b/docs/play-tetris-melody.md index 2df25ffa..8276ec77 100644 --- a/docs/play-tetris-melody.md +++ b/docs/play-tetris-melody.md @@ -161,4 +161,4 @@ Start-Sleep -milliseconds 500 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-tetris-melody.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-tetris-melody.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-vulture-sound.md b/docs/play-vulture-sound.md index 3cbaa075..c89114ab 100644 --- a/docs/play-vulture-sound.md +++ b/docs/play-vulture-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-vulture-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-vulture-sound.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/play-wolf-sound.md b/docs/play-wolf-sound.md index 5bafc855..bf4ba165 100644 --- a/docs/play-wolf-sound.md +++ b/docs/play-wolf-sound.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-wolf-sound.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-wolf-sound.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/poweroff.md b/docs/poweroff.md index df7067b9..6eae73bd 100644 --- a/docs/poweroff.md +++ b/docs/poweroff.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of poweroff.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of poweroff.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/print-image.md b/docs/print-image.md index c8105ee0..546df36b 100644 --- a/docs/print-image.md +++ b/docs/print-image.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of print-image.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of print-image.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/publish-to-ipfs.md b/docs/publish-to-ipfs.md index 738bc553..cbd6dd6e 100644 --- a/docs/publish-to-ipfs.md +++ b/docs/publish-to-ipfs.md @@ -119,4 +119,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of publish-to-ipfs.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of publish-to-ipfs.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/pull-repo.md b/docs/pull-repo.md index a18e7dbc..4ada390e 100644 --- a/docs/pull-repo.md +++ b/docs/pull-repo.md @@ -27,7 +27,7 @@ Example ```powershell PS> ./pull-repo.ps1 ⏳ (1/4) Searching for Git executable... git version 2.44.0.windows.1 -⏳ (2/4) Checking local repository... πŸ“‚C:\Repos\rust +⏳ (2/4) Checking local repository... C:\Repos\rust ⏳ (3/4) Pulling remote updates... ⏳ (4/4) Updating submodules... βœ”οΈ Updates pulled into πŸ“‚rust repo in 14s. @@ -55,7 +55,7 @@ Script Content .EXAMPLE PS> ./pull-repo.ps1 ⏳ (1/4) Searching for Git executable... git version 2.44.0.windows.1 - ⏳ (2/4) Checking local repository... πŸ“‚C:\Repos\rust + ⏳ (2/4) Checking local repository... C:\Repos\rust ⏳ (3/4) Pulling remote updates... ⏳ (4/4) Updating submodules... βœ”οΈ Updates pulled into πŸ“‚rust repo in 14s. @@ -74,13 +74,16 @@ try { & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/4) Checking local repository... πŸ“‚$pathToRepo" + Write-Host "⏳ (2/4) Checking local repository... $pathToRepo" if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access folder: $pathToRepo" } $result = (git -C "$pathToRepo" status) if ("$result" -match "HEAD detached at ") { throw "Nothing to pull due to detached HEAD state (not on a branch!)" } $pathToRepoName = (Get-Item "$pathToRepo").Name - Write-Host "⏳ (3/4) Pulling remote updates..." + Write-Host "⏳ (3/4) Pulling remote updates... " -noNewline + & git -C "$pathToRepo" remote get-url origin + if ($lastExitCode -ne "0") { throw "'git remote get-url origin' failed with exit code $lastExitCode" } + & git -C "$pathToRepo" pull --recurse-submodules=yes if ($lastExitCode -ne "0") { throw "'git pull' failed with exit code $lastExitCode" } @@ -92,9 +95,9 @@ try { "βœ”οΈ Updates pulled into πŸ“‚$pathToRepoName repo in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ Error: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)" exit 1 } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/pull-repos.md b/docs/pull-repos.md index 048404cc..3a0e01f9 100644 --- a/docs/pull-repos.md +++ b/docs/pull-repos.md @@ -94,10 +94,10 @@ try { } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds if ($failed -eq 0) { - "βœ”οΈ Remote updates pulled into $numFolders repos within πŸ“‚$parentDirName in $($elapsed)s." + "βœ”οΈ Updated $numFolders repositories under πŸ“‚$parentDirName in $($elapsed)s." exit 0 # success } else { - "⚠️ Updated $numFolders repos under πŸ“‚$parentDirName but $failed failed (took $elapsed sec)." + "⚠️ Updated $numFolders repositories under πŸ“‚$parentDirName in $($elapsed)s but $failed failed!" exit 1 } } catch { @@ -106,4 +106,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pull-repos.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of pull-repos.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/query-smart-data.md b/docs/query-smart-data.md index 5ad7bab1..4895b237 100644 --- a/docs/query-smart-data.md +++ b/docs/query-smart-data.md @@ -106,4 +106,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of query-smart-data.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of query-smart-data.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/reboot-fritzbox.md b/docs/reboot-fritzbox.md index 7cd392cc..868c3991 100644 --- a/docs/reboot-fritzbox.md +++ b/docs/reboot-fritzbox.md @@ -152,4 +152,4 @@ echo $Result exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of reboot-fritzbox.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of reboot-fritzbox.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/reboot.md b/docs/reboot.md index 22dd19e4..b2892a71 100644 --- a/docs/reboot.md +++ b/docs/reboot.md @@ -59,4 +59,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of reboot.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of reboot.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remember.md b/docs/remember.md new file mode 100644 index 00000000..c515bed8 --- /dev/null +++ b/docs/remember.md @@ -0,0 +1,104 @@ +Script: *remember.ps1* +======================== + +This PowerShell script saves the given text to 'Remember.csv' in your home folder. + +Parameters +---------- +```powershell +PS> ./remember.ps1 [[-text1] ] [[-text2] ] [[-text3] ] [] + +-text1 + Specifies the text to memorize + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +-text2 + + Required? false + Position? 2 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +-text3 + + Required? false + Position? 3 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./remember.ps1 "Buy apples" +βœ”οΈ Saved to /home/Markus/Remember.csv in 0s. + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Remembers a text +.DESCRIPTION + This PowerShell script saves the given text to 'Remember.csv' in your home folder. +.PARAMETER text1 + Specifies the text to memorize +.EXAMPLE + PS> ./remember.ps1 "Buy apples" + βœ”οΈ Saved to /home/Markus/Remember.csv in 0s. +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$text1 = "", [string]$text2 = "", [string]$text3 = "") + +try { + if ($text1 -eq "") { $text1 = Read-Host "Enter what needs to be remembered" } + + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + [string]$timestampString = Get-Date -UFormat %s + $timestampString = $timestampString -replace ',','.' + [int64]$unixTimestamp = $timestampString + + $path = "~/Remember.csv" + + if (-not(Test-Path "$path" -pathType leaf)) { + Write-Output "TIMESTAMP,TEXT" > $path + } + Write-Output "$($unixTimestamp),$text1 $text2 $text3" >> $path + $path = Resolve-Path $path + + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "βœ”οΈ Saved to $path in $($elapsed)s." + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of remember.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remind-me.md b/docs/remind-me.md index 5687725e..e1bef389 100644 --- a/docs/remind-me.md +++ b/docs/remind-me.md @@ -88,4 +88,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remind-me.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remind-me.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remove-dir-tree.md b/docs/remove-dir-tree.md index bd82ab7a..40392cc6 100644 --- a/docs/remove-dir-tree.md +++ b/docs/remove-dir-tree.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-dir-tree.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-dir-tree.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remove-empty-dirs.md b/docs/remove-empty-dirs.md index def27876..844486e0 100644 --- a/docs/remove-empty-dirs.md +++ b/docs/remove-empty-dirs.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-empty-dirs.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-empty-dirs.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remove-old-dirs.md b/docs/remove-old-dirs.md index 86f0aaad..192ae5d5 100644 --- a/docs/remove-old-dirs.md +++ b/docs/remove-old-dirs.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-old-dirs.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-old-dirs.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remove-print-jobs.md b/docs/remove-print-jobs.md index 32f4bdfc..1e4e7414 100644 --- a/docs/remove-print-jobs.md +++ b/docs/remove-print-jobs.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-print-jobs.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-print-jobs.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remove-tag.md b/docs/remove-tag.md index 91b4026c..bb740b36 100644 --- a/docs/remove-tag.md +++ b/docs/remove-tag.md @@ -111,4 +111,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-tag.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-tag.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remove-user.md b/docs/remove-user.md index a7732848..390bfe76 100644 --- a/docs/remove-user.md +++ b/docs/remove-user.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-user.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-user.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/remove-vm.md b/docs/remove-vm.md index ab72fe13..eca85fa3 100644 --- a/docs/remove-vm.md +++ b/docs/remove-vm.md @@ -25,4 +25,4 @@ Remove-Item -Path "C:\VirtualMachines\$VMName" -Recurse exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of remove-vm.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-vm.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/replace-in-files.md b/docs/replace-in-files.md index 5b84e35b..aeb408af 100644 --- a/docs/replace-in-files.md +++ b/docs/replace-in-files.md @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of replace-in-files.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of replace-in-files.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/restart-network-adapters.md b/docs/restart-network-adapters.md index e25e02a8..7b895b9e 100644 --- a/docs/restart-network-adapters.md +++ b/docs/restart-network-adapters.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of restart-network-adapters.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of restart-network-adapters.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/roll-a-dice.md b/docs/roll-a-dice.md index 453adf56..c81c9714 100644 --- a/docs/roll-a-dice.md +++ b/docs/roll-a-dice.md @@ -51,4 +51,4 @@ $Number = "1", "2", "3", "4", "5", "6" | Get-Random exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of roll-a-dice.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of roll-a-dice.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/save-credentials.md b/docs/save-credentials.md index f6b54431..1f9134f5 100644 --- a/docs/save-credentials.md +++ b/docs/save-credentials.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of save-credentials.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of save-credentials.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/save-screenshot.md b/docs/save-screenshot.md index d815ce89..05abe23a 100644 --- a/docs/save-screenshot.md +++ b/docs/save-screenshot.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of save-screenshot.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of save-screenshot.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/scan-network.md b/docs/scan-network.md index e82b5acc..14ec9e6f 100644 --- a/docs/scan-network.md +++ b/docs/scan-network.md @@ -32,4 +32,4 @@ $arguments = $arguments + " " + $targets Start-Process $location -ArgumentList $arguments -Wait ``` -*(generated by convert-ps2md.ps1 using the comment-based help of scan-network.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of scan-network.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/scan-ports.md b/docs/scan-ports.md index 60c45325..60c99410 100644 --- a/docs/scan-ports.md +++ b/docs/scan-ports.md @@ -65,4 +65,4 @@ foreach($add in $range) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of scan-ports.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of scan-ports.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/search-filename.md b/docs/search-filename.md index 0b020652..9e3e26df 100644 --- a/docs/search-filename.md +++ b/docs/search-filename.md @@ -96,4 +96,4 @@ Search-Folder -FilePath $path -SearchTerm $term exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of search-filename.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of search-filename.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/search-files.md b/docs/search-files.md index a472ba9b..a72d8772 100644 --- a/docs/search-files.md +++ b/docs/search-files.md @@ -1,7 +1,7 @@ Script: *search-files.ps1* ======================== -This PowerShell script searches for the given pattern in the given files. +This PowerShell script searches for the given text pattern in the given files. Parameters ---------- @@ -58,9 +58,9 @@ Script Content ```powershell <# .SYNOPSIS - Searches for a text pattern in files + Searches for text in files .DESCRIPTION - This PowerShell script searches for the given pattern in the given files. + This PowerShell script searches for the given text pattern in the given files. .PARAMETER textPattern Specifies the text pattern to search for .PARAMETER filePattern @@ -80,17 +80,15 @@ Script Content param([string]$textPattern = "", [string]$filePattern = "") -function ListLocations { param([string]$Pattern, [string]$Path) - $list = Select-String -path $Path -pattern "$Pattern" - foreach ($item in $list) { - New-Object PSObject -Property @{ 'FILE'="$($item.Path)"; 'LINE'="$($item.LineNumber):$($item.Line)" } - } - Write-Output "βœ”οΈ Found $($list.Count) lines containing '$Pattern' in $filePattern." +function ListLocations { param([string]$textPattern, [string]$filePattern) + $list = Select-String -path $filePattern -pattern "$textPattern" + foreach($item in $list) { New-Object PSObject -Property @{ 'FILE'="$($item.Path)"; 'LINE'="$($item.LineNumber):$($item.Line)" } } + "βœ”οΈ Found $($list.Count) lines containing '$textPattern' in $filePattern." } try { - if ($textPattern -eq "" ) { $textPattern = Read-Host "Enter the text pattern (e.g. 'UFO')" } - if ($filePattern -eq "" ) { $filePattern = Read-Host "Enter the file pattern (e.g. '*.ps1')" } + if ($textPattern -eq "" ) { $textPattern = Read-Host "Enter the text pattern, e.g. 'UFO'" } + if ($filePattern -eq "" ) { $filePattern = Read-Host "Enter the file pattern, e.g. '*.ps1'" } ListLocations $textPattern $filePattern | Format-Table -property FILE,LINE -autoSize exit 0 # success @@ -100,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of search-files.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of search-files.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/send-email.md b/docs/send-email.md index 45dd4666..698fd43a 100644 --- a/docs/send-email.md +++ b/docs/send-email.md @@ -121,4 +121,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of send-email.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-email.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/send-tcp.md b/docs/send-tcp.md index 9e399ba9..b7466122 100644 --- a/docs/send-tcp.md +++ b/docs/send-tcp.md @@ -104,4 +104,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of send-tcp.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-tcp.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/send-udp.md b/docs/send-udp.md index 0e215b85..ff98e146 100644 --- a/docs/send-udp.md +++ b/docs/send-udp.md @@ -102,4 +102,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of send-udp.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-udp.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/set-timer.md b/docs/set-timer.md index 031460b3..8f35daba 100644 --- a/docs/set-timer.md +++ b/docs/set-timer.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of set-timer.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-timer.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/set-volume.md b/docs/set-volume.md index 2eff3e36..7a80a4f7 100644 --- a/docs/set-volume.md +++ b/docs/set-volume.md @@ -77,4 +77,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of set-volume.ps1 as of 05/19/2024 10:25:25)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-volume.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/set-wallpaper.md b/docs/set-wallpaper.md index 9979a799..a7488a84 100644 --- a/docs/set-wallpaper.md +++ b/docs/set-wallpaper.md @@ -122,4 +122,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of set-wallpaper.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-wallpaper.ps1 as of 08/15/2024 09:50:53)* diff --git a/docs/show-lightnings.md b/docs/show-lightnings.md index 6b3a8c79..024e4246 100644 --- a/docs/show-lightnings.md +++ b/docs/show-lightnings.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of show-lightnings.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-lightnings.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/show-notification-motivation-quote.md b/docs/show-notification-motivation-quote.md index 43f36bf3..ee389f91 100644 --- a/docs/show-notification-motivation-quote.md +++ b/docs/show-notification-motivation-quote.md @@ -1,31 +1,26 @@ Script: *show-notification-motivation-quote.ps1* ======================== -This PowerShell script shows a toast-message notification with random cat picture and random motivation quote. -You can change Quote API key using yours. +show-notification-motivation-quote.ps1 -Example -------- + +Parameters +---------- ```powershell -PS> ./show-notification-motivation-quote.ps1 + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. ``` -Notes ------ -Author: [Gorlov Igor](https://github.com/noBloodOnTheLeaves) | License: CC0 - -Related Links -------------- -https://github.com/fleschutz/PowerShell - Script Content -------------- ```powershell - #Api key for quotes https://api.api-ninjas.com +#Api key for quotes https://api.api-ninjas.com $headerQuote = @{ "X-Api-Key"="FZ/rIx6RAn/W7+3S10zrHQ==gWBfP5fO0xcUiKp3" - } + } #calling api and getting quoute $quote = Invoke-WebRequest -Uri https://api.api-ninjas.com/v1/quotes?category=inspirational -Method GET -Headers $headerQuote #parsing json response @@ -71,4 +66,7 @@ $XmlDocument = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocume $XmlDocument.loadXml($xml) $AppId = '{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\WindowsPowerShell\v1.0\powershell.exe' [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime]::CreateToastNotifier($AppId).Show($XmlDocument) + ``` + +*(generated by convert-ps2md.ps1 using the comment-based help of show-notification-motivation-quote.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/show-notification.md b/docs/show-notification.md index 855eadd7..0403f787 100644 --- a/docs/show-notification.md +++ b/docs/show-notification.md @@ -96,4 +96,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of show-notification.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-notification.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/show-traffic.md b/docs/show-traffic.md index 992a30de..11445b40 100644 --- a/docs/show-traffic.md +++ b/docs/show-traffic.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of show-traffic.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-traffic.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/simulate-presence.md b/docs/simulate-presence.md index 3da308da..0d20485b 100644 --- a/docs/simulate-presence.md +++ b/docs/simulate-presence.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of simulate-presence.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of simulate-presence.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/smart-data2csv.md b/docs/smart-data2csv.md index b162fec5..1aa5f217 100644 --- a/docs/smart-data2csv.md +++ b/docs/smart-data2csv.md @@ -141,4 +141,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of smart-data2csv.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of smart-data2csv.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-arabic.md b/docs/speak-arabic.md index 9810b043..e9eb563e 100644 --- a/docs/speak-arabic.md +++ b/docs/speak-arabic.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-arabic.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-arabic.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-checklist.md b/docs/speak-checklist.md index 0ff517b8..91ef9f6e 100644 --- a/docs/speak-checklist.md +++ b/docs/speak-checklist.md @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-checklist.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-checklist.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-countdown.md b/docs/speak-countdown.md index 78a749de..82bc08dd 100644 --- a/docs/speak-countdown.md +++ b/docs/speak-countdown.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-countdown.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-countdown.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-croatian.md b/docs/speak-croatian.md index 57188ccc..5045e4e4 100644 --- a/docs/speak-croatian.md +++ b/docs/speak-croatian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-croatian.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-croatian.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-danish.md b/docs/speak-danish.md index b5ffe585..77b81ce6 100644 --- a/docs/speak-danish.md +++ b/docs/speak-danish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-danish.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-danish.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-dutch.md b/docs/speak-dutch.md index 5687863d..0241fe14 100644 --- a/docs/speak-dutch.md +++ b/docs/speak-dutch.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-dutch.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-dutch.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-english.md b/docs/speak-english.md index 9b000164..7358137f 100644 --- a/docs/speak-english.md +++ b/docs/speak-english.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-english.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-english.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-epub.md b/docs/speak-epub.md index de7a84fd..44978ba0 100644 --- a/docs/speak-epub.md +++ b/docs/speak-epub.md @@ -139,4 +139,4 @@ foreach($item in $content.package.manifest.Item) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-epub.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-epub.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-esperanto.md b/docs/speak-esperanto.md index 8276befa..02ffc322 100644 --- a/docs/speak-esperanto.md +++ b/docs/speak-esperanto.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-esperanto.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-esperanto.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-file.md b/docs/speak-file.md index 40709763..a9e41549 100644 --- a/docs/speak-file.md +++ b/docs/speak-file.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-file.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-file.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-finnish.md b/docs/speak-finnish.md index c64ab348..52e94f99 100644 --- a/docs/speak-finnish.md +++ b/docs/speak-finnish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-finnish.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-finnish.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-french.md b/docs/speak-french.md index 96064937..801899e5 100644 --- a/docs/speak-french.md +++ b/docs/speak-french.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-french.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-french.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-german.md b/docs/speak-german.md index 831fd8d3..20ae4ebf 100644 --- a/docs/speak-german.md +++ b/docs/speak-german.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-german.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-german.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-greek.md b/docs/speak-greek.md index c3a4006b..dcc991c5 100644 --- a/docs/speak-greek.md +++ b/docs/speak-greek.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-greek.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-greek.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-hebrew.md b/docs/speak-hebrew.md index a66a5045..1f90e0fc 100644 --- a/docs/speak-hebrew.md +++ b/docs/speak-hebrew.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-hebrew.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-hebrew.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-hindi.md b/docs/speak-hindi.md index 96427140..e658b961 100644 --- a/docs/speak-hindi.md +++ b/docs/speak-hindi.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-hindi.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-hindi.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-italian.md b/docs/speak-italian.md index 4eb023b4..6cf39db6 100644 --- a/docs/speak-italian.md +++ b/docs/speak-italian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-italian.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-italian.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-japanese.md b/docs/speak-japanese.md index bb7b6c8e..87841d17 100644 --- a/docs/speak-japanese.md +++ b/docs/speak-japanese.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-japanese.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-japanese.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-korean.md b/docs/speak-korean.md index 14bfd9ea..9a1ebc49 100644 --- a/docs/speak-korean.md +++ b/docs/speak-korean.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-korean.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-korean.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-latin.md b/docs/speak-latin.md index ecbbf587..a55b73c5 100644 --- a/docs/speak-latin.md +++ b/docs/speak-latin.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-latin.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-latin.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-mandarin.md b/docs/speak-mandarin.md index 78b3ce45..bd6ec98e 100644 --- a/docs/speak-mandarin.md +++ b/docs/speak-mandarin.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-mandarin.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-mandarin.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-norwegian.md b/docs/speak-norwegian.md index 74f09fb2..6ccd4f92 100644 --- a/docs/speak-norwegian.md +++ b/docs/speak-norwegian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-norwegian.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-norwegian.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-polish.md b/docs/speak-polish.md index f21affc8..2ad0c546 100644 --- a/docs/speak-polish.md +++ b/docs/speak-polish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-polish.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-polish.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-portuguese.md b/docs/speak-portuguese.md index 40bc60d7..81e9d590 100644 --- a/docs/speak-portuguese.md +++ b/docs/speak-portuguese.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-portuguese.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-portuguese.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-russian.md b/docs/speak-russian.md index a5d7de47..651afbc3 100644 --- a/docs/speak-russian.md +++ b/docs/speak-russian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-russian.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-russian.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-spanish.md b/docs/speak-spanish.md index b27a165b..6a9683af 100644 --- a/docs/speak-spanish.md +++ b/docs/speak-spanish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-spanish.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-spanish.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-swedish.md b/docs/speak-swedish.md index 6ba5a9a4..d21abf29 100644 --- a/docs/speak-swedish.md +++ b/docs/speak-swedish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-swedish.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-swedish.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-test.md b/docs/speak-test.md index 5d7823fa..698759d0 100644 --- a/docs/speak-test.md +++ b/docs/speak-test.md @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-test.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-test.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-text.md b/docs/speak-text.md index 87a4533a..0009faac 100644 --- a/docs/speak-text.md +++ b/docs/speak-text.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-text.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-text.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-thai.md b/docs/speak-thai.md index 02b913c0..c33297d9 100644 --- a/docs/speak-thai.md +++ b/docs/speak-thai.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-thai.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-thai.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-turkish.md b/docs/speak-turkish.md index 489250b3..3ea3a3e3 100644 --- a/docs/speak-turkish.md +++ b/docs/speak-turkish.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-turkish.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-turkish.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/speak-ukrainian.md b/docs/speak-ukrainian.md index 4d4a69af..fee7ff38 100644 --- a/docs/speak-ukrainian.md +++ b/docs/speak-ukrainian.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-ukrainian.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-ukrainian.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/spell-word.md b/docs/spell-word.md index c03e00fd..6a3ae9cc 100644 --- a/docs/spell-word.md +++ b/docs/spell-word.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of spell-word.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of spell-word.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/start-ipfs-server.md b/docs/start-ipfs-server.md index 6474823b..ec4d89a4 100644 --- a/docs/start-ipfs-server.md +++ b/docs/start-ipfs-server.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of start-ipfs-server.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of start-ipfs-server.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/suspend.md b/docs/suspend.md index 5d4e6e9c..dc379507 100644 --- a/docs/suspend.md +++ b/docs/suspend.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of suspend.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of suspend.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/switch-branch.md b/docs/switch-branch.md index 4d34c4f4..da741375 100644 --- a/docs/switch-branch.md +++ b/docs/switch-branch.md @@ -1,7 +1,7 @@ Script: *switch-branch.ps1* ======================== -This PowerShell script switches to the given branch in a Git repository (also updates submodules). +This PowerShell script switches to the given branch in a Git repository and also updates the submodules. Parameters ---------- @@ -34,9 +34,9 @@ PS> ./switch-branch.ps1 [[-branchName] ] [[-pathToRepo] ] [ ./switch-branch main C:\Repos\rust +PS> ./switch-branch main ⏳ (1/6) Searching for Git executable... git version 2.43.0.windows.1 -⏳ (2/6) Checking local repository... πŸ“‚C:\Repos\rust +⏳ (2/6) Checking local repository... C:\Repos\rust ⏳ (3/6) Fetching remote updates... ⏳ (4/6) Switching to branch 'main'... ⏳ (5/6) Pulling remote updates... @@ -60,15 +60,15 @@ Script Content .SYNOPSIS Switches the Git branch .DESCRIPTION - This PowerShell script switches to the given branch in a Git repository (also updates submodules). + This PowerShell script switches to the given branch in a Git repository and also updates the submodules. .PARAMETER branchName Specifies the Git branch name to switch to .PARAMETER pathToRepo Specifies the file path to the local Git repository .EXAMPLE - PS> ./switch-branch main C:\Repos\rust + PS> ./switch-branch main ⏳ (1/6) Searching for Git executable... git version 2.43.0.windows.1 - ⏳ (2/6) Checking local repository... πŸ“‚C:\Repos\rust + ⏳ (2/6) Checking local repository... C:\Repos\rust ⏳ (3/6) Fetching remote updates... ⏳ (4/6) Switching to branch 'main'... ⏳ (5/6) Pulling remote updates... @@ -91,14 +91,17 @@ try { & git --version if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Host "⏳ (2/6) Checking local repository... πŸ“‚$pathToRepo" + Write-Host "⏳ (2/6) Checking local repository... $pathToRepo" if (-not(Test-Path "$pathToRepo" -pathType container)) { throw "Can't access repo folder: $pathToRepo" } $result = (git -C "$pathToRepo" status) if ($lastExitCode -ne "0") { throw "'git status' in $pathToRepo failed with exit code $lastExitCode" } if ("$result" -notmatch "nothing to commit, working tree clean") { throw "Git repository is NOT clean: $result" } $repoDirName = (Get-Item "$pathToRepo").Name - "⏳ (3/6) Fetching remote updates..." + Write-Host "⏳ (3/6) Fetching remote updates... " -noNewline + & git -C "$pathToRepo" remote get-url origin + if ($lastExitCode -ne "0") { throw "'git remote get-url origin' failed with exit code $lastExitCode" } + & git -C "$pathToRepo" fetch --all --prune --prune-tags --force if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } @@ -118,9 +121,9 @@ try { "βœ”οΈ Switched πŸ“‚$repoDirName repo to '$branchName' branch in $($elapsed)s." exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + "⚠️ Error: $($Error[0]) in script line $($_.InvocationInfo.ScriptLineNumber)" exit 1 } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-branch.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-branch.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/switch-shelly1.md b/docs/switch-shelly1.md index aea5b952..28d77cea 100644 --- a/docs/switch-shelly1.md +++ b/docs/switch-shelly1.md @@ -94,4 +94,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-shelly1.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-shelly1.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/switch-tabs.md b/docs/switch-tabs.md index 9bf08677..6dc216a7 100644 --- a/docs/switch-tabs.md +++ b/docs/switch-tabs.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-tabs.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-tabs.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/sync-folder.md b/docs/sync-folder.md index e331f9a5..6c91c567 100644 --- a/docs/sync-folder.md +++ b/docs/sync-folder.md @@ -96,4 +96,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of sync-folder.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of sync-folder.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/sync-repo.md b/docs/sync-repo.md index 65cccb1a..e4b9f174 100644 --- a/docs/sync-repo.md +++ b/docs/sync-repo.md @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of sync-repo.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of sync-repo.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/tell-joke.md b/docs/tell-joke.md index b6bbc8c7..8da7aceb 100644 --- a/docs/tell-joke.md +++ b/docs/tell-joke.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of tell-joke.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of tell-joke.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/tell-new-year.md b/docs/tell-new-year.md index af6254e8..deca451e 100644 --- a/docs/tell-new-year.md +++ b/docs/tell-new-year.md @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of tell-new-year.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of tell-new-year.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/tell-quote.md b/docs/tell-quote.md index ae3a5432..133c8aef 100644 --- a/docs/tell-quote.md +++ b/docs/tell-quote.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of tell-quote.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of tell-quote.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/toggle-caps-lock.md b/docs/toggle-caps-lock.md index 697ab9b6..95d3f314 100644 --- a/docs/toggle-caps-lock.md +++ b/docs/toggle-caps-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of toggle-caps-lock.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-caps-lock.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/toggle-num-lock.md b/docs/toggle-num-lock.md index abeeadec..0b44f86c 100644 --- a/docs/toggle-num-lock.md +++ b/docs/toggle-num-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of toggle-num-lock.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-num-lock.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/toggle-scroll-lock.md b/docs/toggle-scroll-lock.md index 23653b42..3fc4b082 100644 --- a/docs/toggle-scroll-lock.md +++ b/docs/toggle-scroll-lock.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of toggle-scroll-lock.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-scroll-lock.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/translate-file.md b/docs/translate-file.md index 6bd7ef74..ec849daa 100644 --- a/docs/translate-file.md +++ b/docs/translate-file.md @@ -108,4 +108,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of translate-file.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-file.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/translate-files.md b/docs/translate-files.md index 720fa2e4..fcb3eea1 100644 --- a/docs/translate-files.md +++ b/docs/translate-files.md @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of translate-files.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-files.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/translate-text.md b/docs/translate-text.md index f022c61a..217df4cc 100644 --- a/docs/translate-text.md +++ b/docs/translate-text.md @@ -104,4 +104,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of translate-text.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-text.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/turn-volume-down.md b/docs/turn-volume-down.md index ce405d4e..a8b17863 100644 --- a/docs/turn-volume-down.md +++ b/docs/turn-volume-down.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-down.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-down.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/turn-volume-fully-up.md b/docs/turn-volume-fully-up.md index 93aa8ce0..d51f419c 100644 --- a/docs/turn-volume-fully-up.md +++ b/docs/turn-volume-fully-up.md @@ -56,4 +56,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-fully-up.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-fully-up.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/turn-volume-off.md b/docs/turn-volume-off.md index 1bb63624..89075efa 100644 --- a/docs/turn-volume-off.md +++ b/docs/turn-volume-off.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-off.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-off.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/turn-volume-on.md b/docs/turn-volume-on.md index fb367d4b..b8ba3629 100644 --- a/docs/turn-volume-on.md +++ b/docs/turn-volume-on.md @@ -54,4 +54,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-on.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-on.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/turn-volume-up.md b/docs/turn-volume-up.md index b77273a6..5bbd9775 100644 --- a/docs/turn-volume-up.md +++ b/docs/turn-volume-up.md @@ -69,4 +69,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-up.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-up.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/uninstall-all-apps.md b/docs/uninstall-all-apps.md index f99590fb..ad7712c8 100644 --- a/docs/uninstall-all-apps.md +++ b/docs/uninstall-all-apps.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-all-apps.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-all-apps.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/uninstall-bloatware.md b/docs/uninstall-bloatware.md index b1fea485..a35b2d62 100644 --- a/docs/uninstall-bloatware.md +++ b/docs/uninstall-bloatware.md @@ -98,4 +98,4 @@ winget uninstall 'Prime Video for Windows' exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-bloatware.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-bloatware.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/uninstall-chrome.md b/docs/uninstall-chrome.md index 3dbcd05d..e9ca4500 100644 --- a/docs/uninstall-chrome.md +++ b/docs/uninstall-chrome.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-chrome.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-chrome.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/uninstall-crystal-disk-info.md b/docs/uninstall-crystal-disk-info.md index 7e49bf18..39d4d959 100644 --- a/docs/uninstall-crystal-disk-info.md +++ b/docs/uninstall-crystal-disk-info.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-info.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-info.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/uninstall-crystal-disk-mark.md b/docs/uninstall-crystal-disk-mark.md index 8b0550a6..bc4d78ba 100644 --- a/docs/uninstall-crystal-disk-mark.md +++ b/docs/uninstall-crystal-disk-mark.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-mark.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-mark.ps1 as of 08/15/2024 09:50:54)* diff --git a/docs/uninstall-discord.md b/docs/uninstall-discord.md index 44d7a32e..211adc52 100644 --- a/docs/uninstall-discord.md +++ b/docs/uninstall-discord.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-discord.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-discord.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-edge.md b/docs/uninstall-edge.md index e0b2dbd3..9da71064 100644 --- a/docs/uninstall-edge.md +++ b/docs/uninstall-edge.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-edge.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-edge.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-firefox.md b/docs/uninstall-firefox.md index 5c16d55f..a6ed557c 100644 --- a/docs/uninstall-firefox.md +++ b/docs/uninstall-firefox.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-firefox.ps1 as of 05/19/2024 10:25:26)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-firefox.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-git-extensions.md b/docs/uninstall-git-extensions.md index 63c2c5bc..c0be808d 100644 --- a/docs/uninstall-git-extensions.md +++ b/docs/uninstall-git-extensions.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-git-extensions.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-git-extensions.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-github-cli.md b/docs/uninstall-github-cli.md index 32bbd563..80b7d261 100644 --- a/docs/uninstall-github-cli.md +++ b/docs/uninstall-github-cli.md @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-github-cli.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-github-cli.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-irfanview.md b/docs/uninstall-irfanview.md index a7a7e6f3..3a49901f 100644 --- a/docs/uninstall-irfanview.md +++ b/docs/uninstall-irfanview.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-irfanview.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-irfanview.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-microsoft-teams.md b/docs/uninstall-microsoft-teams.md index 86487e72..280c22d8 100644 --- a/docs/uninstall-microsoft-teams.md +++ b/docs/uninstall-microsoft-teams.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-microsoft-teams.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-microsoft-teams.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-netflix.md b/docs/uninstall-netflix.md index 67747115..0a0f41e1 100644 --- a/docs/uninstall-netflix.md +++ b/docs/uninstall-netflix.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-netflix.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-netflix.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-nine-zip.md b/docs/uninstall-nine-zip.md index f70e8705..a5a14e26 100644 --- a/docs/uninstall-nine-zip.md +++ b/docs/uninstall-nine-zip.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-nine-zip.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-nine-zip.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-one-calendar.md b/docs/uninstall-one-calendar.md index 45718346..fd3e2645 100644 --- a/docs/uninstall-one-calendar.md +++ b/docs/uninstall-one-calendar.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-one-calendar.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-one-calendar.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-opera-browser.md b/docs/uninstall-opera-browser.md index b4f0846d..0df5d581 100644 --- a/docs/uninstall-opera-browser.md +++ b/docs/uninstall-opera-browser.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-browser.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-browser.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-opera-gx.md b/docs/uninstall-opera-gx.md index 338fee9f..6484ffe0 100644 --- a/docs/uninstall-opera-gx.md +++ b/docs/uninstall-opera-gx.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-gx.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-gx.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-paint-3d.md b/docs/uninstall-paint-3d.md index 0c8181fe..b00853a0 100644 --- a/docs/uninstall-paint-3d.md +++ b/docs/uninstall-paint-3d.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-paint-3d.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-paint-3d.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-rufus.md b/docs/uninstall-rufus.md index abb4a85b..5cdc51cd 100644 --- a/docs/uninstall-rufus.md +++ b/docs/uninstall-rufus.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-rufus.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-rufus.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-skype.md b/docs/uninstall-skype.md index 0fc57451..fdb4579c 100644 --- a/docs/uninstall-skype.md +++ b/docs/uninstall-skype.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-skype.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-skype.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-spotify.md b/docs/uninstall-spotify.md index c525c0b4..73479819 100644 --- a/docs/uninstall-spotify.md +++ b/docs/uninstall-spotify.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-spotify.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-spotify.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-twitter.md b/docs/uninstall-twitter.md index 7da9ec52..1eeadeb0 100644 --- a/docs/uninstall-twitter.md +++ b/docs/uninstall-twitter.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-twitter.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-twitter.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-visual-studio-code.md b/docs/uninstall-visual-studio-code.md index f8e738f9..434d17bf 100644 --- a/docs/uninstall-visual-studio-code.md +++ b/docs/uninstall-visual-studio-code.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-visual-studio-code.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-visual-studio-code.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-vlc.md b/docs/uninstall-vlc.md index c28f7c4b..90b38d3c 100644 --- a/docs/uninstall-vlc.md +++ b/docs/uninstall-vlc.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-vlc.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-vlc.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/uninstall-windows-terminal.md b/docs/uninstall-windows-terminal.md index 93062c69..45cd9175 100644 --- a/docs/uninstall-windows-terminal.md +++ b/docs/uninstall-windows-terminal.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-windows-terminal.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-windows-terminal.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/update-powershell-profile.md b/docs/update-powershell-profile.md index dbe3e5e1..69efa4c6 100644 --- a/docs/update-powershell-profile.md +++ b/docs/update-powershell-profile.md @@ -1,7 +1,7 @@ Script: *update-powershell-profile.ps1* ======================== -This PowerShell script write/overwrites the PowerShell profile for the current user. +This PowerShell script write/overwrites the PowerShell profile of the current user. Parameters ---------- @@ -26,9 +26,9 @@ Example ------- ```powershell PS> ./update-powershell-profile.ps1 -⏳ (1/2) Query location of PowerShell profile 'CurrentUserCurrentHost'... -⏳ (2/2) Copy my-profile.ps1 to C:\Users\Markus\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1... -βœ”οΈ Your PowerShell profile is updated - it get's active on next login. +⏳ (1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'... +⏳ (2/2) Copying my-profile.ps1 to /home/Markus/.config/powershell/Microsoft.PowerShell_profile.ps1... +βœ”οΈ PowerShell profile updated - it get's active on next login. ``` @@ -45,16 +45,16 @@ Script Content ```powershell <# .SYNOPSIS - Updates the PowerShell profile + Updates the user's PowerShell profile .DESCRIPTION - This PowerShell script write/overwrites the PowerShell profile for the current user. + This PowerShell script write/overwrites the PowerShell profile of the current user. .PARAMETER path Specifies the path to the new profile ($PSScriptRoot/my-profile.ps1 by default) .EXAMPLE PS> ./update-powershell-profile.ps1 - ⏳ (1/2) Query location of PowerShell profile 'CurrentUserCurrentHost'... - ⏳ (2/2) Copy my-profile.ps1 to C:\Users\Markus\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1... - βœ”οΈ Your PowerShell profile is updated - it get's active on next login. + ⏳ (1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'... + ⏳ (2/2) Copying my-profile.ps1 to /home/Markus/.config/powershell/Microsoft.PowerShell_profile.ps1... + βœ”οΈ PowerShell profile updated - it get's active on next login. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -64,15 +64,15 @@ Script Content param([string]$path = "$PSScriptRoot/my-profile.ps1") try { - "⏳ (1/2) Query location of PowerShell profile 'CurrentUserCurrentHost'..." + "⏳ (1/2) Querying path to PowerShell profile 'CurrentUserCurrentHost'..." $pathToProfile = $PROFILE.CurrentUserCurrentHost $filename = (Get-Item "$path").Name - "⏳ (2/2) Copy $filename to $pathToProfile..." + "⏳ (2/2) Copying $filename to $pathToProfile..." $null = New-Item -Path $pathToProfile -ItemType "file" -Force Copy-Item "$path" "$pathToProfile" -force - "βœ”οΈ Your PowerShell profile is updated - it get's active on next login." + "βœ”οΈ PowerShell profile updated - it get's active on next login." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of update-powershell-profile.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of update-powershell-profile.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/upgrade-ubuntu.md b/docs/upgrade-ubuntu.md index 3b47980c..ee0e3687 100644 --- a/docs/upgrade-ubuntu.md +++ b/docs/upgrade-ubuntu.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of upgrade-ubuntu.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of upgrade-ubuntu.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/upload-file.md b/docs/upload-file.md index a62db727..b315334b 100644 --- a/docs/upload-file.md +++ b/docs/upload-file.md @@ -145,4 +145,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of upload-file.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of upload-file.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/upload-to-dropbox.md b/docs/upload-to-dropbox.md index c36e588b..527706b8 100644 --- a/docs/upload-to-dropbox.md +++ b/docs/upload-to-dropbox.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of upload-to-dropbox.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of upload-to-dropbox.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/wake-up.md b/docs/wake-up.md index 0edb1a9f..554f1c3d 100644 --- a/docs/wake-up.md +++ b/docs/wake-up.md @@ -120,4 +120,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of wake-up.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of wake-up.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/watch-commits.md b/docs/watch-commits.md index 070b285c..76ff6e3d 100644 --- a/docs/watch-commits.md +++ b/docs/watch-commits.md @@ -115,4 +115,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of watch-commits.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of watch-commits.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/watch-file.md b/docs/watch-file.md index e471ebfd..04c7572e 100644 --- a/docs/watch-file.md +++ b/docs/watch-file.md @@ -64,4 +64,4 @@ function Watch-File { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of watch-file.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of watch-file.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/watch-news.md b/docs/watch-news.md index 5cdfefed..ea393001 100644 --- a/docs/watch-news.md +++ b/docs/watch-news.md @@ -6,7 +6,7 @@ This PowerShell script lists the latest headlines by using a RSS (Really Simple Parameters ---------- ```powershell -PS> ./watch-news.ps1 [[-RSS_URL] ] [[-timeInterval] ] [] +PS> ./watch-news.ps1 [[-RSS_URL] ] [[-lines] ] [[-timeInterval] ] [] -RSS_URL Specifies the URL to the RSS feed (Yahoo World News by default) @@ -17,11 +17,21 @@ PS> ./watch-news.ps1 [[-RSS_URL] ] [[-timeInterval] ] [ +-lines + Specifies the initial number of headlines Required? false Position? 2 - Default value 30000 + Default value 10 + Accept pipeline input? false + Accept wildcard characters? false + +-timeInterval + Specifies the time interval in seconds between the Web requests + + Required? false + Position? 3 + Default value 30 Accept pipeline input? false Accept wildcard characters? false @@ -33,8 +43,8 @@ PS> ./watch-news.ps1 [[-RSS_URL] ] [[-timeInterval] ] [ ./watch-headlines.ps1 - ❇️ Niger coup: Ecowas deadline sparks anxiety in northern Nigeria ❇️ +PS> ./watch-news.ps1 +❇️ Niger coup: Ecowas deadline sparks anxiety in northern Nigeria ❇️ ``` @@ -56,32 +66,42 @@ Script Content This PowerShell script lists the latest headlines by using a RSS (Really Simple Syndication) feed. .PARAMETER RSS_URL Specifies the URL to the RSS feed (Yahoo World News by default) +.PARAMETER lines + Specifies the initial number of headlines +.PARAMETER timeInterval + Specifies the time interval in seconds between the Web requests .EXAMPLE - PS> ./watch-headlines.ps1 - ❇️ Niger coup: Ecowas deadline sparks anxiety in northern Nigeria ❇️ + PS> ./watch-news.ps1 + ❇️ Niger coup: Ecowas deadline sparks anxiety in northern Nigeria ❇️ .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$RSS_URL = "https://news.yahoo.com/rss/world", [int]$timeInterval = 30000) # in ms +param([string]$RSS_URL = "https://news.yahoo.com/rss/world", [int]$lines = 10, [int]$timeInterval = 30) # in seconds -function GetLatestHeadline { +function PrintLatestHeadlines([string]$previous, [int]$maxLines) { [xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content - foreach ($item in $content.rss.channel.item) { return "$($item.title)" } - return "" + [string]$latest = "" + + foreach ($item in $content.rss.channel.item) { + $itemTitle = "$($item.title)" + if ($latest -eq "") { $latest = $itemTitle } + if ($itemTitle -eq $previous) { break } + + & "$PSScriptRoot/write-animated.ps1" "❇️ $itemTitle ❇️" + $maxLines-- + if ($maxLines -eq 0) { break } + } + return $latest } try { - $previous = "" + $latest = "" while ($true) { - $latest = GetLatestHeadline - if ($latest -ne $previous) { - & "$PSScriptRoot/write-animated.ps1" "❇️ $latest ❇️" - $previous = $latest - } - Start-Sleep -milliseconds $timeInterval + $latest = PrintLatestHeadlines $latest $lines + Start-Sleep -seconds $timeInterval } exit 0 # success } catch { @@ -90,4 +110,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of watch-news.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of watch-news.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/weather-report.md b/docs/weather-report.md index fb715674..2a7a30ef 100644 --- a/docs/weather-report.md +++ b/docs/weather-report.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of weather-report.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of weather-report.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/weather.md b/docs/weather.md index 57e5c17c..d3493b3b 100644 --- a/docs/weather.md +++ b/docs/weather.md @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of weather.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of weather.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/what-is.md b/docs/what-is.md index 9ca1ad39..87e24324 100644 --- a/docs/what-is.md +++ b/docs/what-is.md @@ -26,7 +26,7 @@ Example ------- ```powershell PS> ./what-is VTOL -πŸ’‘ VTOL in aviation refers to Vertical Take-Off and Landing +πŸ’‘ VTOL in aviation refers to: Vertical Take-Off and Landing ``` @@ -50,7 +50,7 @@ Script Content Specifies the term to query .EXAMPLE PS> ./what-is VTOL - πŸ’‘ VTOL in aviation refers to Vertical Take-Off and Landing + πŸ’‘ VTOL in aviation refers to: Vertical Take-Off and Landing .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -61,6 +61,7 @@ param([string]$term = "") try { if ($term -eq "" ) { $term = Read-Host "Enter the term/abbreviation/etc. to query" } + $files = (Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv") $basename = "" foreach($file in $files) { @@ -71,7 +72,9 @@ try { "πŸ’‘ $($row.TERM) in $basename refers to: $($row.MEANING)" } } - if ($basename -eq "") { "πŸ€·β€ Sorry, no '$term' entry found. Use to google it: https://www.google.com/search?q=what+is+$term" } + if ($basename -eq "") { + & "$PSScriptRoot/open-URL.ps1" "https://www.google.com/search?q=what+is+$term" "πŸ€·β€ Sorry, no '$term' entry found. Let's google it at: " + } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -79,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/windefender.md b/docs/windefender.md index dac9004b..f89fb3d7 100644 --- a/docs/windefender.md +++ b/docs/windefender.md @@ -82,4 +82,4 @@ break } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of windefender.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of windefender.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-animated.md b/docs/write-animated.md index ee50963c..e933795b 100644 --- a/docs/write-animated.md +++ b/docs/write-animated.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-animated.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-animated.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-ascii-image.md b/docs/write-ascii-image.md index 1d8760f1..4ecb5efd 100644 --- a/docs/write-ascii-image.md +++ b/docs/write-ascii-image.md @@ -61,4 +61,4 @@ WriteLine " '`--._,dd###pp='''" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-ascii-image.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-ascii-image.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-big.md b/docs/write-big.md index 4a4cb3f2..ea168aee 100644 --- a/docs/write-big.md +++ b/docs/write-big.md @@ -471,4 +471,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-big.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-big.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-blue.md b/docs/write-blue.md index 3da9081e..76037f4f 100644 --- a/docs/write-blue.md +++ b/docs/write-blue.md @@ -64,4 +64,4 @@ write-host -foregroundColor blue "$text" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-blue.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-blue.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-braille.md b/docs/write-braille.md index 550b310d..3023d0bb 100644 --- a/docs/write-braille.md +++ b/docs/write-braille.md @@ -408,4 +408,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-braille.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-braille.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-centered.md b/docs/write-centered.md index ddb2b400..81d04803 100644 --- a/docs/write-centered.md +++ b/docs/write-centered.md @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-centered.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-centered.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-changelog.md b/docs/write-changelog.md index daea66b6..b6963dcd 100644 --- a/docs/write-changelog.md +++ b/docs/write-changelog.md @@ -155,4 +155,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-changelog.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-changelog.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-chart.md b/docs/write-chart.md index 90309061..e3ddcdd3 100644 --- a/docs/write-chart.md +++ b/docs/write-chart.md @@ -68,4 +68,4 @@ WriteChartLine "Tom" 30.9 100.0 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-chart.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-chart.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-clock.md b/docs/write-clock.md index 94d5bc3c..eae4c51e 100644 --- a/docs/write-clock.md +++ b/docs/write-clock.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-clock.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-clock.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-code.md b/docs/write-code.md index 9308cc46..d2d57199 100644 --- a/docs/write-code.md +++ b/docs/write-code.md @@ -118,4 +118,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-code.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-code.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-date.md b/docs/write-date.md index d5b78c73..625aaa8e 100644 --- a/docs/write-date.md +++ b/docs/write-date.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-date.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-date.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-fractal.md b/docs/write-fractal.md index 2c0eda6a..32b006c3 100644 --- a/docs/write-fractal.md +++ b/docs/write-fractal.md @@ -79,4 +79,4 @@ while ($true) { exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-fractal.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-fractal.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-green.md b/docs/write-green.md index be01b1d3..59bd5733 100644 --- a/docs/write-green.md +++ b/docs/write-green.md @@ -63,4 +63,4 @@ write-host -foregroundColor green "$text" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-green.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-green.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-headline.md b/docs/write-headline.md index 117f9f90..e99ef8a8 100644 --- a/docs/write-headline.md +++ b/docs/write-headline.md @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-headline.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-headline.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-in-emojis.md b/docs/write-in-emojis.md index b6e61617..49485e85 100644 --- a/docs/write-in-emojis.md +++ b/docs/write-in-emojis.md @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-in-emojis.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-in-emojis.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-joke.md b/docs/write-joke.md index 6c4a347e..088d70ba 100644 --- a/docs/write-joke.md +++ b/docs/write-joke.md @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-joke.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-joke.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-lowercase.md b/docs/write-lowercase.md index 0fdaf014..2ef8d8fa 100644 --- a/docs/write-lowercase.md +++ b/docs/write-lowercase.md @@ -65,4 +65,4 @@ Write-Output $text.ToLower() exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-lowercase.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-lowercase.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-marquee.md b/docs/write-marquee.md index f56c43ed..492266eb 100644 --- a/docs/write-marquee.md +++ b/docs/write-marquee.md @@ -89,4 +89,4 @@ StartMarquee " exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-marquee.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-marquee.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-matrix.md b/docs/write-matrix.md index 8f39679d..3bde95f2 100644 --- a/docs/write-matrix.md +++ b/docs/write-matrix.md @@ -81,4 +81,4 @@ exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-matrix.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-matrix.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-moon.md b/docs/write-moon.md index 3602c838..bcdba187 100644 --- a/docs/write-moon.md +++ b/docs/write-moon.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-moon.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-moon.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-morse-code.md b/docs/write-morse-code.md index 0f3aad4d..337bc6ab 100644 --- a/docs/write-morse-code.md +++ b/docs/write-morse-code.md @@ -153,4 +153,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-morse-code.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-morse-code.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-motd.md b/docs/write-motd.md index 1a451f80..0f5bf134 100644 --- a/docs/write-motd.md +++ b/docs/write-motd.md @@ -140,4 +140,4 @@ Write-Host " 'VEzjt:;;z>*`` " -ForegroundColor Yellow exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-motd.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-motd.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-qr-code.md b/docs/write-qr-code.md index 2f2e2583..5e5f836a 100644 --- a/docs/write-qr-code.md +++ b/docs/write-qr-code.md @@ -16,7 +16,7 @@ PS> ./write-qr-code.ps1 [] Example ------- ```powershell -PS> ./write-qr-code +PS> ./write-qr-code.ps1 ``` @@ -37,28 +37,32 @@ Script Content .DESCRIPTION This PowerShell script writes "Hello World" as QR code to the console output. .EXAMPLE - PS> ./write-qr-code + PS> ./write-qr-code.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -Write-Host " " -foregroundColor black -backgroundColor white -Write-Host " β–„β–„β–„β–„β–„β–„β–„ β–„ β–„β–„β–„ β–„β–„β–„β–„β–„β–„β–„ " -foregroundColor black -backgroundColor white -Write-Host " β–ˆ β–„β–„β–„ β–ˆ β–„β–„β–€β–ˆ β–ˆ β–„β–„β–„ β–ˆ " -foregroundColor black -backgroundColor white -Write-Host " β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–€ β–„β–€ β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ " -foregroundColor black -backgroundColor white -Write-Host " β–ˆβ–„β–„β–„β–„β–„β–ˆ β–„β–€β–ˆβ–€β–ˆ β–ˆβ–„β–„β–„β–„β–„β–ˆ " -foregroundColor black -backgroundColor white -Write-Host " β–„β–„β–„β–„ β–„ β–„β–„β–„β–ˆβ–ˆβ–„ β–„β–„β–„ β–„ " -foregroundColor black -backgroundColor white -Write-Host " β–€ β–ˆ β–€β–„β–„β–€β–ˆβ–€β–€β–ˆβ–€β–ˆβ–€β–ˆβ–€β–€β–€β–„β–ˆ " -foregroundColor black -backgroundColor white -Write-Host " β–„β–„β–ˆβ–ˆβ–€β–€β–„β–„β–ˆ β–„β–€β–„β–„β–„β–€ β–€ β–€β–„ " -foregroundColor black -backgroundColor white -Write-Host " β–„β–„β–„β–„β–„β–„β–„ β–€β–€β–ˆβ–ˆβ–„β–„β–ˆβ–ˆβ–„ β–€ β–€ " -foregroundColor black -backgroundColor white -Write-Host " β–ˆ β–„β–„β–„ β–ˆ β–€β–„ β–„β–€ β–€ β–ˆβ–ˆβ–€β–€ " -foregroundColor black -backgroundColor white -Write-Host " β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–„ β–„ β–€β–„ β–€β–ˆβ–€ " -foregroundColor black -backgroundColor white -Write-Host " β–ˆβ–„β–„β–„β–„β–„β–ˆ β–ˆβ–€β–„β–ˆ β–ˆβ–ˆβ–ˆβ–€ β–„ β–€ " -foregroundColor black -backgroundColor white -Write-Host " " -foregroundColor black -backgroundColor white +Write-Host " " -foregroundColor black -backgroundColor white +Write-Host " " -foregroundColor black -backgroundColor white +Write-Host " " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–„β–„β–„β–„β–„ β–„ β–„β–„β–„ β–„β–„β–„β–„β–„β–„β–„ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–„β–„β–„ β–ˆ β–„β–„β–€β–ˆ β–ˆ β–„β–„β–„ β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–€ β–„β–€ β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆβ–„β–„β–„β–„β–„β–ˆ β–„β–€β–ˆβ–€β–ˆ β–ˆβ–„β–„β–„β–„β–„β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–„β–„ β–„ β–„β–„β–„β–ˆβ–ˆβ–„ β–„β–„β–„ β–„ " -foregroundColor black -backgroundColor white +Write-Host " β–€ β–ˆ β–€β–„β–„β–€β–ˆβ–€β–€β–ˆβ–€β–ˆβ–€β–ˆβ–€β–€β–€β–„β–ˆ " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–ˆβ–ˆβ–€β–€β–„β–„β–ˆ β–„β–€β–„β–„β–„β–€ β–€ β–€β–„ " -foregroundColor black -backgroundColor white +Write-Host " β–„β–„β–„β–„β–„β–„β–„ β–€β–€β–ˆβ–ˆβ–„β–„β–ˆβ–ˆβ–„ β–€ β–€ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–„β–„β–„ β–ˆ β–€β–„ β–„β–€ β–€ β–ˆβ–ˆβ–€β–€ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆ β–ˆβ–ˆβ–ˆ β–ˆ β–ˆβ–„ β–„ β–€β–„ β–€β–ˆβ–€ " -foregroundColor black -backgroundColor white +Write-Host " β–ˆβ–„β–„β–„β–„β–„β–ˆ β–ˆβ–€β–„β–ˆ β–ˆβ–ˆβ–ˆβ–€ β–„ β–€ " -foregroundColor black -backgroundColor white +Write-Host " " -foregroundColor black -backgroundColor white +Write-Host " " -foregroundColor black -backgroundColor white +Write-Host " " -foregroundColor black -backgroundColor white exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-qr-code.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-qr-code.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-quote.md b/docs/write-quote.md index 5501c481..7c058723 100644 --- a/docs/write-quote.md +++ b/docs/write-quote.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-quote.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-quote.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-red.md b/docs/write-red.md index a0c709e3..c9aa73a2 100644 --- a/docs/write-red.md +++ b/docs/write-red.md @@ -63,4 +63,4 @@ write-host -foregroundcolor red "$text" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-red.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-red.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-rot13.md b/docs/write-rot13.md index 9cc8da2b..a082d485 100644 --- a/docs/write-rot13.md +++ b/docs/write-rot13.md @@ -82,4 +82,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-rot13.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-rot13.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-shit.md b/docs/write-shit.md index d5918fd0..5106cce9 100644 --- a/docs/write-shit.md +++ b/docs/write-shit.md @@ -50,4 +50,4 @@ Write-Output "πŸ’©" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-shit.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-shit.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-sine-curves.md b/docs/write-sine-curves.md index 5494338c..427b5a30 100644 --- a/docs/write-sine-curves.md +++ b/docs/write-sine-curves.md @@ -56,4 +56,4 @@ Script Content } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-sine-curves.ps1 as of 05/19/2024 10:25:27)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-sine-curves.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-time.md b/docs/write-time.md index 83ced064..dc3a3f0b 100644 --- a/docs/write-time.md +++ b/docs/write-time.md @@ -57,4 +57,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-time.ps1 as of 05/19/2024 10:25:28)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-time.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-typewriter.md b/docs/write-typewriter.md index 1a300d57..6e23e170 100644 --- a/docs/write-typewriter.md +++ b/docs/write-typewriter.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-typewriter.ps1 as of 05/19/2024 10:25:28)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-typewriter.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-uppercase.md b/docs/write-uppercase.md index dad26393..749a11a5 100644 --- a/docs/write-uppercase.md +++ b/docs/write-uppercase.md @@ -65,4 +65,4 @@ Write-Output $text.ToUpper() exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-uppercase.ps1 as of 05/19/2024 10:25:28)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-uppercase.ps1 as of 08/15/2024 09:50:55)* diff --git a/docs/write-vertical.md b/docs/write-vertical.md index aa0c169e..c6637f3a 100644 --- a/docs/write-vertical.md +++ b/docs/write-vertical.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-vertical.ps1 as of 05/19/2024 10:25:28)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-vertical.ps1 as of 08/15/2024 09:50:56)*