Update the manual pages

This commit is contained in:
Markus Fleschutz 2023-08-06 11:42:46 +02:00
parent 9c60ba2de7
commit 16a686916e
554 changed files with 959 additions and 862 deletions

View File

@ -109,4 +109,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of add-firewall-rules.ps1 as of 08/06/2023 11:42:25)*

View File

@ -79,4 +79,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of add-memo.ps1 as of 08/06/2023 11:42:25)*

View File

@ -71,4 +71,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of alert.ps1 as of 08/06/2023 11:42:25)*

View File

@ -177,4 +177,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of build-repo.ps1 as of 08/06/2023 11:42:25)*

View File

@ -82,4 +82,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of build-repos.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-autostart.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-crashdumps.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 07/29/2023 10:33:42)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-desktop.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-docs.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-downloads.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-dropbox.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-etc.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-fonts.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-home.ps1 as of 08/06/2023 11:42:25)*

View File

@ -48,4 +48,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-logs.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-music.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-onedrive.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-pics.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-public.ps1 as of 08/06/2023 11:42:25)*

View File

@ -55,4 +55,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-recycle-bin.ps1 as of 08/06/2023 11:42:25)*

View File

@ -82,4 +82,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-repos.ps1 as of 08/06/2023 11:42:25)*

View File

@ -57,4 +57,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-root.ps1 as of 08/06/2023 11:42:25)*

View File

@ -55,4 +55,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-screenshots.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-scripts.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-ssh.ps1 as of 08/06/2023 11:42:25)*

View File

@ -52,4 +52,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-temp.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-templates.ps1 as of 08/06/2023 11:42:25)*

View File

@ -55,4 +55,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-trash.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up2.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up3.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-up4.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-users.ps1 as of 08/06/2023 11:42:25)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-videos.ps1 as of 08/06/2023 11:42:25)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of cd-windows.ps1 as of 08/06/2023 11:42:25)*

View File

@ -79,4 +79,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of change-wallpaper.ps1 as of 08/06/2023 11:42:25)*

View File

@ -72,4 +72,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-apps.ps1 as of 08/06/2023 11:42:25)*

View File

@ -17,7 +17,7 @@ Example
-------
```powershell
PS> ./check-battery
✅ 21% battery life, 54 min remaining
⚠️ Battery 9% low, 54 min remaining
```
@ -39,7 +39,7 @@ Script Content
This PowerShell script queries the status of the system battery and prints it.
.EXAMPLE
PS> ./check-battery
✅ 21% battery life, 54 min remaining
⚠️ Battery 9% low, 54 min remaining
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -54,28 +54,31 @@ try {
$Details = [System.Windows.Forms.SystemInformation]::PowerStatus
[int]$Percent = 100 * $Details.BatteryLifePercent
[int]$Remaining = $Details.BatteryLifeRemaining / 60
switch ($Details.PowerLineStatus) {
"Online" {
if ($Details.PowerLineStatus -eq "Online") {
if ($Details.BatteryChargeStatus -eq "NoSystemBattery") {
$Reply = "✅ AC powered"
} elseif ($Percent -eq 100) {
$Reply = "✅ Battery $Percent% full"
} elseif ($Percent -ge 95) {
$Reply = "✅ Battery fully charged ($Percent%)"
} else {
$Reply = "✅ Battery $Percent%, charging..."
$Reply = "✅ Battery charging... ($Percent%)"
}
}
"Offline" {
if ($Percent -eq 100) {
$Reply = "✅ $Percent% full battery, $Remaining min remaining"
} elseif ($Remaining -gt 30) {
$Reply = "✅ $Percent% battery life, $Remaining min remaining"
} else { # must be offline
if ($Remaining -eq 0) {
$Reply = "✅ Battery at $Percent%, calculating remaining time..."
} elseif ($Remaining -le 5) {
$Reply = "⚠️ Battery at $Percent%, ONLY $Remaining MIN remaining"
} elseif ($Remaining -le 30) {
$Reply = "⚠️ Battery at $Percent%, only $Remaining min remaining"
} elseif ($Percent -lt 10) {
$Reply = "⚠️ Battery $Percent% low, $Remaining min remaining"
} elseif ($Percent -ge 80) {
$Reply = "✅ Battery $Percent% full, $Remaining min remaining"
} else {
$Reply = "⚠️ $Percent% battery life, only $Remaining min remaining"
$Reply = "✅ Battery at $Percent%, $Remaining min remaining"
}
}
}
}
Write-Host $Reply
Write-Output $Reply
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -83,4 +86,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-battery.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-battery.ps1 as of 08/06/2023 11:42:25)*

View File

@ -74,4 +74,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-bios.ps1 as of 08/06/2023 11:42:25)*

View File

