0

i need to be able to log in as an administrator and run a powershell script so that it affects all users registry keys.

i have a powershell script that fixes the TWINUI issue. It resets the corrupted registry keys of a users defualt apps back to standard. it only really seems to work if the user is temporarily made a local admin on the device and run it from that login. Obviously removing their local admin privlages afterward.

this issue seems to crop up constantly and when it happens on one user on a device it happens for multiple users. going through every user on a device can be time consuming. if i could log in as an administrator and run the powershell and it go through all the affected registry keys of all the users it could save us a lot of time.

1 Answers1

0

So the generally accepted fix for the TWINUI issue is to re-register all of that user's AppxPackages using the below command. This does not seem to require admin credentials, but only applies to the current user:

Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

However, to do this for all users, just specify -allusers when searching for packages, and run as an administrator:

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

Unfortunately, I don't have a way to test this out, so your mileage may vary.

See this forum post or this TechNet article for more details. This seems to take quite a while, and resets the windows UI process a few times/causes the screen to blink/etc. I would avoid doing this as a GPO or scheduled task for users.

Cpt.Whale
  • 10,914