mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-07-08 16:36:50 +02:00
Improve list-installed-apps.ps1
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
list-installed-apps.ps1
|
list-installed-apps.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Lists the installed Windows Store apps
|
Lists the installed apps (from Windows Store or snaps)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-installed-apps
|
PS> ./list-installed-apps
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -12,7 +12,11 @@
|
|||||||
#>
|
#>
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if ($IsLinux) {
|
||||||
|
& snap list
|
||||||
|
} else {
|
||||||
get-appxPackage | select-object Name,Version | format-table -autoSize
|
get-appxPackage | select-object Name,Version | format-table -autoSize
|
||||||
|
}
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Reference in New Issue
Block a user