Improve list-installed-apps.ps1

This commit is contained in:
Markus Fleschutz 2021-09-27 07:13:53 +02:00
parent 9748042e05
commit b1a8a339be

View File

@ -2,7 +2,7 @@
.SYNOPSIS
list-installed-apps.ps1
.DESCRIPTION
Lists the installed Windows Store apps
Lists the installed apps (from Windows Store or snaps)
.EXAMPLE
PS> ./list-installed-apps
.NOTES
@ -12,7 +12,11 @@
#>
try {
get-appxPackage | select-object Name,Version | format-table -autoSize
if ($IsLinux) {
& snap list
} else {
get-appxPackage | select-object Name,Version | format-table -autoSize
}
exit 0
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"