mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-28 09:38:53 +01: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) {
|
||||
"✅ CPU is $Temp."
|
||||
"✅ CPU is $Temp"
|
||||
} else {
|
||||
$Details = Get-WmiObject -Class Win32_Processor
|
||||
$DeviceName = $Details.Name.trim()
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
try {
|
||||
if ($IsLinux) {
|
||||
"✅ $(uname -sr)."
|
||||
"✅ $(uname -sr)"
|
||||
} else {
|
||||
$OS = Get-WmiObject -class Win32_OperatingSystem
|
||||
$Name = $OS.Caption
|
||||
@ -31,4 +31,4 @@ try {
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
@ -56,8 +56,8 @@ if (Test-RegistryValue -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon"
|
||||
$Reason += ", found registry entry '...\CurrentControlSet\Services\Netlogon' with 'AvoidSpnSet'"
|
||||
}
|
||||
if ($Reason -ne "") {
|
||||
"⚠️ Pending reboot ($($Reason.substring(2)))."
|
||||
"⚠️ Pending reboot ($($Reason.substring(2)))"
|
||||
} else {
|
||||
"✅ No pending reboot."
|
||||
"✅ No pending reboot"
|
||||
}
|
||||
exit 0 # success
|
||||
exit 0 # success
|
||||
|
Loading…
Reference in New Issue
Block a user