mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-08 20:54:38 +02:00
Merge branch 'main' of github.com:fleschutz/PowerShell
This commit is contained in:
@ -18,8 +18,8 @@
|
||||
Write-Host "`n N E T W O R K" -foregroundColor green
|
||||
& "$PSScriptRoot/check-firewall"
|
||||
& "$PSScriptRoot/list-local-ip.ps1"
|
||||
& "$PSScriptRoot/list-network-shares.ps1"
|
||||
& "$PSScriptRoot/ping-local-devices.ps1"
|
||||
& "$PSScriptRoot/list-network-shares.ps1"
|
||||
& "$PSScriptRoot/check-vpn.ps1"
|
||||
& "$PSScriptRoot/list-internet-ip.ps1"
|
||||
& "$PSScriptRoot/ping-internet.ps1"
|
||||
|
@ -5,7 +5,7 @@
|
||||
This PowerShell script lists all network shares (aka "shared folders") of the local computer.
|
||||
.EXAMPLE
|
||||
PS> ./list-network-shares.ps1
|
||||
✅ Network share \\LAPTOP\Public -> D:\Public ("Public folder for file transfer")
|
||||
✅ Shared folder \\LAPTOP\Public -> D:\Public ("Public folder for file transfer")
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -18,7 +18,7 @@ try {
|
||||
} else {
|
||||
$shares = Get-WmiObject win32_share | where {$_.name -NotLike "*$"}
|
||||
foreach ($share in $shares) {
|
||||
Write-Output "✅ Network share \\$(hostname)\$($share.Name) -> $($share.Path) (`"$($share.Description)`")"
|
||||
Write-Output "✅ Shared folder \\$(hostname)\$($share.Name) -> $($share.Path) (`"$($share.Description)`")"
|
||||
}
|
||||
}
|
||||
exit 0 # success
|
||||
|
@ -7,7 +7,7 @@
|
||||
Specifies the hosts to ping, seperated by commata (10 Internet servers by default)
|
||||
.EXAMPLE
|
||||
PS> ./ping-internet.ps1
|
||||
✅ Internet ping takes 12ms (9...18ms range)
|
||||
✅ Internet ping: 12ms (9...18ms range)
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -39,12 +39,7 @@ try {
|
||||
Write-Host "✅ Online with $loss/$total ping loss and $($min)...$($max)ms latency - $($speed)ms average"
|
||||
} else {
|
||||
[float]$speed = [math]::round([float]$avg / [float]$success, 1)
|
||||
if ($speed -lt 20.0) { $result = "excellent"
|
||||
} elseif ($speed -lt 50.0) { $result = "good"
|
||||
} elseif ($speed -lt 100.0) { $result = "average"
|
||||
} elseif ($speed -lt 150.0) { $result = "okay"
|
||||
} else { $result = "laggy" }
|
||||
Write-Host "✅ Internet ping is $($result): $($speed)ms ($($min)-$($max)ms range)"
|
||||
Write-Host "✅ Internet ping: $($speed)ms ($min...$($max)ms range)"
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
|
@ -9,8 +9,8 @@
|
||||
.EXAMPLE
|
||||
PS> ./write-changelog.ps1
|
||||
|
||||
Changelog of PowerShell
|
||||
=======================
|
||||
Changelog of Repo 'PowerShell'
|
||||
==============================
|
||||
...
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
@ -40,25 +40,22 @@ try {
|
||||
|
||||
Write-Progress "(5/6) Sorting the Git commit messages..."
|
||||
$new = @()
|
||||
$fixes = @()
|
||||
$updates = @()
|
||||
$improved = @()
|
||||
$fixed = @()
|
||||
$various = @()
|
||||
foreach($commit in $commits) {
|
||||
if ($commit -like "New*") { $new += $commit
|
||||
} elseif ($commit -like "Add*") { $new += $commit
|
||||
} elseif ($commit -like "Create*") { $new += $commit
|
||||
} elseif ($commit -like "Fix*") { $fixes += $commit
|
||||
} elseif ($commit -like "Hotfix*") { $fixes += $commit
|
||||
} elseif ($commit -like "Bugfix*") { $fixes += $commit
|
||||
} elseif ($commit -like "Update*") { $updates += $commit
|
||||
} elseif ($commit -like "Updating*") { $updates += $commit
|
||||
} elseif ($commit -like "Updaate*") { $updates += $commit
|
||||
} elseif ($commit -like "Adapt*") { $updates += $commit
|
||||
} elseif ($commit -like "Improve*") { $updates += $commit
|
||||
} elseif ($commit -like "Change*") { $updates += $commit
|
||||
} elseif ($commit -like "Changing*") { $updates += $commit
|
||||
} else {
|
||||
$various += $commit
|
||||
} elseif ($commit -like "Upda*") { $improved += $commit
|
||||
} elseif ($commit -like "Adapt*") { $improved += $commit
|
||||
} elseif ($commit -like "Improve*") { $improved += $commit
|
||||
} elseif ($commit -like "Change*") { $improved += $commit
|
||||
} elseif ($commit -like "Changing*") { $improved += $commit
|
||||
} elseif ($commit -like "Fix*") { $fixed += $commit
|
||||
} elseif ($commit -like "Hotfix*") { $fixed += $commit
|
||||
} elseif ($commit -like "Bugfix*") { $fixed += $commit
|
||||
} else { $various += $commit
|
||||
}
|
||||
}
|
||||
Write-Progress "(6/6) Listing all contributors..."
|
||||
@ -67,8 +64,8 @@ try {
|
||||
|
||||
$Today = (Get-Date).ToShortDateString()
|
||||
Write-Output " "
|
||||
Write-Output "Changelog of $RepoDirName as of $Today"
|
||||
Write-Output "======================================"
|
||||
Write-Output "Changelog of Repo '$RepoDirName'"
|
||||
Write-Output "================================"
|
||||
Write-Output " "
|
||||
Write-Output "🚀 New Features"
|
||||
Write-Output "---------------"
|
||||
@ -76,18 +73,18 @@ try {
|
||||
Write-Output "* $c"
|
||||
}
|
||||
Write-Output " "
|
||||
Write-Output "⚠️ Bug Fixes"
|
||||
Write-Output "------------"
|
||||
foreach($c in $fixes) {
|
||||
Write-Output "* $c"
|
||||
}
|
||||
Write-Output " "
|
||||
Write-Output "🎉 Updates"
|
||||
Write-Output "🎉 Improved"
|
||||
Write-Output "----------"
|
||||
foreach($c in $updates) {
|
||||
foreach($c in $improved) {
|
||||
Write-Output "* $c"
|
||||
}
|
||||
Write-Output " "
|
||||
Write-Output "⚠️ Fixed"
|
||||
Write-Output "--------"
|
||||
foreach($c in $fixed) {
|
||||
Write-Output "* $c"
|
||||
}
|
||||
Write-Output " "
|
||||
Write-Output "🔦 Various"
|
||||
Write-Output "----------"
|
||||
foreach($c in $various) {
|
||||
@ -99,6 +96,8 @@ try {
|
||||
foreach($c in $contributors) {
|
||||
Write-Output "* $c"
|
||||
}
|
||||
Write-Output ""
|
||||
Write-Output "Changelog as of $Today."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
Write-Error $_.Exception.ToString()
|
||||
|
Reference in New Issue
Block a user