Update check-apps.ps1 and check-cpu.ps1

This commit is contained in:
Markus Fleschutz 2022-12-04 10:07:36 +01:00
parent aed29e2154
commit c064132d11
2 changed files with 10 additions and 5 deletions

View File

@ -2,7 +2,7 @@
.SYNOPSIS
Query application details
.DESCRIPTION
This PowerShell script queries and lists application details.
This PowerShell script queries application details and list it.
.EXAMPLE
PS> ./check-apps
.LINK
@ -12,9 +12,14 @@
#>
try {
$NumAppsInstalled = (Get-AppxPackage).Count
$NumUpdates = (winget upgrade).Count - 5
"$NumAppsInstalled apps installed, $NumUpdates updates available"
if ($IsLinux) {
# TODO
} else {
Write-Progress "Querying installed apps and available updates..."
$NumAppsInstalled = (Get-AppxPackage).Count
$NumUpdates = (winget upgrade).Count - 5
"$NumAppsInstalled apps installed, $NumUpdates updates available"
}
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"

View File

@ -43,7 +43,7 @@ try {
}
if ($IsLinux) {
"✅ CPU is $Temp"
"✅ CPU has $Temp"
} else {
$Details = Get-WmiObject -Class Win32_Processor
$CPUName = $Details.Name.trim()