mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-29 11:24:27 +01:00
Update check-apps.ps1 and check-cpu.ps1
This commit is contained in:
parent
aed29e2154
commit
c064132d11
@ -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])"
|
||||
|
@ -43,7 +43,7 @@ try {
|
||||
}
|
||||
|
||||
if ($IsLinux) {
|
||||
"✅ CPU is $Temp"
|
||||
"✅ CPU has $Temp"
|
||||
} else {
|
||||
$Details = Get-WmiObject -Class Win32_Processor
|
||||
$CPUName = $Details.Name.trim()
|
||||
|
Loading…
Reference in New Issue
Block a user