mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 17:38:19 +02:00
Update check-cpu.ps1, check-os.ps1, and check-pending-reboot.ps1
This commit is contained in:
parent
22c3068d1d
commit
dd4f14f6c6
@ -42,7 +42,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
"✅ CPU is $Temp."
|
"✅ CPU is $Temp"
|
||||||
} else {
|
} else {
|
||||||
$Details = Get-WmiObject -Class Win32_Processor
|
$Details = Get-WmiObject -Class Win32_Processor
|
||||||
$DeviceName = $Details.Name.trim()
|
$DeviceName = $Details.Name.trim()
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
"✅ $(uname -sr)."
|
"✅ $(uname -sr)"
|
||||||
} else {
|
} else {
|
||||||
$OS = Get-WmiObject -class Win32_OperatingSystem
|
$OS = Get-WmiObject -class Win32_OperatingSystem
|
||||||
$Name = $OS.Caption
|
$Name = $OS.Caption
|
||||||
|
@ -56,8 +56,8 @@ if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon"
|
|||||||
$Reason += ", found registry entry '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'"
|
$Reason += ", found registry entry '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'"
|
||||||
}
|
}
|
||||||
if ($Reason -ne "") {
|
if ($Reason -ne "") {
|
||||||
"⚠️ Pending reboot ($($Reason.substring(2)))."
|
"⚠️ Pending reboot ($($Reason.substring(2)))"
|
||||||
} else {
|
} else {
|
||||||
"✅ No pending reboot."
|
"✅ No pending reboot"
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
Loading…
Reference in New Issue
Block a user