1

We are currently in the process of moving from Windows 10 22H2/Windows 11 23H2 to Windows 11 24H2.

One of my scripts relies on get-appxpackage for tracking version numbers.

On any client with a different OS than Windows 11 24H2 the PackageUserInformation field of that cmdlet's output showed entries in the form of {SID [domain\user]: Installed}.

In Windows 11 24H2 the user is not resolved and I get only {SID [SID]: Installed}

The script could obviously work around that by using get-aduser but I'd rather fix what led to that result than modify the script. Or is that an intended change of behaviour in get-appxpackage? If so I haven't found anything about it… Can anybody shed some light on this?

8
  • You probably need to show your script for an example of it that gives the output. Commented Aug 15 at 12:38
  • @VomitIT-ChunkyMessStyle: The "new" output behaviour is in the cmdlet's output and therefore completely independent from my script. Get-appxpackage itself behaves differently in different OS versions. Commented Aug 15 at 13:08
  • I can confirm it doesn't resolve the username any more. To see why though, you would have to decompile the module's dll and see what it calls behind the scenes. The actual Appx module itself has not been updated in 24H2, but maybe a .NET behavior has changed? Commented Aug 15 at 18:24
  • side note: For speed, try using [Security.Principal.SecurityIdentifier]::new($SID).Translate([Security.Principal.NTAccount]).Value to translate them yourself instead of the much slower Get-ADUser Commented Aug 15 at 18:28
  • Ok and also, consider adding that as an edit showing the output differences for the specific property using the relevant command on both systems then, it does not need to be your script specifically and all it's logic. This may help add clarity to your question without needing to read clarifying comments moving forward. I see this question has already taken a close vote. @bvdo Commented Aug 15 at 18:39

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.