diff --git a/docs/add-firewall-rules.md b/docs/add-firewall-rules.md index 97a55408..bf47cfaa 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/add-memo.md b/docs/add-memo.md index 29f4f04a..a37a2a16 100644 --- a/docs/add-memo.md +++ b/docs/add-memo.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/alert.md b/docs/alert.md index 9ab06431..7929bd83 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/build-repo.md b/docs/build-repo.md index 726f4520..f28dbe43 100644 --- a/docs/build-repo.md +++ b/docs/build-repo.md @@ -66,18 +66,21 @@ param([string]$path = "$PWD") function BuildInDir([string]$path) { $dirName = (Get-Item "$path").Name if (Test-Path "$path/CMakeLists.txt" -pathType leaf) { - "⏳ Building 📂$dirName by using CMake into 📂$dirName/_My_Build..." + "⏳ (1/4) Building 📂$dirName by using CMake into 📂$dirName/_My_Build..." if (-not(Test-Path "$path/_My_Build/" -pathType container)) { & mkdir "$path/_My_Build/" } Set-Location "$path/_My_Build/" + "⏳ (2/4) Executing 'cmake' to generate the Makefile..." & cmake .. if ($lastExitCode -ne "0") { throw "Executing 'cmake ..' has failed" } + "⏳ (3/4) Executing 'make -j4' to compile and link..." & make -j4 if ($lastExitCode -ne "0") { throw "Executing 'make -j4' has failed" } + "⏳ (4/4) Executing 'make test' to perform tests (optional)..." & make test if ($lastExitCode -ne "0") { throw "Executing 'make test' has failed" } @@ -189,4 +192,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/build-repos.md b/docs/build-repos.md index 43ca6644..618e1168 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-autostart.md b/docs/cd-autostart.md index 8cb83591..a6612b18 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-crashdumps.md b/docs/cd-crashdumps.md index 6d75e2f3..3a66d25e 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-desktop.md b/docs/cd-desktop.md index 36406ccc..41aaed87 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-docs.md b/docs/cd-docs.md index 4be62a97..6b93ca6c 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-downloads.md b/docs/cd-downloads.md index f9008536..3f3479ec 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-dropbox.md b/docs/cd-dropbox.md index 7e88df8c..ac1ad12e 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-etc.md b/docs/cd-etc.md index e5ee3a7d..b31c37b1 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-fonts.md b/docs/cd-fonts.md index bbaa5d45..845d9cdd 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-home.md b/docs/cd-home.md index b572b4b0..0a04c9b2 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-logs.md b/docs/cd-logs.md index 213d21ad..40ddb6fb 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-music.md b/docs/cd-music.md index 57f2595b..41858c4d 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-onedrive.md b/docs/cd-onedrive.md index f7d63f18..1ff75d9d 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-pics.md b/docs/cd-pics.md index 88f815ae..0aa4ecc0 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-public.md b/docs/cd-public.md index fe149ade..18e8b064 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-recycle-bin.md b/docs/cd-recycle-bin.md index e3515fb5..afabf739 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-repos.md b/docs/cd-repos.md index 5feea461..583bd3f8 100644 --- a/docs/cd-repos.md +++ b/docs/cd-repos.md @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-root.md b/docs/cd-root.md index c8594a23..4271cf9f 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-screenshots.md b/docs/cd-screenshots.md index b698e3fb..f7384a4a 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-scripts.md b/docs/cd-scripts.md index 5364b6db..dea5148f 100644 --- a/docs/cd-scripts.md +++ b/docs/cd-scripts.md @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./cd-scripts -📂C:\Users\Markus\source\repos\PowerShell\Scripts +📂C:\Users\Markus\source\repos\PowerShell\scripts ``` @@ -39,7 +39,7 @@ Script Content This PowerShell script changes the working directory to the PowerShell scripts folder. .EXAMPLE PS> ./cd-scripts - 📂C:\Users\Markus\source\repos\PowerShell\Scripts + 📂C:\Users\Markus\source\repos\PowerShell\scripts .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-ssh.md b/docs/cd-ssh.md index b3103219..b58ddf16 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-temp.md b/docs/cd-temp.md index c1c87b9a..f3232149 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-templates.md b/docs/cd-templates.md index 9be2fffa..c6ee3ae3 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-trash.md b/docs/cd-trash.md index 040c9d01..fd828454 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-up.md b/docs/cd-up.md index 43a87c35..8757bf32 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-up2.md b/docs/cd-up2.md index 1d2ea7ed..11818bcb 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-up3.md b/docs/cd-up3.md index a38a10c3..3cb4981e 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-up4.md b/docs/cd-up4.md index 438fa9b2..13d6edde 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-users.md b/docs/cd-users.md index 75ab7ac0..da974305 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-videos.md b/docs/cd-videos.md index 79ba7536..5c339f34 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/cd-windows.md b/docs/cd-windows.md index 584dbf94..0c43fdbb 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 12/07/2023 20:24:14)* diff --git a/docs/change-wallpaper.md b/docs/change-wallpaper.md index c73a66ff..6de85c59 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-admin.md b/docs/check-admin.md index c4cd4278..2fb377f6 100644 --- a/docs/check-admin.md +++ b/docs/check-admin.md @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-admin.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-admin.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-apps.md b/docs/check-apps.md index 252a6089..6ac4ba9e 100644 --- a/docs/check-apps.md +++ b/docs/check-apps.md @@ -48,13 +48,13 @@ Script Content try { if ($IsLinux) { - Write-Progress "⏳ Querying installed applications..." + Write-Progress "Querying installed applications..." $numPkgs = (apt list --installed 2>/dev/null).Count $numSnaps = (snap list).Count - 1 Write-Progress -Completed "." Write-Host "✅ $numPkgs Debian packages, $numSnaps snaps installed" } else { - Write-Progress "⏳ Querying installed applications..." + Write-Progress "Querying installed applications..." $Apps = Get-AppxPackage Write-Progress -Completed "." Write-Host "✅ $($Apps.Count) Windows apps installed, " -noNewline @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-bios.md b/docs/check-bios.md index 133bc7ac..fd2c69dd 100644 --- a/docs/check-bios.md +++ b/docs/check-bios.md @@ -48,7 +48,7 @@ Script Content try { if ($IsLinux) { - Write-Progress "⏳ Querying BIOS details..." + Write-Progress "Querying BIOS details..." $model = (sudo dmidecode -s system-product-name) if ("$model" -ne "") { $version = (sudo dmidecode -s bios-version) @@ -76,4 +76,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-cpu.md b/docs/check-cpu.md index 3d104fbd..5a4fb208 100644 --- a/docs/check-cpu.md +++ b/docs/check-cpu.md @@ -24,14 +24,26 @@ Script Content This PowerShell script queries the CPU status (name, type, speed, temperature, etc) and prints it. .EXAMPLE PS> ./check-cpu.ps1 - ✅ Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz (AMD64, 20 cores, CPU0, 3696MHz, CPU0 socket, 31.3°C) + ✅ Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz (AMD64, 20 cores, CPU0, 3696MHz, CPU0 socket, 31.3°C) .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -function GetProcessorTemperature { +function GetCPUArchitecture { + if ("$env:PROCESSOR_ARCHITECTURE" -ne "") { return "$env:PROCESSOR_ARCHITECTURE" } + if ($IsLinux) { + $Name = $PSVersionTable.OS + if ($Name -like "*-generic *") { + if ([System.Environment]::Is64BitOperatingSystem) { return "x64" } else { return "x86" } + } elseif ($Name -like "*-raspi *") { + if ([System.Environment]::Is64BitOperatingSystem) { return "ARM64" } else { return "ARM32" } + } elseif ([System.Environment]::Is64BitOperatingSystem) { return "64-bit" } else { return "32-bit" } + } +} + +function GetCPUTemperature { $temp = 99999.9 # unsupported if ($IsLinux) { if (Test-Path "/sys/class/thermal/thermal_zone0/temp" -pathType leaf) { @@ -48,37 +60,10 @@ function GetProcessorTemperature { return $temp } -function GetProcessorArchitecture { - if ("$env:PROCESSOR_ARCHITECTURE" -ne "") { return "$env:PROCESSOR_ARCHITECTURE" } - if ($IsLinux) { - $Name = $PSVersionTable.OS - if ($Name -like "*-generic *") { - if ([System.Environment]::Is64BitOperatingSystem) { return "x64" } else { return "x86" } - } elseif ($Name -like "*-raspi *") { - if ([System.Environment]::Is64BitOperatingSystem) { return "ARM64" } else { return "ARM32" } - } else { - return "" - } - } -} - try { - Write-Progress "⏳ Querying CPU status... " + Write-Progress "Querying CPU status... " $status = "✅" - $celsius = GetProcessorTemperature - if ($celsius -eq 99999.9) { - $temp = "no temp" - } elseif ($celsius -gt 50) { - $temp = "$($celsius)°C" - $status = "⚠️" - } elseif ($celsius -lt 0) { - $temp = "$($celsius)°C" - $status = "⚠️" - } else { - $temp = "$($celsius)°C" - } - - $arch = GetProcessorArchitecture + $arch = GetCPUArchitecture if ($IsLinux) { $cpuName = "$arch CPU" $arch = "" @@ -94,7 +79,20 @@ try { $socket = "$($details.SocketDesignation) socket, " } $cores = [System.Environment]::ProcessorCount - Write-Progress -completed " " + $celsius = GetCPUTemperature + if ($celsius -eq 99999.9) { + $temp = "no temp" + } elseif ($celsius -gt 50) { + $temp = "$($celsius)°C" + $status = "⚠️" + } elseif ($celsius -lt 0) { + $temp = "$($celsius)°C" + $status = "⚠️" + } else { + $temp = "$($celsius)°C" + } + + Write-Progress -completed "Done." Write-Host "$status $cpuName ($($arch)$cores cores, $($deviceID)$($speed)$($socket)$temp)" exit 0 # success } catch { @@ -103,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-day.md b/docs/check-day.md index eba286b5..8d55f70d 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-dns.md b/docs/check-dns.md index 59df7894..703570ec 100644 --- a/docs/check-dns.md +++ b/docs/check-dns.md @@ -47,8 +47,8 @@ Script Content #> try { - Write-Progress "⏳ Measuring DNS resolution..." - $table = Import-CSV "$PSScriptRoot/../Data/popular-domains.csv" + Write-Progress "Measuring DNS resolution..." + $table = Import-CSV "$PSScriptRoot/../data/popular-domains.csv" $numRows = $table.Length $stopWatch = [system.diagnostics.stopwatch]::startNew() @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-drive-space.md b/docs/check-drive-space.md index c2c3dd52..b7989054 100644 --- a/docs/check-drive-space.md +++ b/docs/check-drive-space.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-drives.md b/docs/check-drives.md index 6f36f034..1deb2d59 100644 --- a/docs/check-drives.md +++ b/docs/check-drives.md @@ -76,10 +76,10 @@ function Bytes2String { param([int64]$bytes) } try { - Write-Progress "⏳ Querying drives..." + Write-Progress "Querying drives..." $drives = Get-PSDrive -PSProvider FileSystem $minLevel *= 1000 * 1000 * 1000 - Write-Progress -completed "." + Write-Progress -completed " " foreach($drive in $drives) { $details = (Get-PSDrive $drive.Name) if ($IsLinux) { $name = $drive.Name } else { $name = $drive.Name + ":" } @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-dusk.md b/docs/check-dusk.md index f3ec52e2..77551522 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-easter-sunday.md b/docs/check-easter-sunday.md index 96b1a9e6..bbc2439f 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-file-system.md b/docs/check-file-system.md index 2abcdd29..4f70dafa 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-file.md b/docs/check-file.md index 34cc00fc..fe120d62 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-firewall.md b/docs/check-firewall.md index 57fb4073..ac5cf1bd 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 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-gpu.md b/docs/check-gpu.md index fe812e04..2cb67a47 100644 --- a/docs/check-gpu.md +++ b/docs/check-gpu.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 10/19/2023 08:11:35)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-hardware.md b/docs/check-hardware.md index 0a0e405b..d66da26f 100644 --- a/docs/check-hardware.md +++ b/docs/check-hardware.md @@ -63,4 +63,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-health.md b/docs/check-health.md index 93da2213..c67217e7 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-independence-day.md b/docs/check-independence-day.md index 93331213..547a44ac 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-ipv4-address.md b/docs/check-ipv4-address.md index e22f144e..7e1a0212 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-ipv6-address.md b/docs/check-ipv6-address.md index 58d01375..b8a1a315 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-iss-position.md b/docs/check-iss-position.md index 61fcbeef..f37f7118 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-mac-address.md b/docs/check-mac-address.md index f3342910..d146fb90 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-midnight.md b/docs/check-midnight.md index 423692c1..b8a92f3a 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-month.md b/docs/check-month.md index 080b312a..505ad771 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-moon-phase.md b/docs/check-moon-phase.md index 7b0099b2..4396b81e 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-network.md b/docs/check-network.md index 1c24e46c..f6b28e47 100644 --- a/docs/check-network.md +++ b/docs/check-network.md @@ -64,4 +64,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-new-year.md b/docs/check-new-year.md index bfcdaa77..541500d8 100644 --- a/docs/check-new-year.md +++ b/docs/check-new-year.md @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-noon.md b/docs/check-noon.md index fa2ae26d..3511699b 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-os.md b/docs/check-os.md index fe298071..89a56315 100644 --- a/docs/check-os.md +++ b/docs/check-os.md @@ -50,7 +50,7 @@ try { if ($IsLinux) { $Name = $PSVersionTable.OS if ([System.Environment]::Is64BitOperatingSystem) { $Arch = "64-bit" } else { $Arch = "32-bit" } - Write-Host "✅ $Name $Arch" + Write-Host "✅ $Name (Linux $Arch)" } else { $OS = Get-WmiObject -class Win32_OperatingSystem $Name = $OS.Caption -Replace "Microsoft Windows","Windows" @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-outlook.md b/docs/check-outlook.md index a30c9153..6b24d0bf 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-password.md b/docs/check-password.md index 7b1fb503..aa81ac0f 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-pending-reboot.md b/docs/check-pending-reboot.md index d7d05374..24dab223 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-ping.md b/docs/check-ping.md index 1124296d..87918886 100644 --- a/docs/check-ping.md +++ b/docs/check-ping.md @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ping.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ping.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-power.md b/docs/check-power.md index b5559690..e031de54 100644 --- a/docs/check-power.md +++ b/docs/check-power.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-power.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-powershell.md b/docs/check-powershell.md index f5b584b5..836c1045 100644 --- a/docs/check-powershell.md +++ b/docs/check-powershell.md @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-ps1-file.md b/docs/check-ps1-file.md index a2198de5..9c792672 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-ram.md b/docs/check-ram.md index 1cdafe26..fcf3d581 100644 --- a/docs/check-ram.md +++ b/docs/check-ram.md @@ -98,4 +98,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-repo.md b/docs/check-repo.md index b9aa5009..3d630e38 100644 --- a/docs/check-repo.md +++ b/docs/check-repo.md @@ -128,4 +128,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-santa.md b/docs/check-santa.md index a36abbb9..e749096f 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-smart-devices.md b/docs/check-smart-devices.md index 470d4504..850f61a3 100644 --- a/docs/check-smart-devices.md +++ b/docs/check-smart-devices.md @@ -48,11 +48,11 @@ function Bytes2String { param([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 { @@ -60,7 +60,7 @@ try { } foreach($Device in $Devices) { - Write-Progress "⏳ (3/3) Querying S.M.A.R.T devices..." + Write-Progress "(3/3) Querying S.M.A.R.T devices..." $Array = $Device.split(" ") $Device = $Array[0] if ("$Device" -eq "#") { @@ -95,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-software.md b/docs/check-software.md index ea391c0f..458772b8 100644 --- a/docs/check-software.md +++ b/docs/check-software.md @@ -69,4 +69,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-subnet-mask.md b/docs/check-subnet-mask.md index 6b1d746b..87541af6 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 12/07/2023 20:24:15)* diff --git a/docs/check-swap-space.md b/docs/check-swap-space.md index 620e21c3..9322ede6 100644 --- a/docs/check-swap-space.md +++ b/docs/check-swap-space.md @@ -105,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-symlinks.md b/docs/check-symlinks.md index 54624417..549c4181 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-time-zone.md b/docs/check-time-zone.md index 6245c5a0..231da662 100644 --- a/docs/check-time-zone.md +++ b/docs/check-time-zone.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-uptime.md b/docs/check-uptime.md index 556aba26..d3d6e9bc 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-vpn.md b/docs/check-vpn.md index df1c3a35..512f4042 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-weather.md b/docs/check-weather.md index 87fe242f..0599e1c0 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-week.md b/docs/check-week.md index 5c5bd081..2ab05888 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-wind.md b/docs/check-wind.md index 9b2f63b2..52bf1666 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-windows-system-files.md b/docs/check-windows-system-files.md index ce193610..7ed45d32 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-xml-file.md b/docs/check-xml-file.md index dd05e559..3cb7acb5 100644 --- a/docs/check-xml-file.md +++ b/docs/check-xml-file.md @@ -6,9 +6,9 @@ This PowerShell script checks the given XML file for validity. Parameters ---------- ```powershell -PS> ./check-xml-file.ps1 [[-file] ] [] +PS> ./check-xml-file.ps1 [[-path] ] [] --file +-path Specifies the path to the XML file to check Required? false @@ -25,8 +25,8 @@ PS> ./check-xml-file.ps1 [[-file] ] [] Example ------- ```powershell -PS> ./check-xml-file myfile.xml -✔️ XML file is valid +PS> ./check-xml-file.ps1 myfile.xml +✔️ Valid XML in 'myfile.xml' ``` @@ -43,30 +43,29 @@ Script Content ```powershell <# .SYNOPSIS - Checks the given XML file for validity + Verifies the given XML file .DESCRIPTION This PowerShell script checks the given XML file for validity. -.PARAMETER file +.PARAMETER path Specifies the path to the XML file to check .EXAMPLE - PS> ./check-xml-file myfile.xml - ✔️ XML file is valid + PS> ./check-xml-file.ps1 myfile.xml + ✔️ Valid XML in 'myfile.xml' .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$file = "") +param([string]$path = "") try { - if ($file -eq "" ) { $file = read-host "Enter path to XML file" } + if ($path -eq "" ) { $path = Read-Host "Enter path to XML file" } - $XmlFile = Get-Item $file - - $script:ErrorCount = 0 + $XmlFile = Get-Item $path # Perform the XSD Validation + $script:ErrorCount = 0 $ReaderSettings = New-Object -TypeName System.Xml.XmlReaderSettings $ReaderSettings.ValidationType = [System.Xml.ValidationType]::Schema $ReaderSettings.ValidationFlags = [System.Xml.Schema.XmlSchemaValidationFlags]::ProcessInlineSchema -bor [System.Xml.Schema.XmlSchemaValidationFlags]::ProcessSchemaLocation @@ -76,11 +75,10 @@ try { $Reader.Close() if ($script:ErrorCount -gt 0) { - write-warning "Invalid XML file" - exit 1 + throw "Invalid XML in '$path'" } - "✔️ XML file is valid" + "✔️ Valid XML in '$path'" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -88,4 +86,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/check-xml-files.md b/docs/check-xml-files.md new file mode 100644 index 00000000..181538fa --- /dev/null +++ b/docs/check-xml-files.md @@ -0,0 +1,86 @@ +*check-xml-files.ps1* +================ + +This PowerShell script verifies each XML file in the given directory tree for validity. + +Parameters +---------- +```powershell +PS> ./check-xml-files.ps1 [[-path] ] [] + +-path + Specifies the path to the directory tree (current working dir 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> ./check-xml-files.ps1 C:\Windows +... +✔️ Checked 3607 XML files within C:\Windows in 174 sec + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Checks XML files in a directory tree +.DESCRIPTION + This PowerShell script verifies each XML file in the given directory tree for validity. +.PARAMETER path + Specifies the path to the directory tree (current working dir by default) +.EXAMPLE + PS> ./check-xml-files.ps1 C:\Windows + ... + ✔️ Checked 3607 XML files within C:\Windows in 174 sec +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$path = "$PWD") + +try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $path = Resolve-Path "$path" + [int]$count = 0 + + Write-Progress "Checking all *.xml files under $path..." + Get-ChildItem -path "$path" -attributes !Directory -recurse -force | Where-Object { $_.Name -like "*.xml*" } | Foreach-Object { + & $PSScriptRoot/check-xml-file.ps1 "$($_.FullName)" + $count++ + } + Write-Progress -completed "Done." + + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Checked $count XML files within $path 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 check-xml-files.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/clean-repo.md b/docs/clean-repo.md index a3037322..c85891c4 100644 --- a/docs/clean-repo.md +++ b/docs/clean-repo.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/clean-repos.md b/docs/clean-repos.md index c078b81c..af7f0e07 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/clear-dns-cache.md b/docs/clear-dns-cache.md index 2515b5f6..13bb0112 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/clear-recycle-bin.md b/docs/clear-recycle-bin.md index beb84496..0a6370a7 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/clone-repos.md b/docs/clone-repos.md index 459ce91c..0afd5142 100644 --- a/docs/clone-repos.md +++ b/docs/clone-repos.md @@ -1,14 +1,14 @@ *clone-repos.ps1* ================ -This PowerShell script clones popular Git repositories into a target directory. +This PowerShell script clones popular Git repositories into a common target directory. Parameters ---------- ```powershell -PS> ./clone-repos.ps1 [[-TargetDir] ] [] +PS> ./clone-repos.ps1 [[-targetDir] ] [] --TargetDir +-targetDir Specifies the file path to the target directory (current working directory by default) Required? false @@ -25,12 +25,9 @@ PS> ./clone-repos.ps1 [[-TargetDir] ] [] Example ------- ```powershell -PS> ./clone-repos C:\Repos -⏳ (1) Searching for Git executable... git version 2.41.0.windows.3 -⏳ (2) Reading Data/popular-repositories.csv... 28 repos -⏳ (3) Checking target folder... 📂repos -⏳ (4/32) Cloning into 📂base256unicode (dev tool)... +PS> ./clone-repos C:\MyRepos ... +✔️ Cloned 29 of 29 Git repos into 📂MyRepos in 123 sec ``` @@ -49,69 +46,65 @@ Script Content .SYNOPSIS Clones Git repos .DESCRIPTION - This PowerShell script clones popular Git repositories into a target directory. + This PowerShell script clones popular Git repositories into a common target directory. .PARAMETER targetDir Specifies the file path to the target directory (current working directory by default) .EXAMPLE - PS> ./clone-repos C:\Repos - ⏳ (1) Searching for Git executable... git version 2.41.0.windows.3 - ⏳ (2) Reading Data/popular-repositories.csv... 28 repos - ⏳ (3) Checking target folder... 📂repos - ⏳ (4/32) Cloning into 📂base256unicode (dev tool)... + PS> ./clone-repos C:\MyRepos ... + ✔️ Cloned 29 of 29 Git repos into 📂MyRepos in 123 sec .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$TargetDir = "$PWD") +param([string]$targetDir = "$PWD") try { - $StopWatch = [system.diagnostics.stopwatch]::startNew() + $stopWatch = [system.diagnostics.stopwatch]::startNew() 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" - $NumEntries = $Table.count - Write-Host "$NumEntries repos" + Write-Host "⏳ (2) Reading data/popular-repositories.csv... " -noNewline + $table = Import-CSV "$PSScriptRoot/../data/popular-repositories.csv" + $total = $table.count + Write-Host "$total repos" - $TargetDirName = (Get-Item "$TargetDir").Name - Write-Host "⏳ (3) Checking target folder... 📂$TargetDirName" - if (-not(Test-Path "$TargetDir" -pathType container)) { throw "Can't access directory: $TargetDir" } + $targetDirName = (Get-Item "$targetDir").Name + Write-Host "⏳ (3) Checking target folder... 📂$targetDirName" + if (-not(Test-Path "$targetDir" -pathType container)) { throw "Can't access directory: $targetDir" } - [int]$Step = 3 - [int]$Cloned = 0 - [int]$Skipped = 0 - foreach($Row in $Table) { - [string]$FolderName = $Row.FOLDERNAME - [string]$Category = $Row.CATEGORY - [string]$Branch = $Row.BRANCH - [string]$Shallow = $Row.SHALLOW - [string]$URL = $Row.URL - $Step++ + [int]$step = 3 + [int]$cloned = 0 + [int]$skipped = 0 + foreach($row in $table) { + [string]$folderName = $row.FOLDERNAME + [string]$category = $row.CATEGORY + [string]$URL = $row.URL + [string]$branch = $row.BRANCH + [string]$shallow = $row.SHALLOW + $step++ - if (Test-Path "$TargetDir/$FolderName" -pathType container) { - "⏳ ($Step/$($NumEntries + 4)) Skipping existing 📂$FolderName ($Category)..." - $Skipped++ - continue - } - if ($Shallow -eq "yes") { - "⏳ ($Step/$($NumEntries + 4)) Cloning into 📂$FolderName ($Category) - $Branch branch only..." - & 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" } + if (Test-Path "$targetDir/$folderName" -pathType container) { + "⏳ ($step/$($total + 4)) Skipping existing 📂$folderName (a $category)..." + $skipped++ + } elseif ($shallow -eq "yes") { + "⏳ ($step/$($total + 4)) 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/$($NumEntries + 4)) Cloning into 📂$FolderName ($Category) - $Branch branch with 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" } + "⏳ ($step/$($total + 4)) 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++ } - $Cloned++ } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ Cloning $Cloned of $NumEntries Git repos into folder 📂$TargetDirName took $Elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Cloned $cloned of $total Git repos into 📂$targetDirName in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -119,4 +112,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-calculator.md b/docs/close-calculator.md index 48a87521..d2d28381 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-chrome.md b/docs/close-chrome.md index b1826321..24cdeec1 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-cortana.md b/docs/close-cortana.md index 3b512b62..1f14f81b 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-edge.md b/docs/close-edge.md index b9ea6e1c..8156b5ba 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-file-explorer.md b/docs/close-file-explorer.md index eb91efe7..c74bb7a1 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-firefox.md b/docs/close-firefox.md index db1129dd..61a4564c 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-git-extensions.md b/docs/close-git-extensions.md index f576833c..4c85fac7 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-magnifier.md b/docs/close-magnifier.md index 4ae8d141..1914c3ce 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-microsoft-paint.md b/docs/close-microsoft-paint.md index 49a8035c..88f0621b 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-paint.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-microsoft-store.md b/docs/close-microsoft-store.md index cabef457..5da14360 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-microsoft-store.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-netflix.md b/docs/close-netflix.md index 5d693078..b55f486e 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-netflix.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-note-pad.md b/docs/close-note-pad.md index ee8bcf93..c1cef090 100644 --- a/docs/close-note-pad.md +++ b/docs/close-note-pad.md @@ -48,4 +48,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-note-pad.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-note-pad.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-obs-studio.md b/docs/close-obs-studio.md index 680c9a16..b8532d7c 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-obs-studio.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-one-calendar.md b/docs/close-one-calendar.md index 4390c546..7b9cf8ab 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-one-calendar.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-outlook.md b/docs/close-outlook.md index 65380f84..c6f3d9b2 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-outlook.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-paint-three-d.md b/docs/close-paint-three-d.md index bad32428..fd8e8727 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-paint-three-d.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-program.md b/docs/close-program.md index 0c987c51..4877ae97 100644 --- a/docs/close-program.md +++ b/docs/close-program.md @@ -118,4 +118,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of close-program.ps1 as of 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-program.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-serenade.md b/docs/close-serenade.md index 6bbc9598..c86679d6 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 10/19/2023 08:11:36)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-serenade.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-snipping-tool.md b/docs/close-snipping-tool.md index 00e2a4dc..c485d90c 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-snipping-tool.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-spotify.md b/docs/close-spotify.md index bd42dd3a..94518971 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-spotify.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-task-manager.md b/docs/close-task-manager.md index 9f88236e..f21e96ac 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-task-manager.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-three-d-viewer.md b/docs/close-three-d-viewer.md index 562d03ff..4eddb0a4 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-three-d-viewer.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-thunderbird.md b/docs/close-thunderbird.md index 34ccddbe..9164475e 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-thunderbird.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-visual-studio.md b/docs/close-visual-studio.md index 12e19a78..55412990 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-visual-studio.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-vlc.md b/docs/close-vlc.md index 8e3f05a8..f4d8c4f0 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-vlc.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/close-windows-terminal.md b/docs/close-windows-terminal.md index fb811d9e..58128344 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of close-windows-terminal.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/configure-git.md b/docs/configure-git.md index d8cfb8db..ec05112d 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of configure-git.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/connect-vpn.md b/docs/connect-vpn.md index f0f81a17..43b06b88 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of connect-vpn.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/convert-csv2txt.md b/docs/convert-csv2txt.md index c5fdadb4..572ece84 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-csv2txt.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/convert-docx2md.md b/docs/convert-docx2md.md index 15a30faa..c5245986 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-docx2md.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/convert-frames2mp4.md b/docs/convert-frames2mp4.md index 1c04c2c6..83d67029 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-frames2mp4.ps1 as of 12/07/2023 20:24:16)* diff --git a/docs/convert-image2ascii.md b/docs/convert-image2ascii.md index d89dd1d9..94f1faf0 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2ascii.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-image2blurred-frames.md b/docs/convert-image2blurred-frames.md index 786b5a55..d9d832b8 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2blurred-frames.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-image2pixelated-frames.md b/docs/convert-image2pixelated-frames.md index 637cc2a8..c78a118c 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-image2pixelated-frames.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-md2docx.md b/docs/convert-md2docx.md index 7d4818a6..4c70c673 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2docx.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-md2html.md b/docs/convert-md2html.md index b9a8e221..2f6fb091 100644 --- a/docs/convert-md2html.md +++ b/docs/convert-md2html.md @@ -69,7 +69,7 @@ try { Write-Host "⏳ Converting..." gci -r -i $FilePattern | foreach { $TargetPath = $_.directoryname + "\" + $_.basename + ".html" - pandoc --standalone --template "$PSScriptRoot/../Data/Templates/template.html" -s $_.name -o $TargetPath + pandoc --standalone --template "$PSScriptRoot/../data/templates/template.html" -s $_.name -o $TargetPath } [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds "✔️ converted in $Elapsed sec" @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2html.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2html.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-md2pdf.md b/docs/convert-md2pdf.md index cbd7ee7d..9ee7c5e8 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-md2pdf.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-mysql2csv.md b/docs/convert-mysql2csv.md index 81d75bd0..84a655f7 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-mysql2csv.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-ps2bat.md b/docs/convert-ps2bat.md index a9bc1e96..08b10b73 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2bat.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-ps2md.md b/docs/convert-ps2md.md index b54fe3dd..8b647e56 100644 --- a/docs/convert-ps2md.md +++ b/docs/convert-ps2md.md @@ -114,7 +114,7 @@ try { "----------" "``````powershell" $Syntax = (($full.syntax | Out-String) -replace "`r`n", "`r`n").Trim() - $Syntax = (($Syntax | Out-String) -replace "/home/mf/Repos/PowerShell/Scripts/", "PS> ./") + $Syntax = (($Syntax | Out-String) -replace "/home/mf/Repos/PowerShell/scripts/", "PS> ./") if ($Syntax -ne "") { "$Syntax" } @@ -185,4 +185,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2md.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-ps2md.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-sql2csv.md b/docs/convert-sql2csv.md index 8f1a1704..b01ab13e 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-sql2csv.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/convert-txt2wav.md b/docs/convert-txt2wav.md index 97be1f84..e8619b4e 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of convert-txt2wav.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/copy-photos-sorted.md b/docs/copy-photos-sorted.md index 1fbb5110..003fbaba 100644 --- a/docs/copy-photos-sorted.md +++ b/docs/copy-photos-sorted.md @@ -108,4 +108,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of copy-photos-sorted.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of copy-photos-sorted.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/count-lines-of-code.md b/docs/count-lines-of-code.md index ece83d54..020eec2f 100644 --- a/docs/count-lines-of-code.md +++ b/docs/count-lines-of-code.md @@ -62,7 +62,7 @@ param([string]$path = "") try { if ($path -eq "" ) { $path = Read-Host "Enter the path to the directory tree" } - Write-Progress "⏳ Counting lines of code (LOC)..." + Write-Progress "Counting lines.." $stopWatch = [system.diagnostics.stopwatch]::startNew() $path = Resolve-Path "$path" @@ -83,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of count-lines-of-code.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of count-lines-of-code.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/decrypt-file.md b/docs/decrypt-file.md index 1252d91d..9326375c 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of decrypt-file.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/disable-ipv6.md b/docs/disable-ipv6.md index d2f04b63..04c29b71 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of disable-ipv6.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/disconnect-vpn.md b/docs/disconnect-vpn.md index d50c0591..6e70ac45 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of disconnect-vpn.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/download-dir.md b/docs/download-dir.md index 5aa810a5..8a52435d 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of download-dir.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/download-file.md b/docs/download-file.md index b4a05b82..000290e4 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of download-file.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/edit.md b/docs/edit.md index 6ad0131f..22f91d1e 100644 --- a/docs/edit.md +++ b/docs/edit.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of edit.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of edit.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/enable-crash-dumps.md b/docs/enable-crash-dumps.md index 4fe80f2b..8bc4015a 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-crash-dumps.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/enable-god-mode.md b/docs/enable-god-mode.md index 2fd0aec8..ca5cef3a 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-god-mode.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/enable-ipv6.md b/docs/enable-ipv6.md index dd2c4f89..bce8327c 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of enable-ipv6.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/encrypt-file.md b/docs/encrypt-file.md index 7ceb1b39..1fbc1912 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of encrypt-file.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/enter-chat.md b/docs/enter-chat.md index 1299d21b..16b88c57 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of enter-chat.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/export-to-manuals.md b/docs/export-to-manuals.md index ed12ea64..5dc3a2b3 100644 --- a/docs/export-to-manuals.md +++ b/docs/export-to-manuals.md @@ -20,7 +20,7 @@ PS> ./export-to-manuals.ps1 [[-FilePattern] ] [[-TargetDir] ] [< Required? false Position? 2 - Default value "$PSScriptRoot/../Docs" + Default value "$PSScriptRoot/../docs" Accept pipeline input? false Accept wildcard characters? false @@ -33,8 +33,8 @@ Example ------- ```powershell PS> ./export-to-manuals.ps1 -⏳ (1/2) Reading PowerShell scripts from /home/mf/PowerShell/Scripts/*.ps1 ... -⏳ (2/2) Exporting Markdown manuals to /home/mf/PowerShell/Scripts/../Docs ... +⏳ (1/2) Reading PowerShell scripts from /home/mf/PowerShell/scripts/*.ps1 ... +⏳ (2/2) Exporting Markdown manuals to /home/mf/PowerShell/docs ... ✔️ Exported 518 Markdown manuals in 28 sec ``` @@ -57,8 +57,8 @@ Script Content This PowerShell script exports the comment based help of all PowerShell scripts as manuals. .EXAMPLE PS> ./export-to-manuals.ps1 - ⏳ (1/2) Reading PowerShell scripts from /home/mf/PowerShell/Scripts/*.ps1 ... - ⏳ (2/2) Exporting Markdown manuals to /home/mf/PowerShell/Scripts/../Docs ... + ⏳ (1/2) Reading PowerShell scripts from /home/mf/PowerShell/scripts/*.ps1 ... + ⏳ (2/2) Exporting Markdown manuals to /home/mf/PowerShell/docs ... ✔️ Exported 518 Markdown manuals in 28 sec .LINK https://github.com/fleschutz/PowerShell @@ -68,7 +68,7 @@ Script Content #requires -version 2 -param([string]$FilePattern = "$PSScriptRoot/*.ps1", [string]$TargetDir = "$PSScriptRoot/../Docs") +param([string]$FilePattern = "$PSScriptRoot/*.ps1", [string]$TargetDir = "$PSScriptRoot/../docs") try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -90,4 +90,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of export-to-manuals.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of export-to-manuals.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/fetch-repo.md b/docs/fetch-repo.md index df179848..dda7bdc9 100644 --- a/docs/fetch-repo.md +++ b/docs/fetch-repo.md @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repo.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repo.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/fetch-repos.md b/docs/fetch-repos.md index 67a85dbc..63a793ef 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of fetch-repos.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/firefox-installer.md b/docs/firefox-installer.md index 66c10c08..65efa6ef 100644 --- a/docs/firefox-installer.md +++ b/docs/firefox-installer.md @@ -31,25 +31,19 @@ https://github.com/pakoti/Awesome_Sysadmin Script Content -------------- ```powershell - <# .SYNOPSIS firefox installer .DESCRIPTION Download and install latest firefox .EXAMPLE - PS> ./firefox-installer.ps1 - + PS> ./firefox-installer.ps1 .LINK https://github.com/pakoti/Awesome_Sysadmin .NOTES Author: Dark Master | License: CC0-1,0 #> - - - - try { $StopWatch = [system.diagnostics.stopwatch]::startNew() @@ -70,4 +64,4 @@ try { ``` -*(generated by convert-ps2md.ps1 using the comment-based help of firefox-installer.ps1 as of 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of firefox-installer.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/get-md5.md b/docs/get-md5.md index 2d2689d8..71818924 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-md5.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/get-sha1.md b/docs/get-sha1.md index b4418da9..7163eded 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-sha1.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/get-sha256.md b/docs/get-sha256.md index 6d6fa387..9b68445b 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of get-sha256.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/hibernate.md b/docs/hibernate.md index 1d3debba..b1d2bb0f 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of hibernate.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/import-vm.md b/docs/import-vm.md new file mode 100644 index 00000000..3065588c --- /dev/null +++ b/docs/import-vm.md @@ -0,0 +1,26 @@ +*import-vm.ps1* +================ + +import-vm.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +$VMName = "debian" +Get-ChildItem "C:\packer\$VMName\Virtual Machines\*.vmcx" | Import-VM -Copy -VhdDestinationPath "C:\VirtualMachines\$VMName\Virtual Hard Disks" -VirtualMachinePath "C:\VirtualMachines\$VMName" -GenerateNewId +Start-VM $VMName +exit 0 # success +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of import-vm.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/inspect-exe.md b/docs/inspect-exe.md index f5f4e70d..1317b0b9 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 10/19/2023 08:11:37)* +*(generated by convert-ps2md.ps1 using the comment-based help of inspect-exe.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-audacity.md b/docs/install-audacity.md index dac828b5..db190d5a 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-audacity.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-basic-apps.md b/docs/install-basic-apps.md index a6151cf5..8d373afd 100644 --- a/docs/install-basic-apps.md +++ b/docs/install-basic-apps.md @@ -54,7 +54,7 @@ try { $StopWatch = [system.diagnostics.stopwatch]::startNew() Write-Host "⏳ (1/37) Loading Data/basic-apps.csv... " -noNewline - $Table = Import-CSV "$PSScriptRoot/../Data/basic-apps.csv" + $Table = Import-CSV "$PSScriptRoot/../data/basic-apps.csv" $NumEntries = $Table.count "$NumEntries apps" Write-Host "⏳ (2/37) These apps will be installed or upgraded: " -noNewline @@ -89,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-apps.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-apps.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-basic-snaps.md b/docs/install-basic-snaps.md index 773d6cdb..2d0bf9b6 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-basic-snaps.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-calibre-server.md b/docs/install-calibre-server.md index e1d558d4..67145ed4 100644 --- a/docs/install-calibre-server.md +++ b/docs/install-calibre-server.md @@ -1,14 +1,14 @@ *install-calibre-server.ps1* ================ -This PowerShell script installs and starts a local Calibre server as background process (using Web port 8099 by default). +This PowerShell script installs and starts a local Calibre server as background process. Parameters ---------- ```powershell -PS> ./install-calibre-server.ps1 [[-Port] ] [[-UserDB] ] [[-Logfile] ] [] +PS> ./install-calibre-server.ps1 [[-port] ] [[-mediaFolder] ] [[-userDB] ] [[-logfile] ] [] --Port +-port Specifies the Web port number (8099 by default) Required? false @@ -17,18 +17,26 @@ PS> ./install-calibre-server.ps1 [[-Port] ] [[-UserDB] ] [[-Logfi Accept pipeline input? false Accept wildcard characters? false --UserDB +-mediaFolder Required? false Position? 2 + Default value "$HOME/Calibre Library" + Accept pipeline input? false + Accept wildcard characters? false + +-userDB + + Required? false + Position? 3 Default value "$HOME/CalibreUsers.sqlite" Accept pipeline input? false Accept wildcard characters? false --Logfile +-logfile Required? false - Position? 3 + Position? 4 Default value "$HOME/CalibreServer.log" Accept pipeline input? false Accept wildcard characters? false @@ -42,6 +50,8 @@ Example ------- ```powershell PS> ./install-calibre-server.ps1 +⏳ (1/5) Updating package infos... +... ``` @@ -58,13 +68,15 @@ Script Content ```powershell <# .SYNOPSIS - Installs Calibre server (needs admin rights) + Installs the Calibre server (needs admin rights) .DESCRIPTION - This PowerShell script installs and starts a local Calibre server as background process (using Web port 8099 by default). + This PowerShell script installs and starts a local Calibre server as background process. .PARAMETER port Specifies the Web port number (8099 by default) .EXAMPLE PS> ./install-calibre-server.ps1 + ⏳ (1/5) Updating package infos... + ... .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -73,36 +85,40 @@ Script Content #Requires -RunAsAdministrator -param([int]$Port = 8099, [string]$UserDB = "$HOME/CalibreUsers.sqlite", [string]$Logfile = "$HOME/CalibreServer.log") +param([int]$port = 8099, [string]$mediaFolder = "$HOME/Calibre Library", [string]$userDB = "$HOME/CalibreUsers.sqlite", [string]$logfile = "$HOME/CalibreServer.log") try { - $StopWatch = [system.diagnostics.stopwatch]::startNew() + if ($IsLinux) { + $stopWatch = [system.diagnostics.stopwatch]::startNew() - "⏳ (1/5) Updating package infos..." - & sudo apt update -y - if ($lastExitCode -ne "0") { throw "'apt update' failed" } + "⏳ (1/5) Updating package infos..." + & sudo apt update -y + if ($lastExitCode -ne "0") { throw "'apt update' failed" } - "⏳ (2/5) Installing the Calibre package..." - & sudo apt install calibre -y - if ($lastExitCode -ne "0") { throw "'apt install calibre' failed" } + "⏳ (2/5) Installing Calibre..." + & sudo apt install calibre -y + if ($lastExitCode -ne "0") { throw "'apt install calibre' failed" } - "⏳ (3/5) Searching for Calibre server executable..." - & calibre-server --version - if ($lastExitCode -ne "0") { throw "Can't execute 'calibre-server' - make sure Calibre server is installed and available" } + "⏳ (3/5) Searching for Calibre server executable..." + & calibre-server --version + if ($lastExitCode -ne "0") { throw "Can't execute 'calibre-server' - make sure Calibre server is installed and available" } - "⏳ (4/5) Creating folder 'Calibre Library' in your home directory..." - mkdir $HOME/'Calibre Library' + "⏳ (4/5) Creating media folder at: $mediaFolder ... (if non-existent)" + mkdir $mediaFolder - "⏳ (5/5) Starting Calibre server as background process..." - & calibre-server --port $Port --num-per-page 100 --userdb $UserDB --log $Logfile --daemonize $HOME/'Calibre Library' + "⏳ (5/5) Starting Calibre server as background process..." + & calibre-server --port $port --num-per-page 100 --userdb $userDB --log $logfile --daemonize $HOME/'Calibre Library' - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ installed Calibre in $Elapsed sec (Web port $Port, user DB at $UserDB, log file at $Logfile)" - exit 0 # success + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Installed Calibre server on Web port $port in $elapsed sec (media folder: $mediaFolder, user database: $userDB, log file: $logfile)" + exit 0 # success + } else { + throw "Currently only supported on Linux" + } } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-calibre-server.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-calibre-server.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-chocolatey.md b/docs/install-chocolatey.md index 89ed686e..b991149d 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-chocolatey.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-chrome.md b/docs/install-chrome.md index 8bdcc67e..74dc403f 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-chrome.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-crystal-disk-info.md b/docs/install-crystal-disk-info.md index 33d2b3be..ed79e894 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-info.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-crystal-disk-mark.md b/docs/install-crystal-disk-mark.md index 0c80dac1..7b4a954f 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-crystal-disk-mark.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-discord.md b/docs/install-discord.md index b2402d18..9b48a72a 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-discord.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-edge.md b/docs/install-edge.md index bfc61edb..bc2f2118 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-edge.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-evcc.md b/docs/install-evcc.md index e0f44977..ba051227 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-evcc.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-firefox.md b/docs/install-firefox.md index ffd193c4..38826b59 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-firefox.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-git-extensions.md b/docs/install-git-extensions.md index 356b8553..9ba30f30 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-git-extensions.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-git-for-windows.md b/docs/install-git-for-windows.md index 44a0a4f1..8e1ac1fa 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-git-for-windows.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-github-cli.md b/docs/install-github-cli.md index 1398f4d9..20778235 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-github-cli.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-irfanview.md b/docs/install-irfanview.md index 6896bac9..e9b0d0af 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-irfanview.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-knot-resolver.md b/docs/install-knot-resolver.md index cc2e1d99..80051e77 100644 --- a/docs/install-knot-resolver.md +++ b/docs/install-knot-resolver.md @@ -53,7 +53,7 @@ try { & sudo snap install knot-resolver-gael "⏳ Step 2/4: Copying default configuration..." - & sudo cp "$PSScriptRoot/../Data/default.kresd.conf" /var/snap/knot-resolver-gael/current/kresd.conf + & sudo cp "$PSScriptRoot/../data/default.kresd.conf" /var/snap/knot-resolver-gael/current/kresd.conf "⏳ Step 3/4: Let user configure..." & sudo vi /var/snap/knot-resolver-gael/current/kresd.conf @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-knot-resolver.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-knot-resolver.ps1 as of 12/07/2023 20:24:17)* diff --git a/docs/install-microsoft-teams.md b/docs/install-microsoft-teams.md index f53fce31..58988a76 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-microsoft-teams.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-netflix.md b/docs/install-netflix.md index 9206e491..de3def24 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-netflix.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-nine-zip.md b/docs/install-nine-zip.md index e662f939..5c6fe62a 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-nine-zip.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-obs-studio.md b/docs/install-obs-studio.md index 883ac78f..a5a2f0bc 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-obs-studio.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-octoprint.md b/docs/install-octoprint.md index 5c8dc337..aba5c700 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-octoprint.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-one-calendar.md b/docs/install-one-calendar.md index a3636027..bb5a0039 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-one-calendar.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-opera-browser.md b/docs/install-opera-browser.md index 8b4e7e3b..16bec2a3 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-browser.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-opera-gx.md b/docs/install-opera-gx.md index ea98325b..96055bdf 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-opera-gx.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-paint-3d.md b/docs/install-paint-3d.md index 3bc324dd..a7ce0f95 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-paint-3d.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-power-toys.md b/docs/install-power-toys.md index 48fe8bbc..1d927ea4 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-power-toys.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-powershell.md b/docs/install-powershell.md index 1c265696..4fe6f57b 100644 --- a/docs/install-powershell.md +++ b/docs/install-powershell.md @@ -640,4 +640,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-powershell.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-powershell.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-rufus.md b/docs/install-rufus.md index c9acc7ef..d66de60a 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-rufus.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-signal-cli.md b/docs/install-signal-cli.md index 7fc2c522..3a43de26 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-signal-cli.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-skype.md b/docs/install-skype.md index 4649242c..ca21aaf5 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-skype.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-spotify.md b/docs/install-spotify.md index 2e34df3c..b665ec2d 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-spotify.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-ssh-client.md b/docs/install-ssh-client.md index f748c337..5e53c01d 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-client.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-ssh-server.md b/docs/install-ssh-server.md index dfa5a68b..bf01593e 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-ssh-server.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-thunderbird.md b/docs/install-thunderbird.md index 03a9ca80..0e9ec205 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-thunderbird.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-twitter.md b/docs/install-twitter.md index 35398174..2504a203 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-twitter.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-unbound-server.md b/docs/install-unbound-server.md index 34ba8c53..feb2dc72 100644 --- a/docs/install-unbound-server.md +++ b/docs/install-unbound-server.md @@ -66,11 +66,11 @@ try { if ($lastExitCode -ne "0") { throw "'unbound-anchor' failed" } "⏳ (5/10) Checking config file..." - & unbound-checkconf "$PSScriptRoot/../Data/unbound.conf" + & unbound-checkconf "$PSScriptRoot/../data/unbound.conf" if ($lastExitCode -ne "0") { throw "'unbound-checkconf' failed - check the syntax" } "⏳ (6/10) Copying config file to /etc/unbound/unbound.conf ..." - & sudo cp "$PSScriptRoot/../Data/unbound.conf" /etc/unbound/unbound.conf + & sudo cp "$PSScriptRoot/../data/unbound.conf" /etc/unbound/unbound.conf if ($lastExitCode -ne "0") { throw "'cp' failed" } "⏳ (7/10) Stopping default DNS cache daemon systemd-resolved..." @@ -99,4 +99,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-unbound-server.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-unbound-server.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-updates.md b/docs/install-updates.md index 89abd354..b1e28487 100644 --- a/docs/install-updates.md +++ b/docs/install-updates.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of install-updates.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-updates.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-visual-studio-code.md b/docs/install-visual-studio-code.md index 002f791e..f1493b3a 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-visual-studio-code.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-vivaldi.md b/docs/install-vivaldi.md index c0dcb37c..81060089 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-vivaldi.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-vlc.md b/docs/install-vlc.md index e5a1a774..6feff810 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-vlc.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-windows-terminal.md b/docs/install-windows-terminal.md index 8ed855b7..9e6bafc7 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-windows-terminal.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-wsl.md b/docs/install-wsl.md index edf1799e..ef4f5a86 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-wsl.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/install-zoom.md b/docs/install-zoom.md index 463b83b0..560457a8 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of install-zoom.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/introduce-powershell.md b/docs/introduce-powershell.md index 08c9d44d..67987dbe 100644 --- a/docs/introduce-powershell.md +++ b/docs/introduce-powershell.md @@ -75,10 +75,10 @@ try { & "$PSScriptRoot/write-typewriter.ps1" "Want sample scripts? See the Mega Collection of PowerShell scripts at: https://github.com/fleschutz/PowerShell" 25 "" Write-Host " 🔷 " -noNewline - & "$PSScriptRoot/write-typewriter.ps1" "Want a cheat sheet? See: https://github.com/fleschutz/PowerShell/blob/master/Docs/cheat-sheet.md" 25 + & "$PSScriptRoot/write-typewriter.ps1" "Want a cheat sheet? See: https://github.com/fleschutz/PowerShell/blob/master/docs/cheat-sheet.md" 25 "" Write-Host " 🔷 " -noNewline - & "$PSScriptRoot/write-typewriter.ps1" "Got questions? See the FAQ at: https://github.com/fleschutz/PowerShell/blob/master/Docs/FAQ.md" 25 + & "$PSScriptRoot/write-typewriter.ps1" "Got questions? See the FAQ at: https://github.com/fleschutz/PowerShell/blob/master/docs/FAQ.md" 25 "" Write-Host " 🔷 " -noNewline & "$PSScriptRoot/write-typewriter.ps1" "Want to support and donate? Just follow: https://www.paypal.com/paypalme/Fleschutz" 25 @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of introduce-powershell.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-aliases.md b/docs/list-aliases.md index 7efa7c19..931a67f7 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-aliases.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-anagrams.md b/docs/list-anagrams.md index 8cee7231..3a31008b 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-anagrams.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-apps.md b/docs/list-apps.md index 6558c6d3..16462440 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-apps.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-ascii-table.md b/docs/list-ascii-table.md index d81a3819..80ededbd 100644 --- a/docs/list-ascii-table.md +++ b/docs/list-ascii-table.md @@ -102,4 +102,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-ascii-table.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ascii-table.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-automatic-variables.md b/docs/list-automatic-variables.md index d77c8793..220b4b64 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-automatic-variables.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-battery-status.md b/docs/list-battery-status.md index e0810905..2e4b502c 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-battery-status.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-bios.md b/docs/list-bios.md index 1729b8d4..2a42739f 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-bios.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-bluetooth-devices.md b/docs/list-bluetooth-devices.md index ee91c78a..d68870c5 100644 --- a/docs/list-bluetooth-devices.md +++ b/docs/list-bluetooth-devices.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-bluetooth-devices.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-bluetooth-devices.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-branches.md b/docs/list-branches.md index f7eac426..03a1adb5 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-branches.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-calendar.md b/docs/list-calendar.md index d8e3dc85..18fd1d4c 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-calendar.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-cheat-sheet.md b/docs/list-cheat-sheet.md index c85bf4d1..94accda1 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 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cheat-sheet.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-city-weather.md b/docs/list-city-weather.md index f888d96c..1a786484 100644 --- a/docs/list-city-weather.md +++ b/docs/list-city-weather.md @@ -50,4 +50,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-city-weather.ps1 as of 10/19/2023 08:11:38)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-city-weather.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-cli-tools.md b/docs/list-cli-tools.md index fff3d596..b01a52a5 100644 --- a/docs/list-cli-tools.md +++ b/docs/list-cli-tools.md @@ -352,4 +352,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-cli-tools.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cli-tools.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-clipboard.md b/docs/list-clipboard.md index 3a775837..45686a44 100644 --- a/docs/list-clipboard.md +++ b/docs/list-clipboard.md @@ -55,4 +55,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-clipboard.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-clipboard.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-cmdlets.md b/docs/list-cmdlets.md index 85cb0cb1..b5e27e93 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cmdlets.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-coffee-prices.md b/docs/list-coffee-prices.md index df12817d..43b3f4a5 100644 --- a/docs/list-coffee-prices.md +++ b/docs/list-coffee-prices.md @@ -52,7 +52,7 @@ function WriteHorizontalBar { param([float]$Value, [float]$Max) } try { - Write-Progress "⏳ Loading data from www.alphavantage.co..." + Write-Progress "Loading data from www.alphavantage.co..." $prices = (Invoke-WebRequest -URI "https://www.alphavantage.co/query?function=COFFEE&interval=monthly&apikey=demo" -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json Write-Progress -completed " " @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-coffee-prices.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-coffee-prices.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-commit-stats.md b/docs/list-commit-stats.md index b5d2ef52..5156e866 100644 --- a/docs/list-commit-stats.md +++ b/docs/list-commit-stats.md @@ -68,22 +68,22 @@ Script Content param([string]$path = "$PWD") try { - Write-Progress "⏳ (1/4) Searching for Git executable..." + Write-Progress "(1/4) Searching for Git executable..." $null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Progress "⏳ (2/4) Checking local Git repository..." + Write-Progress "(2/4) Checking local Git repository..." if (-not(Test-Path "$path" -pathType container)) { throw "Can't access directory: $path" } - Write-Progress "⏳ (3/4) Fetching updates..." + Write-Progress "(3/4) Fetching updates..." & git -C "$path" fetch --all --quiet if ($lastExitCode -ne "0") { throw "'git fetch' failed with exit code $lastExitCode" } - Write-Progress "⏳ (4/4) Querying commits..." + Write-Progress "(4/4) Querying commits..." " " "Commits Author" "------- ------" - Write-Progress -completed " " + Write-Progress -completed "Done." git -C "$path" shortlog --summary --numbered --email --no-merges if ($lastExitCode -ne "0") { throw "'git shortlog' failed with exit code $lastExitCode" } exit 0 # success @@ -93,4 +93,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-commit-stats.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-commit-stats.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-commits.md b/docs/list-commits.md index d6fb4f57..d80e66ae 100644 --- a/docs/list-commits.md +++ b/docs/list-commits.md @@ -86,10 +86,10 @@ try { $Null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Progress "⏳ Fetching latest updates..." + Write-Progress "Fetching latest updates..." & git -C "$RepoDir" fetch --all --quiet if ($lastExitCode -ne "0") { throw "'git fetch' failed" } - Write-Progress -Completed " " + Write-Progress -Completed "Done." if ($Format -eq "pretty") { "" @@ -121,4 +121,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-commits.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-commits.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-console-colors.md b/docs/list-console-colors.md index fad06b30..ff54a086 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-console-colors.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-countries.md b/docs/list-countries.md index 8597e274..4eca1470 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-countries.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-cpu.md b/docs/list-cpu.md index b8bcdb9f..52dd1bfb 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-cpu.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-credits.md b/docs/list-credits.md index 8f215a94..2258cb02 100644 --- a/docs/list-credits.md +++ b/docs/list-credits.md @@ -80,4 +80,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-credits.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-credits.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-crypto-rates.md b/docs/list-crypto-rates.md index 4cbd2d46..93542178 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-crypto-rates.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-defender-settings.md b/docs/list-defender-settings.md index 3db60c73..aa3ef5d9 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-defender-settings.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-dir-tree.md b/docs/list-dir-tree.md index 077bcb4e..a7dc1be3 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-dir-tree.ps1 as of 12/07/2023 20:24:18)* diff --git a/docs/list-dns-servers.md b/docs/list-dns-servers.md index a01e56ad..aa6e779b 100644 --- a/docs/list-dns-servers.md +++ b/docs/list-dns-servers.md @@ -46,7 +46,7 @@ function CheckDNSServer { param($Provider, $IPv4Pri, $IPv4Sec) function List-DNS-Servers { Write-Progress "Loading Data/public-dns-servers.csv..." - $Table = Import-CSV "$PSScriptRoot/../Data/public-dns-servers.csv" + $Table = Import-CSV "$PSScriptRoot/../data/public-dns-servers.csv" foreach($Row in $Table) { CheckDNSServer $Row.PROVIDER $Row.IPv4_PRI $Row.IPv4_SEC } @@ -62,4 +62,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-dns-servers.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-dns-servers.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-drives.md b/docs/list-drives.md index 7e742e08..34a27efc 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-drives.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-earthquakes.md b/docs/list-earthquakes.md index 09476f61..6a4c88e2 100644 --- a/docs/list-earthquakes.md +++ b/docs/list-earthquakes.md @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-earthquakes.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-earthquakes.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-emojis.md b/docs/list-emojis.md index d4af9aa6..c4995147 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-emojis.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-empty-dirs.md b/docs/list-empty-dirs.md index 98df294c..3f5c661a 100644 --- a/docs/list-empty-dirs.md +++ b/docs/list-empty-dirs.md @@ -1,14 +1,14 @@ *list-empty-dirs.ps1* ================ -This PowerShell script scans and lists all empty subfolders within the given directory tree. +This PowerShell script scans a directory tree and lists all empty directories. Parameters ---------- ```powershell -PS> ./list-empty-dirs.ps1 [[-DirTree] ] [] +PS> ./list-empty-dirs.ps1 [[-path] ] [] --DirTree +-path Specifies the path to the directory tree (current working directory by default) Required? false @@ -25,7 +25,9 @@ PS> ./list-empty-dirs.ps1 [[-DirTree] ] [] Example ------- ```powershell -PS> ./list-empty-dirs.ps1 C:\ +PS> ./list-empty-dirs.ps1 C:\Windows +... +✔️ Found 39972 empty directories within 📂C:\Windows in 222 sec ``` @@ -42,34 +44,36 @@ Script Content ```powershell <# .SYNOPSIS - Lists empty subfolders + Lists all empty directories in a directory tree .DESCRIPTION - This PowerShell script scans and lists all empty subfolders within the given directory tree. -.PARAMETER DirTree + This PowerShell script scans a directory tree and lists all empty directories. +.PARAMETER path Specifies the path to the directory tree (current working directory by default) .EXAMPLE - PS> ./list-empty-dirs.ps1 C:\ + PS> ./list-empty-dirs.ps1 C:\Windows + ... + ✔️ Found 39972 empty directories within 📂C:\Windows in 222 sec .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$DirTree = "$PWD") +param([string]$path = "$PWD") try { - $StopWatch = [system.diagnostics.stopwatch]::startNew() + $stopWatch = [system.diagnostics.stopwatch]::startNew() - $DirTree = Resolve-Path "$DirTree" - Write-Progress "Listing empty subfolders in $DirTree..." - [int]$Count = 0 - Get-ChildItem "$DirTree" -attributes Directory -recurse | Where {$_.GetFileSystemInfos().Count -eq 0} | ForEach-Object { + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for empty folders..." + [int]$count = 0 + Get-ChildItem "$path" -attributes Directory -recurse -force | Where-Object { @(Get-ChildItem $_.FullName -force).Count -eq 0 } | ForEach-Object { "📂$($_.FullName)" - $Count++ + $count++ } - - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ found $Count empty subfolders within directory tree $DirTree in $Elapsed sec." + Write-Progress -completed " " + [int]$Elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count empty directories within 📂$path in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -77,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-dirs.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-dirs.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-empty-files.md b/docs/list-empty-files.md index 741f0969..94584afc 100644 --- a/docs/list-empty-files.md +++ b/docs/list-empty-files.md @@ -1,19 +1,19 @@ *list-empty-files.ps1* ================ -This PowerShell script scans and lists all empty files within the given directory tree. +This PowerShell script scans a directory tree and lists all empty files. Parameters ---------- ```powershell -PS> ./list-empty-files.ps1 [[-DirTree] ] [] +PS> ./list-empty-files.ps1 [[-path] ] [] --DirTree - Specifies the path to the directory tree +-path + Specifies the path to the directory tree (default is current working dir) Required? false Position? 1 - Default value + Default value "$PWD" Accept pipeline input? false Accept wildcard characters? false @@ -25,7 +25,9 @@ PS> ./list-empty-files.ps1 [[-DirTree] ] [] Example ------- ```powershell -PS> ./list-empty-files.ps1 C:\ +PS> ./list-empty-files.ps1 C:\Windows +... +✔️ Found 6 empty files within C:\Windows in 54 sec ``` @@ -42,32 +44,36 @@ Script Content ```powershell <# .SYNOPSIS - Lists empty files within a directory tree + Lists all empty files in a directory tree .DESCRIPTION - This PowerShell script scans and lists all empty files within the given directory tree. -.PARAMETER DirTree - Specifies the path to the directory tree + This PowerShell script scans a directory tree and lists all empty files. +.PARAMETER path + Specifies the path to the directory tree (default is current working dir) .EXAMPLE - PS> ./list-empty-files.ps1 C:\ + PS> ./list-empty-files.ps1 C:\Windows + ... + ✔️ Found 6 empty files within C:\Windows in 54 sec .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$DirTree = "") +param([string]$path = "$PWD") try { - if ($DirTree -eq "" ) { $DirTree = read-host "Enter the path to the directory tree" } + $stopWatch = [system.diagnostics.stopwatch]::startNew() - [int]$Count = 0 - write-progress "Listing empty files in $DirTree ..." - get-childItem $DirTree -attributes !Directory -recurse | where {$_.Length -eq 0} | foreach-object { - write-output $_.FullName - $Count++ + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for empty files..." + [int]$count = 0 + Get-ChildItem $path -attributes !Directory -recurse | where {$_.Length -eq 0} | Foreach-Object { + "📄$($_.FullName)" + $count++ } - - "✔️ found $Count empty file(s)" + Write-Progress -completed " " + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count empty files within $path in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -75,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-files.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-empty-files.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-encrypted-files.md b/docs/list-encrypted-files.md new file mode 100644 index 00000000..0734b160 --- /dev/null +++ b/docs/list-encrypted-files.md @@ -0,0 +1,84 @@ +*list-encrypted-files.ps1* +================ + +This PowerShell script scans a directory tree and lists all encrypted files. + +Parameters +---------- +```powershell +PS> ./list-encrypted-files.ps1 [[-path] ] [] + +-path + Specifies the path to the directory tree (default is current working dir) + + 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> ./list-encrypted-files.ps1 C:\Windows +... +✔️ Found 0 encrypted files within 📂C:\Windows in 41 sec + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists all encrypted files in a directory tree +.DESCRIPTION + This PowerShell script scans a directory tree and lists all encrypted files. +.PARAMETER path + Specifies the path to the directory tree (default is current working dir) +.EXAMPLE + PS> ./list-encrypted-files.ps1 C:\Windows + ... + ✔️ Found 0 encrypted files within 📂C:\Windows in 41 sec +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$path = "$PWD") + +try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for encrypted files..." + [int]$count = 0 + Get-ChildItem "$path" -attributes Encrypted -recurse | Foreach-Object { + "📄$($_.FullName)" + $count++ + } + Write-Progress -completed " " + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count encrypted files within 📂$path 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 list-encrypted-files.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-environment-variables.md b/docs/list-environment-variables.md index 9e813bde..d7dd850a 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-environment-variables.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-error-types.md b/docs/list-error-types.md new file mode 100644 index 00000000..d5e96b89 --- /dev/null +++ b/docs/list-error-types.md @@ -0,0 +1,29 @@ +*list-error-types.ps1* +================ + +list-error-types.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +[appdomain]::CurrentDomain.GetAssemblies() | ForEach { + Try { + $_.GetExportedTypes() | Where { + $_.Fullname -match 'Exception' + } + } Catch {} +} | Select BaseType,Name,FullName +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of list-error-types.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-exchange-rates.md b/docs/list-exchange-rates.md index 3fcafb74..a9864bbf 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-exchange-rates.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-executables.md b/docs/list-executables.md new file mode 100644 index 00000000..bf4179f3 --- /dev/null +++ b/docs/list-executables.md @@ -0,0 +1,84 @@ +*list-executables.ps1* +================ + +This PowerShell script scans a directory tree and lists all executables. + +Parameters +---------- +```powershell +PS> ./list-executables.ps1 [[-path] ] [] + +-path + Specifies the path to the directory tree (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> ./list-executables.ps1 C:\Windows +... +✔️ Found 8239 executables within 📂C:\Windows in 99 sec + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists all executables in a directory tree +.DESCRIPTION + This PowerShell script scans a directory tree and lists all executables. +.PARAMETER path + Specifies the path to the directory tree (current working directory by default) +.EXAMPLE + PS> ./list-executables.ps1 C:\Windows + ... + ✔️ Found 8239 executables within 📂C:\Windows in 99 sec +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$path = "$PWD") + +try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for executables..." + [int]$count = 0 + Get-ChildItem "$path" -attributes !Directory -recurse -force | Where-Object { $_.Name -like "*.exe" } | ForEach-Object { + "📂$($_.FullName)" + $count++ + } + Write-Progress -completed " " + [int]$Elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count executables within 📂$path 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 list-executables.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-fibonacci.md b/docs/list-fibonacci.md index 997f6663..3c550d20 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fibonacci.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-files.md b/docs/list-files.md index b5cb5c51..89acd494 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-files.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-folder.md b/docs/list-folder.md index 866d7d35..aad8a220 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-folder.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-fritzbox-calls.md b/docs/list-fritzbox-calls.md index 6bd78d4c..ce9374ef 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-calls.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-fritzbox-devices.md b/docs/list-fritzbox-devices.md index 7e881fdb..dec8e651 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-fritzbox-devices.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-headlines.md b/docs/list-headlines.md index 48a41838..c9017d8f 100644 --- a/docs/list-headlines.md +++ b/docs/list-headlines.md @@ -1,28 +1,28 @@ *list-headlines.ps1* ================ -This PowerShell script lists the latest RSS feed news. +This PowerShell script lists the latest headlines by using a RSS (Really Simple Syndication) feed. Parameters ---------- ```powershell -PS> ./list-headlines.ps1 [[-RSS_URL] ] [[-maxCount] ] [] +PS> ./list-headlines.ps1 [[-RSS_URL] ] [[-maxLines] ] [] -RSS_URL - Specifies the URL to the RSS feed + Specifies the URL to the RSS feed (Yahoo World News by default) Required? false Position? 1 - Default value https://yahoo.com/news/rss/world + Default value https://news.yahoo.com/rss/world Accept pipeline input? false Accept wildcard characters? false --maxCount - Specifies the number of news to list +-maxLines + Specifies the maximum number of lines to list (24 by default) Required? false Position? 2 - Default value 20 + Default value 24 Accept pipeline input? false Accept wildcard characters? false @@ -55,11 +55,11 @@ Script Content .SYNOPSIS Lists the latest headlines .DESCRIPTION - This PowerShell script lists the latest RSS feed news. + 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 -.PARAMETER maxCount - Specifies the number of news to list + Specifies the URL to the RSS feed (Yahoo World News by default) +.PARAMETER maxLines + Specifies the maximum number of lines to list (24 by default) .EXAMPLE PS> ./list-headlines.ps1 ❇️ Niger coup: Ecowas deadline sparks anxiety in northern Nigeria @@ -70,18 +70,17 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$RSS_URL = "https://yahoo.com/news/rss/world", [int]$maxCount = 20) +param([string]$RSS_URL = "https://news.yahoo.com/rss/world", [int]$maxLines = 24) try { - [xml]$content = (Invoke-WebRequest -uri $RSS_URL -useBasicParsing).Content - [int]$count = 0 + [xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content + [int]$count = 1 foreach ($item in $content.rss.channel.item) { "❇️ $($item.title)" - $count++ - if ($count -eq $maxCount) { break } + if ($count++ -eq $maxLines) { break } } - $source = $Content.rss.channel.title - $date = $Content.rss.channel.pubDate + $source = $content.rss.channel.title + $date = $content.rss.channel.pubDate " (by $source as of $date)" exit 0 # success } catch { @@ -90,4 +89,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-headlines.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-headlines.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-hidden-files.md b/docs/list-hidden-files.md index bfcf3dd2..13478454 100644 --- a/docs/list-hidden-files.md +++ b/docs/list-hidden-files.md @@ -1,15 +1,15 @@ *list-hidden-files.ps1* ================ -This PowerShell script scans and lists all hidden files in a directory tree. +This PowerShell script scans a directory tree and lists all hidden files. Parameters ---------- ```powershell -PS> ./list-hidden-files.ps1 [[-DirTree] ] [] +PS> ./list-hidden-files.ps1 [[-path] ] [] --DirTree - Specifies the path to the directory tree +-path + Specifies the path to the directory tree (default is current working dir) Required? false Position? 1 @@ -25,7 +25,9 @@ PS> ./list-hidden-files.ps1 [[-DirTree] ] [] Example ------- ```powershell -PS> ./list-hidden-files.ps1 C:\ +PS> ./list-hidden-files.ps1 C:\Windows +... +✔️ Found 256 hidden files within 📂C:\Windows in 40 sec ``` @@ -42,31 +44,36 @@ Script Content ```powershell <# .SYNOPSIS - Lists hidden files in a directory tree + Lists all hidden files in a directory tree .DESCRIPTION - This PowerShell script scans and lists all hidden files in a directory tree. -.PARAMETER DirTree - Specifies the path to the directory tree + This PowerShell script scans a directory tree and lists all hidden files. +.PARAMETER path + Specifies the path to the directory tree (default is current working dir) .EXAMPLE - PS> ./list-hidden-files.ps1 C:\ + PS> ./list-hidden-files.ps1 C:\Windows + ... + ✔️ Found 256 hidden files within 📂C:\Windows in 40 sec .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$DirTree = "$PWD") +param([string]$path = "$PWD") try { - $DirTree = resolve-path "$DirTree" - write-progress "Listing hidden files in $DirTree ..." + $stopWatch = [system.diagnostics.stopwatch]::startNew() - [int]$Count = 0 - get-childItem "$DirTree" -attributes Hidden -recurse | foreach-object { - "📄 $($_.FullName)" - $Count++ + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for hidden files..." + [int]$count = 0 + Get-ChildItem "$path" -attributes Hidden -recurse | Foreach-Object { + "📄$($_.FullName)" + $count++ } - "✔️ directory tree $DirTree has $Count hidden file(s)" + Write-Progress -completed " " + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count hidden files within 📂$path in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -74,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-hidden-files.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-installed-languages.md b/docs/list-installed-languages.md index 0178045f..9eb591da 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-languages.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-installed-scripts.md b/docs/list-installed-scripts.md index d9ff26a1..6e5869b1 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-scripts.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-installed-software.md b/docs/list-installed-software.md index d7c93473..8d2559ac 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-installed-software.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-ipv6.md b/docs/list-ipv6.md index e8910bd0..0a5c9efe 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ipv6.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-latest-tag.md b/docs/list-latest-tag.md index e7c3466f..e56b3617 100644 --- a/docs/list-latest-tag.md +++ b/docs/list-latest-tag.md @@ -75,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tag.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tag.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-latest-tags.md b/docs/list-latest-tags.md index 342397e9..23f1cf17 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-latest-tags.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-memos.md b/docs/list-memos.md index 7d2ba85b..9b4c7b85 100644 --- a/docs/list-memos.md +++ b/docs/list-memos.md @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-memos.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-memos.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-modules.md b/docs/list-modules.md index cb7273a2..0bd5dd7d 100644 --- a/docs/list-modules.md +++ b/docs/list-modules.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-modules.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-modules.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-motherboard.md b/docs/list-motherboard.md index 1ea9c7b5..865c44f3 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-motherboard.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-mysql-tables.md b/docs/list-mysql-tables.md index 70caa134..d4ebd3f2 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-mysql-tables.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-network-connections.md b/docs/list-network-connections.md index 3663cbc2..167282a1 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-connections.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-network-routes.md b/docs/list-network-routes.md index 21a5b4c3..97571103 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-routes.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-network-shares.md b/docs/list-network-shares.md index 02fce23c..43f121f1 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-network-shares.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-news.md b/docs/list-news.md index f596434c..11e125e9 100644 --- a/docs/list-news.md +++ b/docs/list-news.md @@ -1,7 +1,7 @@ *list-news.ps1* ================ -This PowerShell script lists the latest news by using RSS (Really Simple Syndication) feeds. +This PowerShell script lists the latest news by using a RSS (Really Simple Syndication) feed. Parameters ---------- @@ -9,11 +9,11 @@ Parameters PS> ./list-news.ps1 [[-RSS_URL] ] [[-maxLines] ] [[-speed] ] [] -RSS_URL - Specifies the URL to the RSS feed (Yahoo News by default) + Specifies the URL to the RSS feed (Yahoo World News by default) Required? false Position? 1 - Default value https://yahoo.com/news/rss/world + Default value https://news.yahoo.com/rss/world Accept pipeline input? false Accept wildcard characters? false @@ -62,11 +62,11 @@ Script Content ```powershell <# .SYNOPSIS - List the latest news + Lists the latest news .DESCRIPTION - This PowerShell script lists the latest news by using RSS (Really Simple Syndication) feeds. + This PowerShell script lists the latest news by using a RSS (Really Simple Syndication) feed. .PARAMETER RSS_URL - Specifies the URL to the RSS feed (Yahoo News by default) + Specifies the URL to the RSS feed (Yahoo World News by default) .PARAMETER maxLines Specifies the maximum number of lines to list (24 by default) .PARAMETER speed @@ -81,7 +81,7 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$RSS_URL = "https://yahoo.com/news/rss/world", [int]$maxLines = 24, [int]$speed = 10) +param([string]$RSS_URL = "https://news.yahoo.com/rss/world", [int]$maxLines = 24, [int]$speed = 10) try { [xml]$content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content @@ -90,8 +90,8 @@ try { & "$PSScriptRoot/write-typewriter.ps1" "❇️ $($item.title)" $speed if ($count++ -eq $maxLines) { break } } - $source = $Content.rss.channel.title - $date = $Content.rss.channel.pubDate + $source = $content.rss.channel.title + $date = $content.rss.channel.pubDate " (by $source as of $date)" exit 0 # success } catch { @@ -100,4 +100,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-news.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-news.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-nic.md b/docs/list-nic.md index edc45d45..edcb0ff6 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-nic.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-nina-warnings.md b/docs/list-nina-warnings.md new file mode 100644 index 00000000..84d0c9dd --- /dev/null +++ b/docs/list-nina-warnings.md @@ -0,0 +1,69 @@ +*list-nina-warnings.ps1* +================ + +This PowerShell script queries the current NINA warnings and prints it. + +Parameters +---------- +```powershell +PS> ./list-nina-warnings.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./list-nina-warnings.ps1 + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists the current NINA warnings +.DESCRIPTION + This PowerShell script queries the current NINA warnings and prints it. +.EXAMPLE + PS> ./list-nina-warnings.ps1 +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + Write-Progress "Loading NINA warnings..." + $warnings = (Invoke-WebRequest -URI https://warnung.bund.de/api31/dwd/mapData.json -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json + Write-Progress -completed "Done." + Write-Output "Weather Warnings by DWD" + Write-Output "-----------------------" + foreach($warning in $warnings) { + $startDate = $warning.startDate + $expiresDate = $warning.expiresDate + $severity = $warning.severity + $urgency = $warning.urgency + $type = $warning.type + $message = $warning.i18nTitle.en + Write-Output "* $type from $startDate to $($expiresDate): $message ($severity, $urgency)" + } + 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-nina-warnings.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-os-releases.md b/docs/list-os-releases.md index 85a64e30..348dbdc8 100644 --- a/docs/list-os-releases.md +++ b/docs/list-os-releases.md @@ -48,7 +48,7 @@ try { write-progress "Reading OS_IPFS_hashes.csv ..." $PathToRepo = "$PSScriptRoot/.." - $PathToCsvFile = "$PathToRepo/Data/os-release.csv" + $PathToCsvFile = "$PathToRepo/data/os-release.csv" invoke-webRequest -URI "https://fleschutz.droppages.com/downloads/OS_IPFS_hashes.csv" -outFile "$PathToCsvFile" $Table = import-csv "$PathToCsvFile" @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-os-releases.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os-releases.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-os-updates.md b/docs/list-os-updates.md index bbecaf3e..d06470e6 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os-updates.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-os.md b/docs/list-os.md index d91d0021..aabc7882 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-os.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-outlook-inbox.md b/docs/list-outlook-inbox.md index d167b584..0bb1f94e 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-inbox.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-outlook-sent.md b/docs/list-outlook-sent.md index ebe4d8cc..a25f766e 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-outlook-sent.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-passwords.md b/docs/list-passwords.md index a6908c9b..030f96d3 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-passwords.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-pi.md b/docs/list-pi.md index 174ebbf5..12979008 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pi.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-pins.md b/docs/list-pins.md index 8c04e15a..d1938e1c 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pins.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-power-schemes.md b/docs/list-power-schemes.md index eeaf18c5..46c3f879 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-power-schemes.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-print-jobs.md b/docs/list-print-jobs.md index 959cc030..fe803a4e 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-print-jobs.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-printers.md b/docs/list-printers.md index 53841817..875af4b0 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-printers.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-processes.md b/docs/list-processes.md index af098d5e..2f318677 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 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-processes.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-profiles.md b/docs/list-profiles.md index a6c5e863..1298bc68 100644 --- a/docs/list-profiles.md +++ b/docs/list-profiles.md @@ -58,4 +58,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-profiles.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-profiles.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-public-ip.md b/docs/list-public-ip.md index d4c5040c..e1c94cc4 100644 --- a/docs/list-public-ip.md +++ b/docs/list-public-ip.md @@ -1,7 +1,7 @@ *list-public-ip.ps1* ================ -This PowerShell script queries the public IP address(es) and prints it. +This PowerShell script queries the public IP address information and prints it. Parameters ---------- @@ -17,7 +17,7 @@ Example ------- ```powershell PS> ./list-public-ip.ps1 -✅ Public IP address 185.72.209.161, 2003:f2:6128:fc01:e503:601:30c2:a028 near Munich +✅ Public IP address 185.72.229.161, 2003:f2:6128:fc01:e543:601:30c2:a028 near Munich, Germany ``` @@ -34,12 +34,12 @@ Script Content ```powershell <# .SYNOPSIS - Lists the public IP address(es) + Lists the public IP address information .DESCRIPTION - This PowerShell script queries the public IP address(es) and prints it. + This PowerShell script queries the public IP address information and prints it. .EXAMPLE PS> ./list-public-ip.ps1 - ✅ Public IP address 185.72.209.161, 2003:f2:6128:fc01:e503:601:30c2:a028 near Munich + ✅ Public IP address 185.72.229.161, 2003:f2:6128:fc01:e543:601:30c2:a028 near Munich, Germany .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -48,18 +48,21 @@ Script Content try { if ($IsLinux) { - $publicIPv4 = (curl -4 --silent ifconfig.co) - $publicIPv6 = (curl -6 --silent ifconfig.co) - $city = (curl --silent ifconfig.co/city) + [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 { - $publicIPv4 = (curl.exe -4 --silent ifconfig.co) - $publicIPv6 = (curl.exe -6 --silent ifconfig.co) - $city = (curl.exe --silent ifconfig.co/city) + [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" } - Write-Output "✅ Public IP address $publicIPv4, $publicIPv6 near $City" + if ("$city" -eq "") { $city = "unknown city" } + if ("$country" -eq "") { $country = "unknown country" } + Write-Output "✅ Public IP address $publicIPv4, $publicIPv6 near $city, $country" ; if ($country -eq "Russia") { Write-Host -foregroundColor red "DON'T TRUST PUTIN !!! FLEE NOW OR DIE AS SOLDIER IN UKRAINE !!!" } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -67,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-public-ip.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-public-ip.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-pull-requests.md b/docs/list-pull-requests.md index 6ef20565..f300348e 100644 --- a/docs/list-pull-requests.md +++ b/docs/list-pull-requests.md @@ -58,25 +58,24 @@ Script Content param([string]$RepoDir = "$PWD") try { - Write-Progress "⏳ (1/3) Searching for Git executable... " + Write-Progress "(1/3) Searching for Git executable... " $null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Progress "⏳ (2/3) Checking local repository..." + Write-Progress "(2/3) Checking local repository..." if (!(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder: $RepoDir" } $RepoDirName = (Get-Item "$RepoDir").Name - Write-Progress "⏳ (3/3) Fetching latest updates..." + Write-Progress "(3/3) Fetching latest updates..." & git -C "$RepoDir" fetch --all --force --quiet if ($lastExitCode -ne "0") { throw "'git fetch --all' failed with exit code $lastExitCode" } - Write-Progress -completed " " + Write-Progress -completed "Done." " " "Commit ID Reference" "--------- ---------" & git -C "$RepoDir" ls-remote origin 'pull/*/head' if ($lastExitCode -ne "0") { throw "'git ls-remote' failed with exit code $lastExitCode" } - Write-Progress -completed " " exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -84,4 +83,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-pull-requests.ps1 as of 10/19/2023 08:11:39)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-pull-requests.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-ram.md b/docs/list-ram.md index e8a8418d..e5a0cf18 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-ram.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-read-only-files.md b/docs/list-read-only-files.md new file mode 100644 index 00000000..7e16209f --- /dev/null +++ b/docs/list-read-only-files.md @@ -0,0 +1,84 @@ +*list-read-only-files.ps1* +================ + +This PowerShell script scans a directory tree and lists all read-only files. + +Parameters +---------- +```powershell +PS> ./list-read-only-files.ps1 [[-path] ] [] + +-path + Specifies the path to the directory tree (current working dir 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> ./list-read-only-files.ps1 C:\Windows +... +✔️ Found 107 read-only files within 📂C:\Windows in 50 sec + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists all read-only files in a directory tree +.DESCRIPTION + This PowerShell script scans a directory tree and lists all read-only files. +.PARAMETER path + Specifies the path to the directory tree (current working dir by default) +.EXAMPLE + PS> ./list-read-only-files.ps1 C:\Windows + ... + ✔️ Found 107 read-only files within 📂C:\Windows in 50 sec +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$path = "$PWD") + +try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for read-only files..." + [int]$count = 0 + Get-ChildItem "$path" -attributes ReadOnly -recurse | Foreach-Object { + "📄$($_.FullName)" + $count++ + } + Write-Progress -completed " " + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count read-only files within 📂$path 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 list-read-only-files.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-recycle-bin.md b/docs/list-recycle-bin.md index 611bf0e1..e9fa9daf 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-recycle-bin.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-repos.md b/docs/list-repos.md index 792bd26b..42fdb447 100644 --- a/docs/list-repos.md +++ b/docs/list-repos.md @@ -29,8 +29,8 @@ PS> ./list-repos C:\MyRepos -Repository Latest Tag Branch Status Remote ----------- ---------- ------ ------ ------ +Local Repo Latest Tag Branch Status Remote URL +---------- ---------- ------ ------ ---------- 📂cmake v3.23.0 main ✔️clean git@github.com:Kitware/CMake ↓0 ... @@ -57,8 +57,8 @@ Script Content .EXAMPLE PS> ./list-repos C:\MyRepos - Repository Latest Tag Branch Status Remote - ---------- ---------- ------ ------ ------ + Local Repo Latest Tag Branch Status Remote URL + ---------- ---------- ------ ------ ---------- 📂cmake v3.23.0 main ✔️clean git@github.com:Kitware/CMake ↓0 ... .LINK @@ -72,7 +72,7 @@ param([string]$ParentDir = "$PWD") function ListRepos { $Folders = (Get-ChildItem "$ParentDir" -attributes Directory) foreach($Folder in $Folders) { - $Repository = (Get-Item "$Folder").Name + $FolderName = (Get-Item "$Folder").Name $LatestTagCommitID = (git -C "$Folder" rev-list --tags --max-count=1) if ($LatestTagCommitID -ne "") { $LatestTag = (git -C "$Folder" describe --tags $LatestTagCommitID) @@ -85,7 +85,7 @@ function ListRepos { $Status = (git -C "$Folder" status --short) if ("$Status" -eq "") { $Status = "✔️clean" } elseif ("$Status" -like " M *") { $Status = "⚠️modified" } - New-Object PSObject -property @{'Repository'="📂$Repository";'Latest Tag'="$LatestTag";'Branch'="$Branch";'Status'="$Status";'Remote'="$RemoteURL ↓$NumCommits";} + New-Object PSObject -property @{'Local Repo'="📂$FolderName";'Latest Tag'="$LatestTag";'Branch'="$Branch";'Status'="$Status";'Remote URL'="$RemoteURL ↓$NumCommits";} } } @@ -95,7 +95,7 @@ try { $Null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - ListRepos | Format-Table -property @{e='Repository';width=20},@{e='Latest Tag';width=18},@{e='Branch';width=20},@{e='Status';width=10},Remote + ListRepos | Format-Table -property @{e='Local Repo';width=19},@{e='Latest Tag';width=18},@{e='Branch';width=20},@{e='Status';width=10},'Remote URL' exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -103,4 +103,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-repos.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-repos.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-scripts.md b/docs/list-scripts.md index ce8cb87d..743b7a6c 100644 --- a/docs/list-scripts.md +++ b/docs/list-scripts.md @@ -40,8 +40,8 @@ Script Content param([string]$category = "*") function ListScripts([string]$category) { - Write-Progress "Loading data from ../Data/script.csv..." - $table = Import-CSV "$PSScriptRoot/../Data/scripts.csv" + Write-Progress "Loading data from ../data/script.csv..." + $table = Import-CSV "$PSScriptRoot/../data/scripts.csv" [int]$No = 1 foreach($row in $table) { if ($row.CATEGORY -like $category) { @@ -70,4 +70,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-scripts.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-scripts.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-services.md b/docs/list-services.md index dd721181..08bf05b9 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-services.ps1 as of 12/07/2023 20:24:19)* diff --git a/docs/list-special-folders.md b/docs/list-special-folders.md index b5bb7aa0..bb58ede3 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-special-folders.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-sql-tables.md b/docs/list-sql-tables.md index 5faefe64..f03afea2 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-sql-tables.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-submodules.md b/docs/list-submodules.md index 045ab8be..84a297e5 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-submodules.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-suggestions.md b/docs/list-suggestions.md index db31303a..f0391205 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-suggestions.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-system-files.md b/docs/list-system-files.md new file mode 100644 index 00000000..b3d4ac27 --- /dev/null +++ b/docs/list-system-files.md @@ -0,0 +1,84 @@ +*list-system-files.ps1* +================ + +This PowerShell script scans a directory tree and lists all system files. + +Parameters +---------- +```powershell +PS> ./list-system-files.ps1 [[-path] ] [] + +-path + Specifies the path to the directory tree (default is current working dir) + + 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> ./list-system-files.ps1 C:\Windows +... +✔️ Found 764 system files within 📂C:\windows in 50 sec + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Lists all system files in a directory tree +.DESCRIPTION + This PowerShell script scans a directory tree and lists all system files. +.PARAMETER path + Specifies the path to the directory tree (default is current working dir) +.EXAMPLE + PS> ./list-system-files.ps1 C:\Windows + ... + ✔️ Found 764 system files within 📂C:\windows in 50 sec +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$path = "$PWD") + +try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for system files..." + [int]$count = 0 + Get-ChildItem "$path" -attributes System -recurse | Foreach-Object { + "📄$($_.FullName)" + $count++ + } + Write-Progress -completed " " + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count system files within 📂$path 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 list-system-files.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-system-info.md b/docs/list-system-info.md index 0d689370..11458865 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-system-info.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-tags.md b/docs/list-tags.md index 68dc488b..aa345128 100644 --- a/docs/list-tags.md +++ b/docs/list-tags.md @@ -81,18 +81,18 @@ Script Content param([string]$RepoDir = "$PWD", [string]$SearchPattern="*") try { - Write-Progress "⏳ (1/4) Searching for Git executable... " + Write-Progress "(1/4) Searching for Git executable... " $Null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Progress "⏳ (2/4) Checking local repository... " + Write-Progress "(2/4) Checking local repository... " if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" } - Write-Progress "⏳ (3/4) Fetching newer tags from remote..." + Write-Progress "(3/4) Fetching newer tags from remote..." & git -C "$RepoDir" fetch --all --tags if ($lastExitCode -ne "0") { throw "'git fetch --all --tags' failed" } - Write-Progress "⏳ (4/4) Removing obsolete local tags..." + Write-Progress "(4/4) Removing obsolete local tags..." & git -C "$RepoDir" fetch --prune --prune-tags if ($lastExitCode -ne "0") { throw "'git fetch --prune --prune-tags' failed" } @@ -109,4 +109,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tags.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tags.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-tasks.md b/docs/list-tasks.md index b5ce4523..7a472a5a 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tasks.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-timezone.md b/docs/list-timezone.md index 7ad2201c..bc3be217 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-timezone.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-timezones.md b/docs/list-timezones.md index 222aa925..38fc1ca8 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-timezones.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-tiobe-index.md b/docs/list-tiobe-index.md index 50ff67dd..ce475616 100644 --- a/docs/list-tiobe-index.md +++ b/docs/list-tiobe-index.md @@ -64,7 +64,7 @@ try { " Source: https://www.tiobe.com" "" - $Table = import-csv "$PSScriptRoot/../Data/TIOBE-index.csv" + $Table = import-csv "$PSScriptRoot/../data/TIOBE-index.csv" foreach($Row in $Table) { [string]$Name = $Row.Language [float]$Value = $Row.Popularity @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-tiobe-index.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-tiobe-index.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-unused-files.md b/docs/list-unused-files.md index 9885b51f..66461361 100644 --- a/docs/list-unused-files.md +++ b/docs/list-unused-files.md @@ -1,24 +1,24 @@ *list-unused-files.ps1* ================ -This PowerShell script scans and lists files in a folder with last access time older than number of days. +This PowerShell script scans a directory tree and lists unused files (no read/write access since a number of days). Parameters ---------- ```powershell -PS> ./list-unused-files.ps1 [[-DirTree] ] [[-Days] ] [] +PS> ./list-unused-files.ps1 [[-path] ] [[-days] ] [] --DirTree - Specifies the path to the directory tree +-path + Specifies the path to the directory tree (current working dir by default) Required? false Position? 1 - Default value + Default value "$PWD" Accept pipeline input? false Accept wildcard characters? false --Days - Specifies the number of days +-days + Specifies the number of days (100 by default) Required? false Position? 2 @@ -34,7 +34,9 @@ PS> ./list-unused-files.ps1 [[-DirTree] ] [[-Days] ] [ ./list-unused-files.ps1 C:\ 100 +PS> ./list-unused-files.ps1 C:\Windows +... +✔️ Found 43729 unused files (no access for 100 days) within 📂C:\Windows in 113 sec ``` @@ -53,28 +55,39 @@ Script Content .SYNOPSIS Lists unused files in a directory tree .DESCRIPTION - This PowerShell script scans and lists files in a folder with last access time older than number of days. -.PARAMETER DirTree - Specifies the path to the directory tree -.PARAMETER Days - Specifies the number of days + This PowerShell script scans a directory tree and lists unused files (no read/write access since a number of days). +.PARAMETER path + Specifies the path to the directory tree (current working dir by default) +.PARAMETER days + Specifies the number of days (100 by default) .EXAMPLE - PS> ./list-unused-files.ps1 C:\ 100 + PS> ./list-unused-files.ps1 C:\Windows + ... + ✔️ Found 43729 unused files (no access for 100 days) within 📂C:\Windows in 113 sec .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$DirTree = "", [int]$Days = 100) - -write-host "Listing files in $DirTree with last access time older than $Days days" +param([string]$path = "$PWD", [int]$days = 100) try { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $path = Resolve-Path "$path" + Write-Progress "Scanning $path for unused files..." + $cutOffDate = (Get-Date).AddDays(-$Days) + [int]$count = 0 + Get-ChildItem -path $path -recurse | Where-Object {$_.LastAccessTime -le $cutOffDate} | Foreach-Object { + "📄$($_.FullName)" + $count++ + } - Get-ChildItem -path $DirTree -recurse | Where-Object {$_.LastAccessTime -le $cutOffDate} | select fullname - + Write-Progress -completed " " + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Found $count unused files (no access for $days days) within 📂$path in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -82,4 +95,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-unused-files.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-unused-files.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-updates.md b/docs/list-updates.md index f1d0de1a..6f918c36 100644 --- a/docs/list-updates.md +++ b/docs/list-updates.md @@ -65,11 +65,13 @@ try { & sudo apt list --upgradable "⏳ (2/2) Querying Snap updates..." & sudo snap refresh --list + } elseif ($IsMacOS) { + throw "Sorry, MacOS not supported yet" } else { - Write-Progress "⏳ Querying the latest updates from winget and Microsoft Store..." + Write-Progress "Querying updates from Microsoft Store and winget..." " " & winget upgrade --include-unknown - Write-Progress -completed " " + Write-Progress -completed "Done." } " (use 'install-updates.ps1' to install the listed updates)" exit 0 # success @@ -79,4 +81,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-updates.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-updates.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-user-accounts.md b/docs/list-user-accounts.md index 277968d0..cb9ff9e6 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-user-accounts.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-user-groups.md b/docs/list-user-groups.md index 838a6b0d..bd798839 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-user-groups.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-verbs.md b/docs/list-verbs.md index 3300da2a..074c66ed 100644 --- a/docs/list-verbs.md +++ b/docs/list-verbs.md @@ -65,4 +65,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-verbs.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-verbs.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-voices.md b/docs/list-voices.md index c18288c8..0c1a657a 100644 --- a/docs/list-voices.md +++ b/docs/list-voices.md @@ -1,7 +1,7 @@ *list-voices.ps1* ================ -This PowerShell script lists the installed text-to-speech (TTS) voices. +This PowerShell script queries the installed text-to-speech (TTS) voices and prints them to the console. Parameters ---------- @@ -40,9 +40,9 @@ Script Content ```powershell <# .SYNOPSIS - Lists the installed text-to-speech voices + List installed text-to-speech voices .DESCRIPTION - This PowerShell script lists the installed text-to-speech (TTS) voices. + This PowerShell script queries the installed text-to-speech (TTS) voices and prints them to the console. .EXAMPLE PS> ./list-voices.ps1 @@ -71,4 +71,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-voices.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-voices.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-weather.md b/docs/list-weather.md index c7e39971..3e66d7ef 100644 --- a/docs/list-weather.md +++ b/docs/list-weather.md @@ -81,6 +81,7 @@ function GetDescription { param([string]$Text) "Light snow" { return "❄️ light snow" } "Light snow showers" { return "❄️ light snow showers" } "Moderate or heavy freezing rain"{return "💧 moderate or heavy freezing rain ⚠️" } + "Moderate or heavy sleet" { return "❄️ moderate or heavy sleet ⚠️" } "Moderate or heavy rain shower" { return "💧 moderate or heavy rain shower ⚠️" } "Moderate or heavy snow showers"{ return "❄️ moderate or heavy snow showers ⚠️" } "Moderate rain" { return "💧 moderate rain" } @@ -126,7 +127,7 @@ function GetWindDir { param([string]$Text) } try { - Write-Progress "⏳ Loading weather data from http://wttr.in ..." + Write-Progress "Loading weather data from http://wttr.in ..." $Weather = (Invoke-WebRequest -URI http://wttr.in/${Location}?format=j1 -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json Write-Progress -completed "." $Area = $Weather.nearest_area.areaName.value @@ -168,4 +169,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of list-weather.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-weather.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-wifi.md b/docs/list-wifi.md index 3a9d9f23..3f84a2cc 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-wifi.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-window-titles.md b/docs/list-window-titles.md index 3eaae80d..4a7f966a 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-window-titles.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-workdir.md b/docs/list-workdir.md index a8f04c7b..7ff863a4 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-workdir.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/list-wsl-distros.md b/docs/list-wsl-distros.md index e3371a30..b797a513 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of list-wsl-distros.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/locate-city.md b/docs/locate-city.md index 4657b55c..f693025e 100644 --- a/docs/locate-city.md +++ b/docs/locate-city.md @@ -61,7 +61,7 @@ try { if ($City -eq "" ) { $City = Read-Host "Enter the city name" } Write-Progress "Reading worldcities.csv..." - $Table = import-csv "$PSScriptRoot/../Data/worldcities.csv" + $Table = import-csv "$PSScriptRoot/../data/worldcities.csv" $FoundOne = 0 foreach($Row in $Table) { @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-city.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-city.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/locate-ipaddress.md b/docs/locate-ipaddress.md index e67f4568..56bf243d 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-ipaddress.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/locate-my-phone.md b/docs/locate-my-phone.md index 44517f40..b89a4aee 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-my-phone.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/locate-zip-code.md b/docs/locate-zip-code.md index 5f973c0f..bf1c55c5 100644 --- a/docs/locate-zip-code.md +++ b/docs/locate-zip-code.md @@ -75,7 +75,7 @@ try { if ($ZipCode -eq "" ) { $ZipCode = read-host "Enter the zip code" } write-progress "Reading zip-codes.csv..." - $Table = import-csv "$PSScriptRoot/../Data/zip-codes.csv" + $Table = import-csv "$PSScriptRoot/../data/zip-codes.csv" $FoundOne = 0 foreach($Row in $Table) { @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of locate-zip-code.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of locate-zip-code.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/lock-desktop.md b/docs/lock-desktop.md index 15e89be3..66cd4009 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of lock-desktop.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/log-off.md b/docs/log-off.md index 98ec5c59..3a9863ce 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of log-off.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/make-install.md b/docs/make-install.md index 7fd9ceee..a873a57a 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of make-install.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-BubbleSort.md b/docs/measure-BubbleSort.md index 3698850c..e8be4a49 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-BubbleSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-BucketSort.md b/docs/measure-BucketSort.md index f9fb0f38..15dc1562 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-BucketSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-CountingSort.md b/docs/measure-CountingSort.md index 61314b06..25e1e0af 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-CountingSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-HeapSort.md b/docs/measure-HeapSort.md index 991bc8ef..3e48c55c 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-HeapSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-InsertionSort.md b/docs/measure-InsertionSort.md index 0526d555..ce5d841f 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-InsertionSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-MergeSort.md b/docs/measure-MergeSort.md index f66a475c..ef125649 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-MergeSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-QuickSort.md b/docs/measure-QuickSort.md index d04f3e1b..e8e17bf8 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-QuickSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-SelectionSort.md b/docs/measure-SelectionSort.md index 93f17ecc..554bc48a 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-SelectionSort.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/measure-sorting-algorithms.md b/docs/measure-sorting-algorithms.md index d05bc1f8..b4560b4c 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of measure-sorting-algorithms.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/merry-christmas.md b/docs/merry-christmas.md index 923a2a7f..bcfc39ee 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of merry-christmas.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/minimize-all-windows.md b/docs/minimize-all-windows.md index c0dd42f1..659b6b18 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of minimize-all-windows.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/move-mouse-pointer.md b/docs/move-mouse-pointer.md index 32a35457..a1b7f955 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of move-mouse-pointer.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/move-vm.md b/docs/move-vm.md new file mode 100644 index 00000000..ecd0d225 --- /dev/null +++ b/docs/move-vm.md @@ -0,0 +1,25 @@ +*move-vm.ps1* +================ + +move-vm.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +$VMName = "windows" +Move-VM $VMName HOST2 -IncludeStorage -DestinationStoragePath "D:\VirtualMachines\$VMName" +exit 0 # success +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of move-vm.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/my-profile.md b/docs/my-profile.md index fd4ccf5c..3aeb3cf0 100644 --- a/docs/my-profile.md +++ b/docs/my-profile.md @@ -34,4 +34,4 @@ 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of my-profile.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-branch.md b/docs/new-branch.md index 6410a805..d2099f75 100644 --- a/docs/new-branch.md +++ b/docs/new-branch.md @@ -41,7 +41,7 @@ PS> ./new-branch.ps1 test123 C:\MyRepo ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... -✔️ Created branch 'test123' in repo 📂MyRepo (based on 'main' in 18 sec) +✔️ Created branch 'test123' in repo 📂MyRepo (based on 'main') in 18 sec ``` @@ -73,7 +73,7 @@ Script Content ⏳ (4/6) Creating new branch... ⏳ (5/6) Pushing updates... ⏳ (6/6) Updating submodules... - ✔️ Created branch 'test123' in repo 📂MyRepo (based on 'main' in 18 sec) + ✔️ Created branch 'test123' in repo 📂MyRepo (based on 'main') in 18 sec .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -115,7 +115,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 📂$repoPathName (based on '$currentBranch' in $elapsed sec)" + "✔️ Created branch '$newBranch' in repo 📂$repoPathName (based on '$currentBranch') in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -123,4 +123,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-branch.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-branch.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-email.md b/docs/new-email.md index 5cc55af6..fa49837c 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-email.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-linux-vm.md b/docs/new-linux-vm.md new file mode 100644 index 00000000..caf6907b --- /dev/null +++ b/docs/new-linux-vm.md @@ -0,0 +1,41 @@ +*new-linux-vm.ps1* +================ + +new-linux-vm.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +$VMName = "linux" + + $VM = @{ + Name = $VMName + MemoryStartupBytes = 1GB + Generation = 2 + NewVHDPath = "C:\VirtualMachines\$VMName\Virtual Hard Disks\$VMName.vhdx" + NewVHDSizeBytes = 30GB + BootDevice = "VHD" + Path = "C:\VirtualMachines\" + SwitchName = 'vSwitch' + } + + New-VM @VM + Set-VMProcessor $VMName -count 1 + Add-VMDvdDrive $VMName + Set-VMDvdDrive $VMName -Path "C:\iso\CentOS-8.3.2011-x86_64-minimal.iso" + Set-VMFirmware -EnableSecureBoot Off $VMName +exit 0 # success +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of new-linux-vm.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-qrcode.md b/docs/new-qrcode.md index 5d22d209..1200291a 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-qrcode.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-script.md b/docs/new-script.md index 47d1f045..8c2798de 100644 --- a/docs/new-script.md +++ b/docs/new-script.md @@ -1,7 +1,7 @@ *new-script.ps1* ================ -This PowerShell script creates a new PowerShell script file (by using template file ../Data/template.ps1). +This PowerShell script creates a new PowerShell script file by using the template file ../data/template.ps1. Parameters ---------- @@ -9,7 +9,7 @@ Parameters PS> ./new-script.ps1 [[-filename] ] [] -filename - Specifies the path to the resulting file + Specifies the path and filename to the new script Required? false Position? 1 @@ -26,7 +26,7 @@ Example ------- ```powershell PS> ./new-script myscript.ps1 -✔️ created new PowerShell script: myscript.ps1 +✔️ Created the new 'myscript.ps1' PowerShell script in 1 sec ``` @@ -43,14 +43,14 @@ Script Content ```powershell <# .SYNOPSIS - Creates a new PowerShell script file + Creates a new PowerShell script .DESCRIPTION - This PowerShell script creates a new PowerShell script file (by using template file ../Data/template.ps1). + This PowerShell script creates a new PowerShell script file by using the template file ../data/template.ps1. .PARAMETER filename - Specifies the path to the resulting file + Specifies the path and filename to the new script .EXAMPLE PS> ./new-script myscript.ps1 - ✔️ created new PowerShell script: myscript.ps1 + ✔️ Created the new 'myscript.ps1' PowerShell script in 1 sec .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -61,10 +61,12 @@ param([string]$filename = "") try { if ($filename -eq "" ) { $filename = Read-Host "Enter the new filename" } + $stopWatch = [system.diagnostics.stopwatch]::startNew() - Copy-Item "$PSScriptRoot/../Data/template.ps1" "$filename" + Copy-Item "$PSScriptRoot/../data/template.ps1" "$filename" - "✔️ created new PowerShell script: $filename" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Created the new '$filename' PowerShell script in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -72,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-script.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-script.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-shortcut.md b/docs/new-shortcut.md index 15c47649..01219037 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-shortcut.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-symlink.md b/docs/new-symlink.md index 297975d9..d98aa0f4 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-symlink.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-tag.md b/docs/new-tag.md index 80b5e22d..9bbabfeb 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-tag.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-user.md b/docs/new-user.md index 98727d36..7e454f74 100644 --- a/docs/new-user.md +++ b/docs/new-user.md @@ -1,14 +1,14 @@ *new-user.ps1* ================ -This PowerShell script creates a new user account. +This PowerShell script creates a new user account with an encrypted home directory. Parameters ---------- ```powershell -PS> ./new-user.ps1 [[-Username] ] [] +PS> ./new-user.ps1 [[-username] ] [] --Username +-username Required? false Position? 1 @@ -24,7 +24,8 @@ PS> ./new-user.ps1 [[-Username] ] [] Example ------- ```powershell -PS> ./new-user.ps1 +PS> ./new-user.ps1 Joe +✔️ Created new user 'Joe' with encrypted home directory in 11 sec ``` @@ -43,29 +44,30 @@ Script Content .SYNOPSIS Creates a new user account .DESCRIPTION - This PowerShell script creates a new user account. + This PowerShell script creates a new user account with an encrypted home directory. .EXAMPLE - PS> ./new-user.ps1 + PS> ./new-user.ps1 Joe + ✔️ Created new user 'Joe' with encrypted home directory in 11 sec .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$Username = "") +param([string]$username = "") try { - if ($Username -eq "") { $Username = Read-Host "Enter new user name" } - $StopWatch = [system.diagnostics.stopwatch]::startNew() + if ($username -eq "") { $username = Read-Host "Enter the new user name" } + $stopWatch = [system.diagnostics.stopwatch]::startNew() if ($IsLinux) { - & sudo adduser --encrypt-home $Username + & sudo adduser --encrypt-home $username } else { throw "Not supported yet" } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "✔️ created new user '$Username' with encrypted home directory in $Elapsed sec" + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Created new user '$username' with encrypted home directory in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -73,4 +75,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-user.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-user.ps1 as of 12/07/2023 20:24:20)* diff --git a/docs/new-windows-vm.md b/docs/new-windows-vm.md new file mode 100644 index 00000000..348145e6 --- /dev/null +++ b/docs/new-windows-vm.md @@ -0,0 +1,40 @@ +*new-windows-vm.ps1* +================ + +new-windows-vm.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +$VMName = "windows" + + $VM = @{ + Name = $VMName + MemoryStartupBytes = 4GB + Generation = 2 + NewVHDPath = "C:\VirtualMachines\$VMName\Virtual Hard Disks\$VMName.vhdx" + NewVHDSizeBytes = 50GB + BootDevice = "VHD" + Path = "C:\VirtualMachines\" + SwitchName = 'vSwitch' + } + + New-VM @VM + Set-VMProcessor $VMName -count 1 + Add-VMDvdDrive $VMName + Set-VMDvdDrive $VMName -Path "C:\iso\Win10_21H1_English_x64.iso" +exit 0 # success +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of new-windows-vm.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/new-zipfile.md b/docs/new-zipfile.md index c88913bf..7d6b40d0 100644 --- a/docs/new-zipfile.md +++ b/docs/new-zipfile.md @@ -73,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of new-zipfile.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of new-zipfile.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/on-desktop-login.md b/docs/on-desktop-login.md index 052afd0e..00eb93f5 100644 --- a/docs/on-desktop-login.md +++ b/docs/on-desktop-login.md @@ -1,7 +1,7 @@ *on-desktop-login.ps1* ================ -This PowerShell script executes useful tasks on every desktop login by the user (e.g. open Web dashboards, list the news, fetch repos). +This PowerShell script executes some 'welcome' tasks on desktop login by the user. NOTE: For installation on Windows create and put a symbolic link to this script into the Autostart folder (usually at: C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup). Parameters @@ -36,7 +36,7 @@ Script Content .SYNOPSIS Executes tasks on desktop login .DESCRIPTION - This PowerShell script executes useful tasks on every desktop login by the user (e.g. open Web dashboards, list the news, fetch repos). + This PowerShell script executes some 'welcome' tasks on desktop login by the user. NOTE: For installation on Windows create and put a symbolic link to this script into the Autostart folder (usually at: C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup). .EXAMPLE PS> ./on-desktop-login.ps1 @@ -49,6 +49,11 @@ Script Content try { & "$PSScriptRoot/write-big.ps1" "Welcome back" " " + & "$PSScriptRoot/check-uptime.ps1" + & "$PSScriptRoot/check-firewall.ps1" + & "$PSScriptRoot/check-swap-space.ps1" + & "$PSScriptRoot/check-drives.ps1" + & "$PSScriptRoot/check-pending-reboot.ps1" & "$PSScriptRoot/open-dashboards.ps1" " " & "$PSScriptRoot/write-quote.ps1" @@ -68,4 +73,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of on-desktop-login.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of on-desktop-login.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-apps-folder.md b/docs/open-apps-folder.md index 93a2346c..14bfecad 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-apps-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-auto-start-folder.md b/docs/open-auto-start-folder.md index 6e1870d3..04ef48a9 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-auto-start-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-bing-maps.md b/docs/open-bing-maps.md index 1421fbcc..825b275d 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-bing-maps.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-booking-com.md b/docs/open-booking-com.md index 7ae97b0f..334c14f5 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-booking-com.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-c-drive.md b/docs/open-c-drive.md index 0aa179e8..7385d561 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-c-drive.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-calculator.md b/docs/open-calculator.md index 4324f37f..6acfc7a3 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-calculator.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-chrome.md b/docs/open-chrome.md index 47928d84..ab1ae267 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-chrome.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-clock.md b/docs/open-clock.md index 5aea3ec1..059cbb11 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-clock.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-cortana.md b/docs/open-cortana.md index fd1b71b6..a7075d53 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-cortana.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-d-drive.md b/docs/open-d-drive.md index 679541dd..8cd335f3 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 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-d-drive.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-dashboards.md b/docs/open-dashboards.md index fe984182..b51baa51 100644 --- a/docs/open-dashboards.md +++ b/docs/open-dashboards.md @@ -49,10 +49,10 @@ Script Content #> try { - Write-Progress "⏳ Reading Data/popular-dashboards.csv..." - $table = Import-CSV "$PSScriptRoot/../Data/popular-dashboards.csv" + Write-Progress "Reading Data/popular-dashboards.csv..." + $table = Import-CSV "$PSScriptRoot/../data/popular-dashboards.csv" $numRows = $table.Length - Write-Progress -completed "." + Write-Progress -completed " " Write-Host "✅ Launching Web browser with 20 tabs showing: " -noNewline foreach($row in $table) { Write-Host "$($row.NAME), " -noNewline @@ -67,4 +67,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-dashboards.ps1 as of 10/19/2023 08:11:40)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-dashboards.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-deep-l-translator.md b/docs/open-deep-l-translator.md index a022c9b7..a4a8d136 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-deep-l-translator.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-default-browser.md b/docs/open-default-browser.md index 64ac7c24..93a8b006 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-default-browser.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-desktop-folder.md b/docs/open-desktop-folder.md index a1fc75b4..f2170b9d 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-desktop-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-documents-folder.md b/docs/open-documents-folder.md index 3e7943ce..0fe80c99 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-documents-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-downloads-folder.md b/docs/open-downloads-folder.md index 4b42023c..10ded9ce 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-downloads-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-dropbox-folder.md b/docs/open-dropbox-folder.md index 52f743c5..21a688bf 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-dropbox-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-duck-duck-go.md b/docs/open-duck-duck-go.md index 41fd8eba..ff4ea98e 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-duck-duck-go.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-e-drive.md b/docs/open-e-drive.md index 4620e6d3..789e31c6 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-e-drive.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-edge.md b/docs/open-edge.md index 4f84e1a4..258bb777 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-edge.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-egg-timer.md b/docs/open-egg-timer.md index bdafdca2..aa4619fb 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-egg-timer.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-email-client.md b/docs/open-email-client.md index e5020dc6..80a070a4 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-email-client.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-f-drive.md b/docs/open-f-drive.md index 9c857066..6c6ce7dc 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-f-drive.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-file-explorer.md b/docs/open-file-explorer.md index 2e25c1ec..5725064c 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-file-explorer.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-fire-place.md b/docs/open-fire-place.md index c16640be..bae60e6c 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-fire-place.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-firefox.md b/docs/open-firefox.md index af4ba427..80fdf7f3 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-firefox.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-flight-radar.md b/docs/open-flight-radar.md index 35afd7f9..e08e80e0 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-flight-radar.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-g-drive.md b/docs/open-g-drive.md index 421c3d9e..c25df779 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-g-drive.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-git-extensions.md b/docs/open-git-extensions.md index 22b3bb00..8c35ae90 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-git-extensions.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-books.md b/docs/open-google-books.md index 54e10d90..27c8e172 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-books.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-calendar.md b/docs/open-google-calendar.md index eba34eec..8137d950 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-calendar.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-contacts.md b/docs/open-google-contacts.md index a84615d0..643f8edc 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-contacts.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-docs.md b/docs/open-google-docs.md index d4ced27b..db02567e 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-docs.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-earth.md b/docs/open-google-earth.md index 3ee08bc8..8530e02f 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-earth.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-mail.md b/docs/open-google-mail.md index 48e13e86..9a5fc336 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-mail.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-maps.md b/docs/open-google-maps.md index f88497c6..73816836 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-maps.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-news.md b/docs/open-google-news.md index 77536d2e..a096fba2 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-news.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-photos.md b/docs/open-google-photos.md index dbe8d717..4a8d019a 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-photos.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-play.md b/docs/open-google-play.md index c71f34f7..56fd2870 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-play.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-search.md b/docs/open-google-search.md index 8fe23f99..3d0de4f6 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-search.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-stadia.md b/docs/open-google-stadia.md index 9379bde4..8fbecfe7 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-stadia.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-google-translate.md b/docs/open-google-translate.md index 78f34077..fe8f9267 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-google-translate.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-home-folder.md b/docs/open-home-folder.md index 0c7104f3..61495aa7 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-home-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-internet-archive.md b/docs/open-internet-archive.md index 29d17c8b..5d295204 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-internet-archive.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-jitsi-meet.md b/docs/open-jitsi-meet.md index 567f0229..df84e9b9 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-jitsi-meet.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-m-drive.md b/docs/open-m-drive.md index 94083e0e..1e1a7440 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-m-drive.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-magnifier.md b/docs/open-magnifier.md index b65736d9..ce93a448 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-magnifier.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-microsoft-paint.md b/docs/open-microsoft-paint.md index b500c2b8..3fed6c4c 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-paint.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-microsoft-solitaire.md b/docs/open-microsoft-solitaire.md index 1f6b42ec..7fbbf3b3 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-solitaire.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-microsoft-store.md b/docs/open-microsoft-store.md index 2db9217c..8e166adc 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-store.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-microsoft-teams.md b/docs/open-microsoft-teams.md index 217144a9..b5a96387 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-microsoft-teams.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-music-folder.md b/docs/open-music-folder.md index c40979d1..8cb2d0f1 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-music-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-netflix.md b/docs/open-netflix.md index c17763e1..365a876b 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-netflix.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-note-pad.md b/docs/open-note-pad.md index 25cae843..d5851021 100644 --- a/docs/open-note-pad.md +++ b/docs/open-note-pad.md @@ -53,4 +53,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of open-note-pad.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-note-pad.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-obs-studio.md b/docs/open-obs-studio.md index f096f8ef..a8b168e0 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-obs-studio.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-office-365.md b/docs/open-office-365.md index e9d64d37..f2bd58c6 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-office-365.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-one-drive-folder.md b/docs/open-one-drive-folder.md index 7adba954..8cf2dd48 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-one-drive-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-outlook.md b/docs/open-outlook.md index bae217ee..13662f20 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-outlook.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-paint-three-d.md b/docs/open-paint-three-d.md index aa1faadc..6ad5aace 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-paint-three-d.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-pictures-folder.md b/docs/open-pictures-folder.md index 7d61281e..851968b0 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-pictures-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-rdp.md b/docs/open-rdp.md index e200721c..e9eff12f 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-rdp.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-recycle-bin-folder.md b/docs/open-recycle-bin-folder.md index 6c7e5d96..768e6d4b 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-recycle-bin-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-remote-desktop.md b/docs/open-remote-desktop.md index 1c8b5928..dbb9ee0a 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-remote-desktop.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-repos-folder.md b/docs/open-repos-folder.md index 020768a9..663b220b 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-repos-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-screen-clip.md b/docs/open-screen-clip.md index 937baca6..cb65eb10 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-clip.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-screen-sketch.md b/docs/open-screen-sketch.md index 700a7165..9270d55c 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-screen-sketch.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-skype.md b/docs/open-skype.md index 0b977a50..40af727c 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-skype.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-snipping-tool.md b/docs/open-snipping-tool.md index f2a8fcb9..20488247 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-snipping-tool.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-speed-test.md b/docs/open-speed-test.md index 60932fae..3176638f 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-speed-test.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-spotify.md b/docs/open-spotify.md index 7c1c56ac..0e55b53f 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-spotify.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-stack-overflow.md b/docs/open-stack-overflow.md index aebceb9d..f603caa1 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-stack-overflow.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-start-page.md b/docs/open-start-page.md index 72a8b358..105944c3 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-start-page.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-street-map.md b/docs/open-street-map.md index 3389d7c8..a729e287 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-street-map.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-task-manager.md b/docs/open-task-manager.md index 757015be..a5242ba3 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-task-manager.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-temporary-folder.md b/docs/open-temporary-folder.md index 351931b8..f7c77abb 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-temporary-folder.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-three-d-viewer.md b/docs/open-three-d-viewer.md index 35776d4e..f1003e5e 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-three-d-viewer.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-thunderbird.md b/docs/open-thunderbird.md index b11eb0f7..b2f48952 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-thunderbird.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-videos-folders.md b/docs/open-videos-folders.md index 36ef0e0f..07eb210f 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-videos-folders.ps1 as of 12/07/2023 20:24:21)* diff --git a/docs/open-visual-studio.md b/docs/open-visual-studio.md index ea1f528f..e27c284b 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-visual-studio.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/open-vpn-settings.md b/docs/open-vpn-settings.md index d0d5cee5..bcc476bd 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-vpn-settings.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/open-windows-defender.md b/docs/open-windows-defender.md index 8021e402..a09b1239 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-defender.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/open-windows-terminal.md b/docs/open-windows-terminal.md index d4347b4a..7e8c93bd 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-windows-terminal.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/open-xing.md b/docs/open-xing.md index e1e5b366..f60a72c8 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of open-xing.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/pick-commit.md b/docs/pick-commit.md index 10f6bcb7..20777c79 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of pick-commit.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/ping-hosts.md b/docs/ping-hosts.md new file mode 100644 index 00000000..cac6af42 --- /dev/null +++ b/docs/ping-hosts.md @@ -0,0 +1,89 @@ +*ping-hosts.ps1* +================ + +This PowerShell script pings well-known hostnames in the local network and lists which one up. + +Parameters +---------- +```powershell +PS> ./ping-hosts.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Example +------- +```powershell +PS> ./check-hosts.ps1 +✅ Up are: Hippo Jenkins01 Jenkins02 Rocket Vega + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Pings local hosts +.DESCRIPTION + This PowerShell script pings well-known hostnames in the local network and lists which one up. +.EXAMPLE + PS> ./check-hosts.ps1 + ✅ Up are: Hippo Jenkins01 Jenkins02 Rocket Vega +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +try { + [string]$hosts = "Amnesiac,ArchLinux,Berlin,Boston,Brother,Canon,Castor,Cisco,EchoDot,Epson,Fedora,Fireball,Firewall,fritz.box,GasSensor,Gateway,Hippo,HomeManager,Io,iPhone,Jarvis,Jenkins01,Jenkins02,LA,Laptop,Jupiter,Mars,Mercury,Miami,Mobile,NY,OctoPi,Paris,Pixel-6a,Pluto,Printer,Proxy,R2D2,Raspberry,Rocket,Rome,Router,Server,Shelly1,SmartPhone,SmartWatch,Soundbar,Sunnyboy,Surface,Switch,Tablet,Tolino,TV,Ubuntu,Vega,Venus,XRX,Zeus" # sorted alphabetically + [int]$timeout = 600 # milliseconds + $hostsArray = $hosts.Split(",") + $count = $hostsArray.Count + + Write-Progress "Sending pings to $count local hosts..." + $queue = [System.Collections.Queue]::new() + foreach($hostname in $hostsArray) { + $ping = [System.Net.Networkinformation.Ping]::new() + $object = @{ Host = $hostname; Ping = $ping; Async = $ping.SendPingAsync($hostname, $timeout) } + $queue.Enqueue($object) + } + + [string]$result = "" + while ($queue.Count -gt 0) { + $object = $queue.Dequeue() + try { + if ($object.Async.Wait($timeout) -eq $true) { + if ($object.Async.Result.Status -ne "TimedOut") { + $result += "$($object.Host) " + } + continue + } + } catch { + if ($object.Async.IsCompleted -eq $true) { + continue + } + } + $queue.Enqueue($object) + } + Write-Progress -completed "Done." + Write-Host "✅ Up are: $result" + exit 0 # success +} catch { + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 +} +``` + +*(generated by convert-ps2md.ps1 using the comment-based help of ping-hosts.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/ping-weather.md b/docs/ping-weather.md index f31cf18c..c5ac09eb 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of ping-weather.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-bee-sound.md b/docs/play-bee-sound.md index 522ec612..913124a7 100644 --- a/docs/play-bee-sound.md +++ b/docs/play-bee-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/bee.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/bee.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-bee-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-bee-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-beep-sound.md b/docs/play-beep-sound.md index 449198c8..e7a18899 100644 --- a/docs/play-beep-sound.md +++ b/docs/play-beep-sound.md @@ -49,4 +49,4 @@ Start-Sleep -milliseconds 300 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-beep-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-beep-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-cat-sound.md b/docs/play-cat-sound.md index bbc13f41..b769db3c 100644 --- a/docs/play-cat-sound.md +++ b/docs/play-cat-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/cat.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/cat.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-cat-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-cat-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-cow-sound.md b/docs/play-cow-sound.md index b5e2804a..e804235b 100644 --- a/docs/play-cow-sound.md +++ b/docs/play-cow-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/cow.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/cow.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-cow-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-cow-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-dog-sound.md b/docs/play-dog-sound.md index 2c783762..e1c40e5b 100644 --- a/docs/play-dog-sound.md +++ b/docs/play-dog-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/dog.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/dog.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-dog-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-dog-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-donkey-sound.md b/docs/play-donkey-sound.md index 3e14e978..d890d8a1 100644 --- a/docs/play-donkey-sound.md +++ b/docs/play-donkey-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/donkey.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/donkey.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-donkey-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-donkey-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-elephant-sound.md b/docs/play-elephant-sound.md index 4170fccb..8879d920 100644 --- a/docs/play-elephant-sound.md +++ b/docs/play-elephant-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/elephant.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/elephant.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-elephant-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-elephant-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-elk-sound.md b/docs/play-elk-sound.md index 862b8ee2..1ae087b4 100644 --- a/docs/play-elk-sound.md +++ b/docs/play-elk-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/elk.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/elk.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-elk-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-elk-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-files.md b/docs/play-files.md index 6e80b77f..04b26f3f 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-files.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-frog-sound.md b/docs/play-frog-sound.md index 004b4203..1709f92d 100644 --- a/docs/play-frog-sound.md +++ b/docs/play-frog-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/frog.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/frog.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-frog-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-frog-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-goat-sound.md b/docs/play-goat-sound.md index 471f7adb..2b086d3b 100644 --- a/docs/play-goat-sound.md +++ b/docs/play-goat-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/goat.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/goat.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-goat-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-goat-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-gorilla-sound.md b/docs/play-gorilla-sound.md index 009f5cf2..ec925825 100644 --- a/docs/play-gorilla-sound.md +++ b/docs/play-gorilla-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/gorilla.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/gorilla.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-gorilla-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-gorilla-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-happy-birthday.md b/docs/play-happy-birthday.md index 4c304ad4..879d9d89 100644 --- a/docs/play-happy-birthday.md +++ b/docs/play-happy-birthday.md @@ -72,4 +72,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-happy-birthday.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-happy-birthday.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-horse-sound.md b/docs/play-horse-sound.md index 7c294ff7..7f5ed0dd 100644 --- a/docs/play-horse-sound.md +++ b/docs/play-horse-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/horse.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/horse.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-horse-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-horse-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-imperial-march.md b/docs/play-imperial-march.md index 0e8f152a..7cb074c7 100644 --- a/docs/play-imperial-march.md +++ b/docs/play-imperial-march.md @@ -65,4 +65,4 @@ Script Content exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-imperial-march.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-imperial-march.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-jingle-bells.md b/docs/play-jingle-bells.md index 3a09016c..af560056 100644 --- a/docs/play-jingle-bells.md +++ b/docs/play-jingle-bells.md @@ -193,4 +193,4 @@ Start-Sleep -m $Duration.EIGHTH exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-jingle-bells.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-jingle-bells.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-lion-sound.md b/docs/play-lion-sound.md index eb3ef9e5..ebb5e833 100644 --- a/docs/play-lion-sound.md +++ b/docs/play-lion-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/lion.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/lion.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-lion-sound.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-lion-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-m3u.md b/docs/play-m3u.md index b92499b4..131103ed 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 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-m3u.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-mission-impossible.md b/docs/play-mission-impossible.md index 36d8ad38..027e9aac 100644 --- a/docs/play-mission-impossible.md +++ b/docs/play-mission-impossible.md @@ -93,4 +93,4 @@ Start-Sleep -m 150 exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-mission-impossible.ps1 as of 10/19/2023 08:11:41)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-mission-impossible.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-mp3.md b/docs/play-mp3.md index 4f3715ee..b010427c 100644 --- a/docs/play-mp3.md +++ b/docs/play-mp3.md @@ -91,4 +91,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-mp3.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-mp3.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-parrot-sound.md b/docs/play-parrot-sound.md index b77318d2..28e4e22f 100644 --- a/docs/play-parrot-sound.md +++ b/docs/play-parrot-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/parrot.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/parrot.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-parrot-sound.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-parrot-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-pig-sound.md b/docs/play-pig-sound.md index fd3f3506..13679224 100644 --- a/docs/play-pig-sound.md +++ b/docs/play-pig-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/pig.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/pig.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-pig-sound.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-pig-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-pong.md b/docs/play-pong.md index c051043f..d87fba22 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-pong.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-rattlesnake-sound.md b/docs/play-rattlesnake-sound.md index eab65ced..47643cad 100644 --- a/docs/play-rattlesnake-sound.md +++ b/docs/play-rattlesnake-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/rattlesnake.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/rattlesnake.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-rattlesnake-sound.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-rattlesnake-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-rick.md b/docs/play-rick.md index 64ca64d8..934cbb92 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-rick.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-snake.md b/docs/play-snake.md index cfcab04b..6977bb64 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-snake.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-super-mario.md b/docs/play-super-mario.md index cbc78b1a..6274c8cb 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-super-mario.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-tetris-melody.md b/docs/play-tetris-melody.md index 1397e58a..e0c84437 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-tetris-melody.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-vulture-sound.md b/docs/play-vulture-sound.md index a118a17f..fa7cccde 100644 --- a/docs/play-vulture-sound.md +++ b/docs/play-vulture-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/vulture.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/vulture.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-vulture-sound.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-vulture-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/play-wolf-sound.md b/docs/play-wolf-sound.md index 74f505c3..1231613b 100644 --- a/docs/play-wolf-sound.md +++ b/docs/play-wolf-sound.md @@ -44,8 +44,8 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../Data/Sounds/wolf.mp3" +& "$PSScriptRoot/play-mp3.ps1" "$PSScriptRoot/../data/sounds/wolf.mp3" exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of play-wolf-sound.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of play-wolf-sound.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/poweroff.md b/docs/poweroff.md index 5df6d01e..d4063edc 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of poweroff.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/print-image.md b/docs/print-image.md index cb02fb26..ef3c5df4 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of print-image.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/publish-to-ipfs.md b/docs/publish-to-ipfs.md index 4a9d8f03..cf82b593 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of publish-to-ipfs.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/pull-repo.md b/docs/pull-repo.md index 75f41f8c..c089b51b 100644 --- a/docs/pull-repo.md +++ b/docs/pull-repo.md @@ -97,4 +97,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of pull-repo.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/pull-repos.md b/docs/pull-repos.md index 164e5965..1699fed5 100644 --- a/docs/pull-repos.md +++ b/docs/pull-repos.md @@ -101,4 +101,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of pull-repos.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of pull-repos.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/query-smart-data.md b/docs/query-smart-data.md index d10bab40..7c58f6a9 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of query-smart-data.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/reboot-fritzbox.md b/docs/reboot-fritzbox.md index 7e9f5561..5c123669 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of reboot-fritzbox.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/reboot.md b/docs/reboot.md index 5479214c..7071f1e0 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of reboot.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/remind-me.md b/docs/remind-me.md index 0b2870c4..63c9f275 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of remind-me.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/remove-empty-dirs.md b/docs/remove-empty-dirs.md index df4a579e..5f075db5 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-empty-dirs.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/remove-old-dirs.md b/docs/remove-old-dirs.md index f83fa47f..2bfa529b 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-old-dirs.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/remove-print-jobs.md b/docs/remove-print-jobs.md index 545ae52a..4fd99c5a 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-print-jobs.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/remove-tag.md b/docs/remove-tag.md index 64d46c2f..7a71b208 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of remove-tag.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/remove-vm.md b/docs/remove-vm.md new file mode 100644 index 00000000..a08010d9 --- /dev/null +++ b/docs/remove-vm.md @@ -0,0 +1,28 @@ +*remove-vm.ps1* +================ + +remove-vm.ps1 + + +Parameters +---------- +```powershell + + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +Script Content +-------------- +```powershell +$VMName = "debian" +$WarningPreference = 'SilentlyContinue' # If VM already stopped +Stop-VM $VMName -Force +Remove-VM $VMName -Force +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 12/07/2023 20:24:22)* diff --git a/docs/replace-in-files.md b/docs/replace-in-files.md index 6ffd1e1d..999b825a 100644 --- a/docs/replace-in-files.md +++ b/docs/replace-in-files.md @@ -6,10 +6,10 @@ This PowerShell script searches and replaces a pattern in the given files by the Parameters ---------- ```powershell -PS> ./replace-in-files.ps1 [[-pattern] ] [[-replacement] ] [[-files] ] [] +PS> ./replace-in-files.ps1 [[-pattern] ] [[-replacement] ] [[-filePattern] ] [] -pattern - Specifies the pattern to look for + Specifies the text pattern to look for Required? false Position? 1 @@ -18,7 +18,7 @@ PS> ./replace-in-files.ps1 [[-pattern] ] [[-replacement] ] [[-fi Accept wildcard characters? false -replacement - Specifies the replacement + Specifies the text replacement Required? false Position? 2 @@ -26,7 +26,7 @@ PS> ./replace-in-files.ps1 [[-pattern] ] [[-replacement] ] [[-fi Accept pipeline input? false Accept wildcard characters? false --files +-filePattern Specifies the file to scan Required? false @@ -64,10 +64,10 @@ Script Content .DESCRIPTION This PowerShell script searches and replaces a pattern in the given files by the replacement. .PARAMETER pattern - Specifies the pattern to look for + Specifies the text pattern to look for .PARAMETER replacement - Specifies the replacement -.PARAMETER files + Specifies the text replacement +.PARAMETER filePattern Specifies the file to scan .EXAMPLE PS> ./replace-in-files NSA "No Such Agency" C:\Temp\*.txt @@ -77,28 +77,27 @@ Script Content Author: Markus Fleschutz | License: CC0 #> -param([string]$pattern = "", [string]$replacement = "", [string]$files = "") +param([string]$pattern = "", [string]$replacement = "", [string]$filePattern = "") -function ReplaceInFile { param([string]$FilePath, [string]$Pattern, [string]$Replacement) +function ReplaceInFile { param([string]$path, [string]$pattern, [string]$replacement) - [System.IO.File]::WriteAllText($FilePath, - ([System.IO.File]::ReadAllText($FilePath) -replace $Pattern, $Replacement) + [System.IO.File]::WriteAllText($path, + ([System.IO.File]::ReadAllText($path) -replace $pattern, $replacement) ) } try { - if ($pattern -eq "" ) { $pattern = read-host "Enter search pattern" } - if ($replacement -eq "" ) { $replacement = read-host "Enter replacement" } - if ($files -eq "" ) { $files = read-host "Enter files" } + if ($pattern -eq "" ) { $pattern = Read-Host "Enter the text pattern to look for" } + if ($replacement -eq "" ) { $replacement = Read-Host "Enter the text replacement" } + if ($filePattern -eq "" ) { $filePattern = Read-Host "Enter the file pattern" } - $StopWatch = [system.diagnostics.stopwatch]::startNew() - - $fileList = (get-childItem -path "$files" -attributes !Directory) - foreach($file in $fileList) { + $stopWatch = [system.diagnostics.stopwatch]::startNew() + $files = (Get-ChildItem -path "$filePattern" -attributes !Directory) + foreach($file in $files) { ReplaceInFile $file $pattern $replacement } - [int]$Elapsed = $StopWatch.Elapsed.TotalSeconds - "OK, replaced '$pattern' by '$replacement' in $($fileList.Count) files in $Elapsed sec." + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Replaced '$pattern' by '$replacement' in $($files.Count) files in $elapsed sec" exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -106,4 +105,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of replace-in-files.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of replace-in-files.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/restart-network-adapters.md b/docs/restart-network-adapters.md index b546129c..e77c5de0 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of restart-network-adapters.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/roll-a-dice.md b/docs/roll-a-dice.md index 5dce7b13..1446279d 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of roll-a-dice.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/save-screenshot.md b/docs/save-screenshot.md index d1041849..db58c7a7 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of save-screenshot.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/scan-ports.md b/docs/scan-ports.md index 519631cb..c589a047 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of scan-ports.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/search-filename.md b/docs/search-filename.md index 492a62c0..05f5edd1 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of search-filename.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/search-files.md b/docs/search-files.md index 54c02aff..dc14d85d 100644 --- a/docs/search-files.md +++ b/docs/search-files.md @@ -92,4 +92,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of search-files.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of search-files.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/send-email.md b/docs/send-email.md index 41a2cf8c..331d239a 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-email.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/send-tcp.md b/docs/send-tcp.md index 948c3717..88d56128 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-tcp.ps1 as of 12/07/2023 20:24:22)* diff --git a/docs/send-udp.md b/docs/send-udp.md index d202a4f2..b5c5b99e 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of send-udp.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/set-profile.md b/docs/set-profile.md index f65668e0..77efbab4 100644 --- a/docs/set-profile.md +++ b/docs/set-profile.md @@ -54,7 +54,7 @@ try { "⏳ (3/3) Copying my-profile.ps1..." $PathToRepo = "$PSScriptRoot/.." - Copy-Item "$PathToRepo/Scripts/my-profile.ps1" "$PathToProfile" -force + Copy-Item "$PathToRepo/scripts/my-profile.ps1" "$PathToProfile" -force "✔️ updated your PowerShell profile by my-profile.ps1 - it gets active on next login" exit 0 # success @@ -64,4 +64,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of set-profile.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-profile.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/set-timer.md b/docs/set-timer.md index 21da53c0..1729e5d8 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-timer.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/set-volume.md b/docs/set-volume.md index 044d60c8..9f9f5501 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-volume.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/set-wallpaper.md b/docs/set-wallpaper.md index f5d1a7b0..eec7a793 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of set-wallpaper.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/show-lightnings.md b/docs/show-lightnings.md index 9ec1bfc4..d718ad6b 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-lightnings.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/show-notification.md b/docs/show-notification.md index 63dde5b9..ae1ff195 100644 --- a/docs/show-notification.md +++ b/docs/show-notification.md @@ -87,4 +87,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of show-notification.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-notification.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/show-traffic.md b/docs/show-traffic.md index cd67d768..c9101aaa 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of show-traffic.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/simulate-presence.md b/docs/simulate-presence.md index 7d406541..65f3dc20 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of simulate-presence.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/smart-data2csv.md b/docs/smart-data2csv.md index affa3f52..67a7ffcf 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of smart-data2csv.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-arabic.md b/docs/speak-arabic.md index 42210d26..9d3066e9 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-arabic.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-checklist.md b/docs/speak-checklist.md index ca76f73d..110d8316 100644 --- a/docs/speak-checklist.md +++ b/docs/speak-checklist.md @@ -60,7 +60,7 @@ param([string]$Name = "") try { if ($Name -eq "") { $Name = Read-Host "Enter the name of the checklist" } - $Lines = Get-Content -path "$PSScriptRoot/../Data/Checklists/$Name.txt" + $Lines = Get-Content -path "$PSScriptRoot/../data/checklists/$Name.txt" clear-host $Step = 1 foreach($Line in $Lines) { @@ -78,4 +78,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of speak-checklist.ps1 as of 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-checklist.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-countdown.md b/docs/speak-countdown.md index dd261122..a39c5cda 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-countdown.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-croatian.md b/docs/speak-croatian.md index f2d6f865..bc7ddb48 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-croatian.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-danish.md b/docs/speak-danish.md index 4f31381e..48140619 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-danish.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-dutch.md b/docs/speak-dutch.md index 032566d0..8547d330 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-dutch.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-english.md b/docs/speak-english.md index cf5c78bf..c3a9467e 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-english.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-epub.md b/docs/speak-epub.md index 668eacab..0d930fa5 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-epub.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-esperanto.md b/docs/speak-esperanto.md index 5eb4a87d..f52dc34c 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-esperanto.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-file.md b/docs/speak-file.md index cb2cd2bd..a5079168 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-file.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-finnish.md b/docs/speak-finnish.md index ea471e0a..775e3104 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-finnish.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-french.md b/docs/speak-french.md index e74ea453..83f19e81 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-french.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-german.md b/docs/speak-german.md index e200d04e..1281dea4 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-german.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-greek.md b/docs/speak-greek.md index e090357f..1a5cf852 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-greek.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-hebrew.md b/docs/speak-hebrew.md index ea9a845d..5aff942a 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-hebrew.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-hindi.md b/docs/speak-hindi.md index 586e938b..b3bae25f 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-hindi.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-italian.md b/docs/speak-italian.md index e8097c66..864f20c0 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-italian.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-japanese.md b/docs/speak-japanese.md index a137667a..d027c09d 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-japanese.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-korean.md b/docs/speak-korean.md index 6013a92d..d3899e6f 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-korean.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-latin.md b/docs/speak-latin.md index d6a3a659..a2dfdd87 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-latin.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-mandarin.md b/docs/speak-mandarin.md index be929682..1fc180ea 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 10/19/2023 08:11:42)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-mandarin.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-norwegian.md b/docs/speak-norwegian.md index 0f337529..3622d8ca 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-norwegian.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-polish.md b/docs/speak-polish.md index b37420fc..e386306e 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-polish.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-portuguese.md b/docs/speak-portuguese.md index 71f8be2c..4ecf9ea0 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-portuguese.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-russian.md b/docs/speak-russian.md index 035ac705..40042964 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-russian.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-spanish.md b/docs/speak-spanish.md index 7f32020e..7840e768 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-spanish.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-swedish.md b/docs/speak-swedish.md index f92fb745..22ac51d9 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-swedish.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-test.md b/docs/speak-test.md index f552f53c..f078e9c7 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-test.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-text.md b/docs/speak-text.md index 9764e07b..33e20add 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-text.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-thai.md b/docs/speak-thai.md index f0f22fec..6cd65656 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-thai.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-turkish.md b/docs/speak-turkish.md index ae4a10b1..afda7f47 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-turkish.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/speak-ukrainian.md b/docs/speak-ukrainian.md index 8972575b..e7b3245d 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of speak-ukrainian.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/spell-word.md b/docs/spell-word.md index 08cad4b0..09d770ec 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of spell-word.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/start-ipfs-server.md b/docs/start-ipfs-server.md index 09f935e8..6024af91 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of start-ipfs-server.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/suspend.md b/docs/suspend.md index 64a4f48e..b4650555 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of suspend.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/switch-branch.md b/docs/switch-branch.md index d7441990..97923c40 100644 --- a/docs/switch-branch.md +++ b/docs/switch-branch.md @@ -125,4 +125,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-branch.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-branch.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/switch-shelly1.md b/docs/switch-shelly1.md index 6560fd4a..2d52dfe2 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-shelly1.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/switch-tabs.md b/docs/switch-tabs.md index fad27414..26ec2d15 100644 --- a/docs/switch-tabs.md +++ b/docs/switch-tabs.md @@ -72,4 +72,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of switch-tabs.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of switch-tabs.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/sync-folder.md b/docs/sync-folder.md new file mode 100644 index 00000000..377227b3 --- /dev/null +++ b/docs/sync-folder.md @@ -0,0 +1,99 @@ +*sync-folder.ps1* +================ + +This PowerShell script synchronizes (mirrors) the content of 2 directory trees by using Robocopy. +Typical use cases are backups: at first everything is copied (full backup), afterward only changes are copied (incremental backup). +IMPORTANT NOTE: Make sure the target path is correct because the content gets replaced (DATA LOSS)! + +Parameters +---------- +```powershell +PS> ./sync-folder.ps1 [[-sourcePath] ] [[-targetPath] ] [] + +-sourcePath + Specifies the path to the source folder + + Required? false + Position? 1 + Default value + Accept pipeline input? false + Accept wildcard characters? false + +-targetPath + Specifies the path to the target folder + + 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> ./sync-folder.ps1 C:\MyPhotos D:\Backups\MyPhotos + +``` + +Notes +----- +Author: Markus Fleschutz | License: CC0 + +Related Links +------------- +https://github.com/fleschutz/PowerShell + +Script Content +-------------- +```powershell +<# +.SYNOPSIS + Syncronizes two folders +.DESCRIPTION + This PowerShell script synchronizes (mirrors) the content of 2 directory trees by using Robocopy. + Typical use cases are backups: at first everything is copied (full backup), afterward only changes are copied (incremental backup). + IMPORTANT NOTE: Make sure the target path is correct because the content gets replaced (DATA LOSS)! +.PARAMETER sourcePath + Specifies the path to the source folder +.PARAMETER targetPath + Specifies the path to the target folder +.EXAMPLE + PS> ./sync-folder.ps1 C:\MyPhotos D:\Backups\MyPhotos +.LINK + https://github.com/fleschutz/PowerShell +.NOTES + Author: Markus Fleschutz | License: CC0 +#> + +param([string]$sourcePath = "", [string]$targetPath = "") + +try { + if ($sourcePath -eq "") { $sourcePath = Read-Host "Enter the path to the source folder" } + if ($targetPath -eq "") { $targetPath = Read-Host "Enter the path to the target folder" } + $stopWatch = [system.diagnostics.stopwatch]::startNew() + + $robocopyParameters = $sourcePath, $targetPath, '/MIR', '/FFT', '/NDL', '/NP', '/NS' + # /MIR = mirror a directory tree + # /FFT = assume FAT file times (2-second granularity) + # /NDL = don't log directory names + # /NP = don't display percentage copied + # /NS = don't log file sizes + + robocopy.exe $robocopyParameters + if ($lastExitCode -gt 3) { throw 'Robocopy failed.' } + + [int]$elapsed = $stopWatch.Elapsed.TotalSeconds + "✔️ Synced 📂$sourcePath to 📂$targetPath 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 sync-folder.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/sync-repo.md b/docs/sync-repo.md index 9090a9ce..493009e6 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of sync-repo.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/tell-joke.md b/docs/tell-joke.md index 0f5f8246..b1bd2025 100644 --- a/docs/tell-joke.md +++ b/docs/tell-joke.md @@ -47,7 +47,7 @@ Script Content #> try { - $table = Import-CSV "$PSScriptRoot/../Data/jokes.csv" + $table = Import-CSV "$PSScriptRoot/../data/jokes.csv" $randomNumberGenerator = New-Object System.Random $row = [int]$randomNumberGenerator.next(0, $table.count - 1) @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of tell-joke.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of tell-joke.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/tell-quote.md b/docs/tell-quote.md index 80025b6d..e75e6967 100644 --- a/docs/tell-quote.md +++ b/docs/tell-quote.md @@ -47,7 +47,7 @@ Script Content #> try { - $table = Import-CSV "$PSScriptRoot/../Data/quotes.csv" + $table = Import-CSV "$PSScriptRoot/../data/quotes.csv" $randomNumberGenerator = New-Object System.Random $row = [int]$randomNumberGenerator.next(0, $table.Count - 1) @@ -60,4 +60,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of tell-quote.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of tell-quote.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/toggle-caps-lock.md b/docs/toggle-caps-lock.md index 6b1ae3ec..7e88f033 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-caps-lock.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/toggle-num-lock.md b/docs/toggle-num-lock.md index a7ca861a..bc74c855 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-num-lock.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/toggle-scroll-lock.md b/docs/toggle-scroll-lock.md index 6bc13f01..a661913b 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of toggle-scroll-lock.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/translate-file.md b/docs/translate-file.md index f9d0673c..2bd45df5 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-file.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/translate-files.md b/docs/translate-files.md index ee1180d6..c3203f73 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-files.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/translate-text.md b/docs/translate-text.md index c80d791c..02acf242 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of translate-text.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/turn-volume-down.md b/docs/turn-volume-down.md index b97d8e56..85361ac6 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-down.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/turn-volume-fully-up.md b/docs/turn-volume-fully-up.md index a00da021..4fa0bf82 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-fully-up.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/turn-volume-off.md b/docs/turn-volume-off.md index fd4fe496..820b08e2 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-off.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/turn-volume-on.md b/docs/turn-volume-on.md index eaf8cde1..a174f2dc 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-on.ps1 as of 12/07/2023 20:24:23)* diff --git a/docs/turn-volume-up.md b/docs/turn-volume-up.md index ac5327b4..beebad53 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of turn-volume-up.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-all-apps.md b/docs/uninstall-all-apps.md index 25c03673..d5a16b97 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-all-apps.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-bloatware.md b/docs/uninstall-bloatware.md index e5eab82e..305d6f15 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-bloatware.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-chrome.md b/docs/uninstall-chrome.md index bcd742d9..efec430c 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-chrome.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-crystal-disk-info.md b/docs/uninstall-crystal-disk-info.md index 2d7a45f2..32dd5b59 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-info.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-crystal-disk-mark.md b/docs/uninstall-crystal-disk-mark.md index daab7852..938241dc 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-crystal-disk-mark.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-discord.md b/docs/uninstall-discord.md index 672ac80a..dc94b925 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-discord.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-edge.md b/docs/uninstall-edge.md index e7b6d387..b822e780 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-edge.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-firefox.md b/docs/uninstall-firefox.md index 8bdcc71d..81cf7664 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-firefox.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-git-extensions.md b/docs/uninstall-git-extensions.md index d3887e8f..01b58f62 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-git-extensions.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-github-cli.md b/docs/uninstall-github-cli.md index fb404c63..169ffd99 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-github-cli.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-irfanview.md b/docs/uninstall-irfanview.md index e755ff2a..65573b41 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-irfanview.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-microsoft-teams.md b/docs/uninstall-microsoft-teams.md index c0b3f286..61a0d499 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-microsoft-teams.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-netflix.md b/docs/uninstall-netflix.md index d0b62b45..d3c3f8dd 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-netflix.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-nine-zip.md b/docs/uninstall-nine-zip.md index c0dc9da4..807df734 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-nine-zip.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-one-calendar.md b/docs/uninstall-one-calendar.md index 6fa866de..d0d706b9 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-one-calendar.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-opera-browser.md b/docs/uninstall-opera-browser.md index df7389d4..c8ec0309 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-browser.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-opera-gx.md b/docs/uninstall-opera-gx.md index 8ca4c9bd..49620ea6 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-opera-gx.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-paint-3d.md b/docs/uninstall-paint-3d.md index 48a3b3b9..833f202b 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-paint-3d.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-rufus.md b/docs/uninstall-rufus.md index 81d1c708..ac7b0936 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-rufus.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-skype.md b/docs/uninstall-skype.md index 7afd3ab8..c1cdcaa4 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-skype.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-spotify.md b/docs/uninstall-spotify.md index 464869e6..4300eef1 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-spotify.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-twitter.md b/docs/uninstall-twitter.md index 63ba5c6b..35346d48 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-twitter.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-visual-studio-code.md b/docs/uninstall-visual-studio-code.md index 43053b03..7611a7e3 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-visual-studio-code.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-vlc.md b/docs/uninstall-vlc.md index d4b38511..cce82bc7 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-vlc.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/uninstall-windows-terminal.md b/docs/uninstall-windows-terminal.md index 66255f76..0f6a44e5 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of uninstall-windows-terminal.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/upgrade-ubuntu.md b/docs/upgrade-ubuntu.md index 25a26e72..832fc00f 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of upgrade-ubuntu.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/upload-file.md b/docs/upload-file.md index 8671798f..2ce1eee0 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of upload-file.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/upload-to-discord.md b/docs/upload-to-discord.md index a2cc61fb..ab7de109 100644 --- a/docs/upload-to-discord.md +++ b/docs/upload-to-discord.md @@ -41,4 +41,4 @@ if (-not ([string]::IsNullOrEmpty($file))){curl.exe -F "file1=@$file" $hookurl} } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of upload-to-discord.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of upload-to-discord.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/upload-to-dropbox.md b/docs/upload-to-dropbox.md index a81aaeec..e0e8f243 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of upload-to-dropbox.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/wake-up.md b/docs/wake-up.md index de7a11d9..0023e07c 100644 --- a/docs/wake-up.md +++ b/docs/wake-up.md @@ -6,9 +6,9 @@ This PowerShell script sends a magic UDP packet to a computer to wake him up (re Parameters ---------- ```powershell -PS> ./wake-up.ps1 [[-MACaddress] ] [[-IPaddress] ] [[-Port] ] [[-NumRetries] ] [] +PS> ./wake-up.ps1 [[-macAddr] ] [[-ipAddr] ] [[-udpPort] ] [[-numTimes] ] [] --MACaddress +-macAddr Specifies the host's MAC address (e.g. 11:22:33:44:55:66) Required? false @@ -17,7 +17,7 @@ PS> ./wake-up.ps1 [[-MACaddress] ] [[-IPaddress] ] [[-Port] +-ipAddr Specifies the host's IP address or subnet address (e.g. 192.168.0.255) Required? false @@ -26,7 +26,7 @@ PS> ./wake-up.ps1 [[-MACaddress] ] [[-IPaddress] ] [[-Port] +-udpPort Specifies the UDP port (9 by default) Required? false @@ -35,8 +35,8 @@ PS> ./wake-up.ps1 [[-MACaddress] ] [[-IPaddress] ] [[-Port] - Specifies number of retries (3 by default) +-numTimes + Specifies # of times to send the packet (3 by default) Required? false Position? 4 @@ -53,6 +53,7 @@ Example ------- ```powershell PS> ./wake-up.ps1 11:22:33:44:55:66 192.168.100.100 +✔️ Sent magic packet to IP 192.168.100.100, UDP port 9 (3 times). Wait a minute until the computer fully boots up. ``` @@ -72,47 +73,46 @@ Script Content Wakes up a computer using Wake-on-LAN .DESCRIPTION This PowerShell script sends a magic UDP packet to a computer to wake him up (requires the target computer to have Wake-on-LAN activated). -.PARAMETER MACaddress +.PARAMETER macAddr Specifies the host's MAC address (e.g. 11:22:33:44:55:66) -.PARAMETER IPaddress +.PARAMETER ipAddr Specifies the host's IP address or subnet address (e.g. 192.168.0.255) -.PARAMETER Port +.PARAMETER udpPort Specifies the UDP port (9 by default) -.PARAMETER NumRetries - Specifies number of retries (3 by default) +.PARAMETER numTimes + Specifies # of times to send the packet (3 by default) .EXAMPLE PS> ./wake-up.ps1 11:22:33:44:55:66 192.168.100.100 + ✔️ Sent magic packet to IP 192.168.100.100, UDP port 9 (3 times). Wait a minute until the computer fully boots up. .LINK https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> -param([string]$MACaddress = "", [string]$IPaddress = "", [int]$Port=9, [int]$NumRetries=3) +param([string]$macAddr = "", [string]$ipAddr = "", [int]$udpPort = 9, [int]$numTimes = 3) -function Send-WOL { param([string]$mac, [string]$ip, [int]$port) - $broadcast = [Net.IPAddress]::Parse($ip) +function Send-WOL { param([string]$macAddr, [string]$ipAddr, [int]$udpPort) + $broadcastAddr = [Net.IPAddress]::Parse($ipAddr) - $mac=(($mac.replace(":","")).replace("-","")).replace(".","") - $target=0,2,4,6,8,10 | % {[convert]::ToByte($mac.substring($_,2),16)} + $macAddr = (($macAddr.replace(":","")).replace("-","")).replace(".","") + $target = 0,2,4,6,8,10 | % {[convert]::ToByte($macAddr.substring($_,2),16)} $packet = (,[byte]255 * 6) + ($target * 16) - $UDPclient = new-Object System.Net.Sockets.UdpClient - $UDPclient.Connect($broadcast,$port) + $UDPclient = New-Object System.Net.Sockets.UdpClient + $UDPclient.Connect($broadcastAddr, $udpPort) [void]$UDPclient.Send($packet, 102) } try { - if ($MACaddress -eq "" ) { $MACaddress = Read-Host "Enter the host's MAC address, e.g. 11:22:33:44:55:66" } - if ($IPaddress -eq "" ) { $IPaddress = Read-Host "Enter the host's IP or subnet address, e.g. 192.168.0.255" } + if ($macAddr -eq "" ) { $macAddr = Read-Host "Enter the host's MAC address, e.g. 11:22:33:44:55:66" } + if ($ipAddr -eq "" ) { $ipAddr = Read-Host "Enter the host's IP or subnet address, e.g. 192.168.0.255" } - Send-WOL $MACaddress $IPaddress $Port - for ($i = 0; $i -lt $NumRetries; $i++) { - Start-Sleep -milliseconds 100 - Send-WOL $MACaddress $IPaddress $Port + for ($i = 0; $i -lt $numTimes; $i++) { + Send-WOL $macAddr $ipAddr $udpPort + Start-Sleep -milliseconds 100 } - "✔️ sent magic packet with MAC $MACaddress to IP $IPaddress on port $Port as wakeup call ($($NumRetries + 1) times)" - " (Hint: wait a minute until the computer fully boots up)" + "✔️ Sent magic packet to IP $ipAddr, UDP port $udpPort ($numTimes times). Wait a minute until the computer fully boots up." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -120,4 +120,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of wake-up.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of wake-up.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/watch-file.md b/docs/watch-file.md index e343b1cb..e0eaa311 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of watch-file.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/weather-report.md b/docs/weather-report.md index 375b6af8..d80b2dee 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of weather-report.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/weather.md b/docs/weather.md index c6576994..5def1038 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of weather.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/what-is.md b/docs/what-is.md index c10d3a36..2d9603b4 100644 --- a/docs/what-is.md +++ b/docs/what-is.md @@ -61,7 +61,7 @@ param([string]$abbr = "") try { if ($abbr -eq "" ) { $abbr = Read-Host "Enter the abbreviation to query" } - $files = (Get-ChildItem "$PSScriptRoot/../Data/Abbr/*.csv") + $files = (Get-ChildItem "$PSScriptRoot/../data/abbr/*.csv") $basename = "" foreach($file in $files) { $table = Import-CSV "$file" @@ -71,7 +71,7 @@ try { "💡 $($row.ABBR) in $basename refers to $($row.MEANING)" } } - if ($basename -eq "") { "🤷‍ Sorry, no entry '$abbr' in my database (located at .../Data/Abbr/)." } + if ($basename -eq "") { "🤷‍ Sorry, no '$abbr' entry found. Use to google it: https://www.google.com/search?q=abbreviation+$abbr" } exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" @@ -79,4 +79,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of what-is.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/windefender.md b/docs/windefender.md index 1fef9eb8..2906ef43 100644 --- a/docs/windefender.md +++ b/docs/windefender.md @@ -1,12 +1,12 @@ -*Windefender.ps1* +*windefender.ps1* ================ -This script can enable disable and show windows defender real time monitoring! +This script can enable / disable and show Windows defender real time monitoring! Parameters ---------- ```powershell -PS> ./Windefender.ps1 [] +PS> ./windefender.ps1 [] [] This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, @@ -16,7 +16,7 @@ PS> ./Windefender.ps1 [] Example ------- ```powershell -PS> ./Windefender.ps1 +PS> ./windefender.ps1 ``` @@ -33,11 +33,11 @@ Script Content ```powershell <# .SYNOPSIS - Windows defender in powershell + Configure Windows defender .DESCRIPTION - This script can enable disable and show windows defender real time monitoring! + This script can enable / disable and show Windows defender real time monitoring! .EXAMPLE - PS> ./Windefender.ps1 + PS> ./windefender.ps1 .LINK https://github.com/pakoti/Awesome_Sysadmin .NOTES @@ -82,4 +82,4 @@ break } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of Windefender.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of windefender.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-animated.md b/docs/write-animated.md index e63b824a..15c0f9ec 100644 --- a/docs/write-animated.md +++ b/docs/write-animated.md @@ -167,4 +167,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-animated.ps1 as of 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-animated.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-ascii-image.md b/docs/write-ascii-image.md index cd1fbae9..dc21f152 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 10/19/2023 08:11:43)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-ascii-image.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-big.md b/docs/write-big.md index 41f31143..4d557695 100644 --- a/docs/write-big.md +++ b/docs/write-big.md @@ -465,4 +465,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-big.ps1 as of 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-big.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-blue.md b/docs/write-blue.md index 0c94660d..37ef6485 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-blue.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-braille.md b/docs/write-braille.md index 05b5f154..48dc84d0 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-braille.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-changelog.md b/docs/write-changelog.md index 9aa45960..29e8207c 100644 --- a/docs/write-changelog.md +++ b/docs/write-changelog.md @@ -72,22 +72,22 @@ param([string]$RepoDir = "$PWD") try { [system.threading.thread]::currentthread.currentculture = [system.globalization.cultureinfo]"en-US" - Write-Progress "⏳ (1/6) Searching for Git executable..." + Write-Progress "(1/6) Searching for Git executable..." $null = (git --version) if ($lastExitCode -ne "0") { throw "Can't execute 'git' - make sure Git is installed and available" } - Write-Progress "⏳ (2/6) Checking local repository..." + Write-Progress "(2/6) Checking local repository..." if (!(Test-Path "$RepoDir" -pathType container)) { throw "Can't access folder: $RepoDir" } $RepoDirName = (Get-Item "$RepoDir").Name - Write-Progress "⏳ (3/6) Fetching the latest commits..." + Write-Progress "(3/6) Fetching the latest commits..." & git -C "$RepoDir" fetch --all --force --quiet if ($lastExitCode -ne "0") { throw "'git fetch --all' failed with exit code $lastExitCode" } - Write-Progress "⏳ (4/6) Listing all Git commit messages..." + Write-Progress "(4/6) Listing all Git commit messages..." $commits = (git -C "$RepoDir" log --boundary --pretty=oneline --pretty=format:%s | sort -u) - Write-Progress "⏳ (5/6) Sorting the Git commit messages..." + Write-Progress "(5/6) Sorting the Git commit messages..." $new = @() $fixes = @() $updates = @() @@ -110,7 +110,7 @@ try { $various += $commit } } - Write-Progress "⏳ (6/6) Listing all contributors..." + Write-Progress "(6/6) Listing all contributors..." $contributors = (git -C "$RepoDir" log --format='%aN' | sort -u) Write-Progress -completed " " @@ -155,4 +155,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-changelog.ps1 as of 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-changelog.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-chart.md b/docs/write-chart.md index a112131f..010af332 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-chart.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-clock.md b/docs/write-clock.md index cdd3457d..9ea71332 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-clock.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-code.md b/docs/write-code.md index 47518173..2e32324d 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-code.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-date.md b/docs/write-date.md index 27add3ca..79b5df05 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-date.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-fractal.md b/docs/write-fractal.md index f69a1f29..03448ff8 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-fractal.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-green.md b/docs/write-green.md index eac46e38..955da622 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-green.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-in-emojis.md b/docs/write-in-emojis.md index b683eaad..26f33c21 100644 --- a/docs/write-in-emojis.md +++ b/docs/write-in-emojis.md @@ -62,7 +62,7 @@ param([string]$text = "") try { if ($text -eq "") { $text = Read-Host "Enter the text" } - $table = Import-CSV "$PSScriptRoot/../Data/emojis.csv" + $table = Import-CSV "$PSScriptRoot/../data/emojis.csv" foreach($row in $table) { $text = $text -Replace "\s?$($row.WORD)\s?","$($row.EMOJI)️" } @@ -74,4 +74,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-in-emojis.ps1 as of 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-in-emojis.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-joke.md b/docs/write-joke.md index 2e5c7f59..ad10b759 100644 --- a/docs/write-joke.md +++ b/docs/write-joke.md @@ -47,7 +47,7 @@ Script Content #> try { - $table = Import-CSV "$PSScriptRoot/../Data/jokes.csv" + $table = Import-CSV "$PSScriptRoot/../data/jokes.csv" $randomNumberGenerator = New-Object System.Random $row = [int]$randomNumberGenerator.next(0, $table.Count - 1) @@ -61,4 +61,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-joke.ps1 as of 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-joke.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-lowercase.md b/docs/write-lowercase.md index 7bcb7ad2..5e2fe943 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-lowercase.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-marquee.md b/docs/write-marquee.md index 4fd7f4b0..2c86f469 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-marquee.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-matrix.md b/docs/write-matrix.md index 450fe9ce..a8cd317f 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-matrix.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-moon.md b/docs/write-moon.md index e84105b7..af6bc609 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-moon.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-morse-code.md b/docs/write-morse-code.md index 4ade4326..bbfa7cf7 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-morse-code.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-motd.md b/docs/write-motd.md index 443b3a94..c7011ce4 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-motd.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-qr-code.md b/docs/write-qr-code.md index d0dc2a91..0402aec3 100644 --- a/docs/write-qr-code.md +++ b/docs/write-qr-code.md @@ -61,4 +61,4 @@ Write-Host " " -foregroundColor black -backgroundColor w exit 0 # success ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-qr-code.ps1 as of 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-qr-code.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-quote.md b/docs/write-quote.md index 1423fbb6..0aefa62b 100644 --- a/docs/write-quote.md +++ b/docs/write-quote.md @@ -49,7 +49,7 @@ Script Content #> try { - $table = Import-CSV "$PSScriptRoot/../Data/quotes.csv" + $table = Import-CSV "$PSScriptRoot/../data/quotes.csv" $randomNumberGenerator = New-Object System.Random $row = [int]$randomNumberGenerator.next(0, $table.Count - 1) @@ -66,4 +66,4 @@ try { } ``` -*(generated by convert-ps2md.ps1 using the comment-based help of write-quote.ps1 as of 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-quote.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-red.md b/docs/write-red.md index 7f8a5b6c..b818c64c 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-red.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-rot13.md b/docs/write-rot13.md index fd959631..d2f37581 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-rot13.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-shit.md b/docs/write-shit.md index c29eb0f9..196aa490 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-shit.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-sine-curves.md b/docs/write-sine-curves.md index 22753c57..6d935feb 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-sine-curves.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-time.md b/docs/write-time.md index 7fecea6c..96457d51 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-time.ps1 as of 12/07/2023 20:24:24)* diff --git a/docs/write-typewriter.md b/docs/write-typewriter.md index 38a6e5c1..b40b438e 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-typewriter.ps1 as of 12/07/2023 20:24:25)* diff --git a/docs/write-uppercase.md b/docs/write-uppercase.md index 07c228b0..47a4e043 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-uppercase.ps1 as of 12/07/2023 20:24:25)* diff --git a/docs/write-vertical.md b/docs/write-vertical.md index fca9075a..f2e21343 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 10/19/2023 08:11:44)* +*(generated by convert-ps2md.ps1 using the comment-based help of write-vertical.ps1 as of 12/07/2023 20:24:25)*