Get-AppxPackage of a single user

753 views Asked by At

Is there a way to get the name of installed packages for a single user to avoid sysprep failures? Can't find differences in the info provided with "Get-AppxPackage" between one installed for all users and one only for the current.

i've tryied using "Get-AppxPackage", comparing the result with "Get-AppxProvisionedPackage -Online", with "Get-AppxPackage -allusers", trying to find differences with "IsResourcePackage" "IsBundle" "IsFramework"

1

There are 1 answers

4
js2010 On

Something like this worked for me, with the user sid and the full package name, although packageuserinfomation says "Installed(pending removal)". Packageuserinfomation (only with -allusers) is actually a combination of other properties that a format file combines into one string.

Remove-AppxPackage -user S-1-5-22-3423303272-3025932680-3187700768-374700 `
  Microsoft.XboxSpeechToTextOverlay_1.21.13002.0_x64__8wekyb3d8bbwe


get-appxpackage -AllUsers Microsoft.XboxSpeechToTextOverlay | 
  select packageuserinformation | fl

PackageUserInformation : 
  S-1-5-22-3423303272-3025932680-3187700768-374700 [DOM\user1]: 
  Installed(pending removal)