Created
August 27, 2017 20:21
-
-
Save angelovstanton/7a2d68b6ab9bba3ae7f0021273a71157 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function listAumids( $userAccount ) { | |
if ($userAccount -eq "allusers") | |
{ | |
# Find installed packages for all accounts. Must be run as an administrator in order to use this option. | |
$installedapps = Get-AppxPackage -allusers | |
} | |
elseif ($userAccount) | |
{ | |
# Find installed packages for the specified account. Must be run as an administrator in order to use this option. | |
$installedapps = get-AppxPackage -user $userAccount | |
} | |
else | |
{ | |
# Find installed packages for the current account. | |
$installedapps = get-AppxPackage | |
} | |
$aumidList = @() | |
foreach ($app in $installedapps) | |
{ | |
foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id) | |
{ | |
$aumidList += $app.packagefamilyname + "!" + $id | |
} | |
} | |
return $aumidList | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment