Zend certified PHP/Magento developer

Deleting a Window profile manually kills the start button

First: I cannot use GPO as that is outside the contract. DelProf2 does not properly recognize profile timestamps.

I wrote a script to delete old user profiles, and it worked fine until Windows 10 1909. Now if you delete a profile by script or by deleting it from the registry manually, the Windows Start button stops working for every existing or new user, except admins.

Deleting a profile through advanced system settings works, but some of these multiuser devices will get over 100 profiles and that is a slow process.

I can fix it by promoting the users to admin, signing on, then issuing the PowerShell command:

Get-appxpackage -all *shellexperience* -packagetype bundle |% {add-appxpackage -register -disabledevelopmentmode ($_.installlocation + “appxmetadataappxbundlemanifest.xml”)}
But I now have to do it for each and every user who signs on.

But I have to do it for each and every user who signs on.

I also tried:

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

And

Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)AppXManifest.xml”}
With the same results.