This commit is contained in:
USER
2025-08-29 16:12:11 +01:00
parent 1d744181c0
commit e22f17384b

View File

@ -1,43 +0,0 @@
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
}
# Get a list of AUMIDs for the current account:
listAumids
# Get a list of AUMIDs for an account named “CustomerAccount”:
listAumids("CustomerAccount")
# Get a list of AUMIDs for all accounts on the device:
listAumids("allusers")
get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
Get-AppxPackage -allusers