

With that said, I gave it a try to see what would happen. All I know is computers act funny after I run that script so I don't run that script anymore. It pins stuff to the start menu that have no business being on the start menu and it does other strange stuff I can't remember now. I find it does weird things to the computers I run it on. If you have any OEM equipment (Dell, Lenovo, HP) running the factory image you will notice you do not have permissions to delete the C:\Program Files\WindowsApps folder or anything in it. In my test it removed a test folder where i removed my permissions from, but I don't have an HP to test it like you can. But I'm not deploying an untested script. But I know that when I deploy scripts with Intune they run as the systemuser. I don't know how to test scripts as system user. I'm thinking the remove-item would work if the script ran as SYSTEMUSER. I tried something similar before where I used Get-AppxPackage *JumpStart* | Remove-AppxPackage and it also did not work. Please note that when you change them for system applications (if you delete WindowsApps on drive C), there may be crashes, you will have to press "Continue" (the rights to the specified subfolder will not be changed).Īfter applying the security settings, delete the WindowsApps folder in the usual way.Powershell Get-AppxPackage AD2F1837. Wait until the security settings are applied. Check Replace all child object permission entries and press OK.In the field "Principal" specify your user, just as you did in the 3rd step, and then set the checkbox "Full control" and press "OK". Press Change Resolutions and then press Add.In it, press the "Advanced" button on the "Security" tab again. You will be returned to the folder properties window. Check item "Change owner of subcontainers and objects" and press "Apply".For a Microsoft account, you can enter the corresponding E-Mail as the name. If the name was entered correctly, the computer name will be added to the username, as in the screenshot.


Right-click on the folder WindowsApps and open its properties, and then go to the tab "Security" and press the button "Advanced".Instructions for deleting the WindowsApps folder:
