mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 01:18:18 +02:00
Update check-battery.ps1
This commit is contained in:
parent
4c3327bdb9
commit
584d70329b
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script queries the status of the system battery and prints it.
|
This PowerShell script queries the status of the system battery and prints it.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-battery
|
PS> ./check-battery
|
||||||
✅ Battery 9% low, 54 min remaining
|
⚠️ Battery 9% low, 54 min remaining
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -33,10 +33,10 @@ try {
|
|||||||
$Reply = "⚠️ Battery at $Percent%, ONLY $Remaining MIN remaining"
|
$Reply = "⚠️ Battery at $Percent%, ONLY $Remaining MIN remaining"
|
||||||
} elseif ($Remaining -le 30) {
|
} elseif ($Remaining -le 30) {
|
||||||
$Reply = "⚠️ Battery at $Percent%, only $Remaining min remaining"
|
$Reply = "⚠️ Battery at $Percent%, only $Remaining min remaining"
|
||||||
|
} elseif ($Percent -lt 10) {
|
||||||
|
$Reply = "⚠️ Battery $Percent% low, $Remaining min remaining"
|
||||||
} elseif ($Percent -ge 80) {
|
} elseif ($Percent -ge 80) {
|
||||||
$Reply = "✅ Battery $Percent% full, $Remaining min remaining"
|
$Reply = "✅ Battery $Percent% full, $Remaining min remaining"
|
||||||
} elseif ($Percent -le 10) {
|
|
||||||
$Reply = "✅ Battery $Percent% low, $Remaining min remaining"
|
|
||||||
} else {
|
} else {
|
||||||
$Reply = "✅ Battery at $Percent%, $Remaining min remaining"
|
$Reply = "✅ Battery at $Percent%, $Remaining min remaining"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user