Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created August 27, 2017 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/7a2d68b6ab9bba3ae7f0021273a71157 to your computer and use it in GitHub Desktop.
Save angelovstanton/7a2d68b6ab9bba3ae7f0021273a71157 to your computer and use it in GitHub Desktop.
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