@ -103,4 +103,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-cpu.ps1 as of 08/06/2023 11:42:25)*

View File

@ -57,4 +57,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-day.ps1 as of 08/06/2023 11:42:25)*

View File

@ -57,16 +57,14 @@ foreach($row in $table){$nop=dig $row.Domain +short}
} else {
foreach($row in $table){$nop=Resolve-DNSName $row.Domain}
}
Write-Progress -completed "."
[float]$elapsed = $stopWatch.Elapsed.TotalSeconds
$average = [math]::round($numRows / $elapsed, 1)
if ($average -lt 10.0) {
"⚠️ DNS resolves $average domains per second only!"
Write-Output "⚠️ DNS resolves $average domains per second only"
} else {
"✅ DNS resolves $average domains per second"
Write-Output "✅ DNS resolves $average domains per second"
}
Write-Progress -completed "."
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -74,4 +72,4 @@ foreach($row in $table){$nop=Resolve-DNSName $row.Domain}
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-dns.ps1 as of 08/06/2023 11:42:25)*

View File

@ -91,4 +91,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 08/06/2023 11:42:25)*

View File

@ -26,7 +26,7 @@ Example
-------
```powershell
PS> ./check-drives
C drive uses 87GB of 249GB
Drive C: uses 87GB of 249GB
```
@ -50,7 +50,7 @@ Script Content
Specifies the minimum warning level (10 GB by default)
.EXAMPLE
PS> ./check-drives
C drive uses 87GB of 249GB
Drive C: uses 87GB of 249GB
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -78,24 +78,23 @@ function Bytes2String { param([int64]$Bytes)
try {
Write-Progress "⏳ Querying drives..."
$Drives = Get-PSDrive -PSProvider FileSystem
Write-Progress -completed "done."
Write-Progress -completed "."
foreach($Drive in $Drives) {
$ID = $Drive.Name
$Details = (Get-PSDrive $ID)
$Details = (Get-PSDrive $Drive.Name)
if ($IsLinux) { $ID = $Drive.Name } else { $ID = $Drive.Name + ":" }
[int64]$Free = $Details.Free
[int64]$Used = $Details.Used
[int64]$Total = ($Used + $Free)
if ($Total -eq 0) {
Write-Host "✅ $ID drive is empty"
Write-Host "✅ Drive $ID is empty"
} elseif ($Free -eq 0) {
Write-Host "⚠️ $ID drive with $(Bytes2String $Total) is full!"
Write-Host "⚠️ Drive $ID with $(Bytes2String $Total) is 100% full"
} elseif ($Free -lt $MinLevel) {
Write-Host "⚠️ $ID drive with $(Bytes2String $Total) is nearly full ($(Bytes2String $Free) free)!"
} elseif ($Used -lt $Free) {
Write-Host "✅ $ID drive uses $(Bytes2String $Used) of $(Bytes2String $Total)"
Write-Host "⚠️ Drive $ID with $(Bytes2String $Total) is nearly full ($(Bytes2String $Free) free)"
} else {
Write-Host "✅ $ID drive has $(Bytes2String $Free) of $(Bytes2String $Total) free"
[int]$Percent = ($Used * 100) / $Total
Write-Host "✅ Drive $ID $Percent% full, $(Bytes2String $Free) of $(Bytes2String $Total) free"
}
}
exit 0 # success
@ -105,4 +104,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-drives.ps1 as of 08/06/2023 11:42:25)*

View File

@ -62,4 +62,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-dusk.ps1 as of 08/06/2023 11:42:25)*

View File

@ -61,4 +61,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-easter-sunday.ps1 as of 08/06/2023 11:42:25)*

View File

@ -75,4 +75,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-file-system.ps1 as of 08/06/2023 11:42:25)*

View File

@ -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 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-file.ps1 as of 08/06/2023 11:42:26)*

View File

@ -65,4 +65,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-firewall.ps1 as of 08/06/2023 11:42:26)*

View File

@ -65,4 +65,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-gpu.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-hardware.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-health.ps1 as of 08/06/2023 11:42:26)*

View File

@ -61,4 +61,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-independence-day.ps1 as of 08/06/2023 11:42:26)*

67
Docs/check-ip.md Normal file
View File

@ -0,0 +1,67 @@
*check-ip.ps1*
================
This PowerShell script queries the public IP address and prints it.
Parameters
----------
```powershell
PS> ./check-ip.ps1 [<CommonParameters>]
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
```
Example
-------
```powershell
PS> ./check-ip.ps1
✅ Public IPv4 185.77.209.161, IPv6 2003:f2:6128:fc01:e503:601:30c2:a028 near Munich
```
Notes
-----
Author: Markus Fleschutz | License: CC0
Related Links
-------------
https://github.com/fleschutz/PowerShell
Script Content
--------------
```powershell
<#
.SYNOPSIS
Checks the IP address
.DESCRIPTION
This PowerShell script queries the public IP address and prints it.
.EXAMPLE
PS> ./check-ip.ps1
✅ Public IPv4 185.77.209.161, IPv6 2003:f2:6128:fc01:e503:601:30c2:a028 near Munich
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
if ($IsLinux) {
$PublicIPv4 = (curl -4 --silent ifconfig.co)
$PublicIPv6 = (curl -6 --silent ifconfig.co)
$City = (curl --silent ifconfig.co/city)
} else {
$PublicIPv4 = (curl.exe -4 --silent ifconfig.co)
$PublicIPv6 = (curl.exe -6 --silent ifconfig.co)
$City = (curl.exe --silent ifconfig.co/city)
}
Write-Output "✅ Public IPv4 $PublicIPv4, IPv6 $PublicIPv6 near $City"
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-ip.ps1 as of 08/06/2023 11:42:26)*

View File

@ -84,4 +84,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv4-address.ps1 as of 08/06/2023 11:42:26)*

View File

@ -98,4 +98,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-ipv6-address.ps1 as of 08/06/2023 11:42:26)*

View File

@ -55,4 +55,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-iss-position.ps1 as of 08/06/2023 11:42:26)*

View File

@ -87,4 +87,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-mac-address.ps1 as of 08/06/2023 11:42:26)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-midnight.ps1 as of 08/06/2023 11:42:26)*

View File

@ -57,4 +57,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-month.ps1 as of 08/06/2023 11:42:26)*

View File

@ -76,4 +76,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-moon-phase.ps1 as of 08/06/2023 11:42:26)*

View File

@ -60,7 +60,8 @@ Script Content
& "$PSScriptRoot/check-ping.ps1"
& "$PSScriptRoot/check-dns.ps1"
& "$PSScriptRoot/check-vpn.ps1"
& "$PSScriptRoot/check-ip.ps1"
exit 0 # success
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-network.ps1 as of 08/06/2023 11:42:26)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-new-year.ps1 as of 08/06/2023 11:42:26)*

View File

@ -59,4 +59,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-noon.ps1 as of 08/06/2023 11:42:26)*

View File

@ -73,4 +73,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-os.ps1 as of 08/06/2023 11:42:26)*

View File

@ -63,4 +63,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-outlook.ps1 as of 08/06/2023 11:42:26)*

View File

@ -94,4 +94,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-password.ps1 as of 08/06/2023 11:42:26)*

View File

@ -91,4 +91,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-pending-reboot.ps1 as of 08/06/2023 11:42:26)*

View File

@ -88,4 +88,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-ping.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-ping.ps1 as of 08/06/2023 11:42:26)*

View File

@ -64,4 +64,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-powershell.ps1 as of 08/06/2023 11:42:26)*

View File

@ -76,4 +76,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-ps1-file.ps1 as of 08/06/2023 11:42:26)*

View File

@ -98,4 +98,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-ram.ps1 as of 08/06/2023 11:42:26)*

View File

@ -128,4 +128,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-repo.ps1 as of 08/06/2023 11:42:26)*

View File

@ -56,4 +56,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 07/29/2023 10:33:43)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-santa.ps1 as of 08/06/2023 11:42:26)*

View File

@ -95,4 +95,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-smart-devices.ps1 as of 08/06/2023 11:42:26)*

View File

@ -67,4 +67,4 @@ Script Content
exit 0 # success
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-software.ps1 as of 08/06/2023 11:42:26)*

View File

@ -84,4 +84,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-subnet-mask.ps1 as of 08/06/2023 11:42:26)*

View File

@ -25,8 +25,8 @@ PS> ./check-swap-space.ps1 [[-MinLevel] <Int32>] [<CommonParameters>]
Example
-------
```powershell
PS> ./check-swap-space
✅ Swap space uses 63GB of 1856GB
PS> ./check-swap-space.ps1
✅ Swap space 10% full, 901MB of 1TB free
```
@ -49,8 +49,8 @@ Script Content
.PARAMETER MinLevel
Specifies the minimum level (10 GB by default)
.EXAMPLE
PS> ./check-swap-space
✅ Swap space uses 63GB of 1856GB
PS> ./check-swap-space.ps1
✅ Swap space 10% full, 901MB of 1TB free
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -87,19 +87,17 @@ try {
}
}
if ($Total -eq 0) {
$Reply = "⚠️ No swap space configured!"
Write-Output "⚠️ No swap space configured"
} elseif ($Free -eq 0) {
$Reply = "⚠️ Swap space of $(MB2String $Total) is full!"
Write-Output "⚠️ Swap space of $(MB2String $Total) is full"
} elseif ($Free -lt $MinLevel) {
$Reply = "⚠️ Swap space of $(MB2String $Total) is nearly full ($(MB2String $Free) free)!"
Write-Output "⚠️ Swap space of $(MB2String $Total) is nearly full ($(MB2String $Free) free)"
} elseif ($Used -eq 0) {
$Reply = "✅ Swap space with $(MB2String $Total) reserved"
} elseif ($Used -lt $Free) {
$Reply = "✅ Swap space uses $(MB2String $Used) of $(MB2String $Total)"
Write-Output "✅ Swap space with $(MB2String $Total) reserved"
} else {
$Reply = "✅ Swap space has $(MB2String $Free) of $(MB2String $Total) free"
[int]$Percent = ($Used * 100) / $Total
Write-Output "✅ Swap space $Percent% full, $(MB2String $Free) of $(MB2String $Total) free"
}
Write-Host $Reply
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -107,4 +105,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-swap-space.ps1 as of 08/06/2023 11:42:26)*

View File

@ -96,4 +96,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-symlinks.ps1 as of 08/06/2023 11:42:26)*

View File

@ -65,4 +65,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-time-zone.ps1 as of 08/06/2023 11:42:26)*

View File

@ -80,4 +80,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-uptime.ps1 as of 08/06/2023 11:42:26)*

View File

@ -65,4 +65,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-vpn.ps1 as of 08/06/2023 11:42:26)*

View File

@ -81,4 +81,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-weather.ps1 as of 08/06/2023 11:42:26)*

View File

@ -54,4 +54,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-week.ps1 as of 08/06/2023 11:42:26)*

View File

@ -72,4 +72,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-wind.ps1 as of 08/06/2023 11:42:26)*

View File

@ -60,4 +60,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-windows-system-files.ps1 as of 08/06/2023 11:42:26)*

View File

@ -88,4 +88,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of check-xml-file.ps1 as of 08/06/2023 11:42:26)*

View File

@ -83,7 +83,7 @@ try {
if ($lastExitCode -ne "0") { throw "'git clean' in the submodules failed with exit code $lastExitCode" }
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"✔️ cleaned repo 📂$RepoDirName in $Elapsed sec"
"✔️ Cleaning the 📂$RepoDirName repo took $Elapsed sec"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -91,4 +91,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repo.ps1 as of 08/06/2023 11:42:26)*

View File

@ -92,4 +92,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of clean-repos.ps1 as of 08/06/2023 11:42:26)*

View File

@ -58,4 +58,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of clear-dns-cache.ps1 as of 08/06/2023 11:42:26)*

View File

@ -58,4 +58,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of clear-recycle-bin.ps1 as of 08/06/2023 11:42:26)*

View File

@ -26,6 +26,11 @@ Example
-------
```powershell
PS> ./clone-repos C:\Repos
⏳ (1) Searching for Git executable... git version 2.41.0.windows.3
⏳ (2) Loading Data/popular-git-repos.csv... 28 repos
⏳ (3) Checking target folder... 📂repos
⏳ (4/32) Cloning into 📂base256unicode (dev tool)...
...
```
@ -42,13 +47,18 @@ Script Content
```powershell
<#
.SYNOPSIS
Clones popular repos
Clones Git repos
.DESCRIPTION
This PowerShell script clones popular Git repositories into a 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) Loading Data/popular-git-repos.csv... 28 repos
⏳ (3) Checking target folder... 📂repos
⏳ (4/32) Cloning into 📂base256unicode (dev tool)...
...
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -67,7 +77,7 @@ try {
Write-Host "⏳ (2) Loading Data/popular-git-repos.csv... " -noNewline
$Table = Import-CSV "$PSScriptRoot/../Data/popular-git-repos.csv"
$NumEntries = $Table.count
Write-Host "$NumEntries Git repos listed"
Write-Host "$NumEntries repos"
$TargetDirName = (Get-Item "$TargetDir").Name
Write-Host "⏳ (3) Checking target folder... 📂$TargetDirName"
@ -101,7 +111,7 @@ try {
$Cloned++
}
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"✔️ cloned $Cloned of $NumEntries Git repos into folder 📂$TargetDirName in $Elapsed sec"
"✔️ Cloning $Cloned of $NumEntries Git repos into folder 📂$TargetDirName took $Elapsed sec"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
@ -109,4 +119,4 @@ try {
}
```
*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of clone-repos.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-calculator.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-chrome.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-cortana.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-edge.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-file-explorer.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-firefox.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-git-extensions.ps1 as of 08/06/2023 11:42:26)*

View File

@ -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 07/29/2023 10:33:44)*
*(generated by convert-ps2md.ps1 using the comment-based help of close-magnifier.ps1 as of 08/06/2023 11:42:26)*

Some files were not shown because too many files have changed in this diff Show More