- use timeout -1 or choice /c EX1T to pause scripts - make sure you use objects else strings where needed in powershell - Out-GridView probably outputs objects, so either get the string property or the tostring() builtin conversion
No. I tried "1-RemoveApps.cmd" with sqlite3.exe and SetACL.exe. The script only removed two (1527c705-839a-4832-9118-54d4Bd6a0c89 and c5e2524a-ea46-4f67-841f-6a9465d9d515) of the requested 19 (see the next post for the complete list). There was a lot of double entries in the selectable grid, so I had to be careful to get them all. I've actually lost interest in the "selectable-grid" approach and I'm beginning to appreciate @BAU 's FORCE APPX UNINSTALL.bat fixed "laundry-list" array approach.
Thanks, I'll try again using your suggestions. I'm actually appreciating just setting $bloat = "blacklist" and using "FORCE APPX UNINSTALL.bat" as-is. I just ran it on a Windows Update corrupted Windows 10 OS and it worked great! Spoiler: $bloat blacklist Code: $bloat = @( "Microsoft.AAD.BrokerPlugin", "Microsoft.BioEnrollment", "Microsoft.ECApp", "Microsoft.LockApp", "Microsoft.MicrosoftEdge", "Microsoft.MicrosoftEdgeDevToolsClient", "Microsoft.Win32WebViewHost", "F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE", "Microsoft.Windows.CallingShellApp", "Microsoft.Windows.ContentDeliveryManager", "c5e2524a-ea46-4f67-841f-6a9465d9d515", "1527c705-839a-4832-9118-54d4Bd6a0c89", "Microsoft.Windows.ParentalControls", "Microsoft.Windows.PeopleExperienceHost", "Microsoft.Windows.SecureAssessmentBrowser", "Microsoft.Windows.SecHealthUI", "Microsoft.Windows.XGpuEjectDialog", "Microsoft.XboxGameCallableUI", "Windows.CBSPreview" )
The right tool for the job. I disagree that BAU's script is better than yours!! It was the proper tool to use for the job I needed to have done. AFAIK your $OEM$ script is designed to work on a newly installed OS. I pulled your script out of it's comfortable use-case home and jammed it into doing a job it's not designed to do! I tried using your script on a stale OS with lots of problems and I probably made other mistakes while clicking in the grid. Like I said in my prior post, there were a lot of double entries in the selectable grid of your script which I doubt would be the case on a brand new installed OS. The job The OS I tried your script on is well past being "brand new." It's a saved VMware snapshot of a very badly messed up 20H1-[19041.388]. A cumulative update to 19041.1052 reinstalled all the System Apps that were originally removed offline by Optimize Offline. I honestly wasn't expecting ether your script or BAU's to fix it. The tool I think this explains why BAU's script was the proper tool to use in this case. His script's blacklist design could gather up all stragglers and process them without the risk of a missed grid-click (human error). Using the selectable grid of your script meant I had to click-click-click scroll click-click-click scroll, etc. It's quite possible that I missed a "click" somewhere in the grid pages. If it's of any interest/help behind the spoiler is the multiple entry output of BAU's script. Maybe it gives you some appreciation of the amount of grid-clicking that was required and why his script isn't "better" than yours, but it was the proper tool to use this time. for this use-case. Spoiler: nada Code: *Microsoft.AAD.BrokerPlugin* C:\Windows\SystemApps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy *Microsoft.BioEnrollment* C:\Windows\SystemApps\Microsoft.BioEnrollment_cw5n1h2txyewy *Microsoft.ECApp* C:\Windows\SystemApps\Microsoft.ECApp_8wekyb3d8bbwe C:\Windows\SystemApps\Microsoft.ECApp_8wekyb3d8bbwe *Microsoft.LockApp* C:\Windows\SystemApps\Microsoft.LockApp_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.LockApp_cw5n1h2txyewy *Microsoft.MicrosoftEdge* Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe C:\Windows\SystemApps\Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe C:\Program Files\WindowsApps\Microsoft.MicrosoftEdge.Stable_92.0.902.67_neutral__8wekyb3d8bbwe *Microsoft.MicrosoftEdgeDevToolsClient* C:\Windows\SystemApps\Microsoft.MicrosoftEdgeDevToolsClient_8wekyb3d8bbwe *Microsoft.Win32WebViewHost* C:\Windows\SystemApps\Microsoft.Win32WebViewHost_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Win32WebViewHost_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Win32WebViewHost_cw5n1h2txyewy *F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE* C:\Windows\SystemApps\Microsoft.Windows.AddSuggestedFoldersToLibraryDialog_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.AddSuggestedFoldersToLibraryDialog_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.AddSuggestedFoldersToLibraryDialog_cw5n1h2txyewy *Microsoft.Windows.CallingShellApp* C:\Windows\SystemApps\Microsoft.Windows.CallingShellApp_cw5n1h2txyewy *Microsoft.Windows.ContentDeliveryManager* C:\Windows\SystemApps\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy *c5e2524a-ea46-4f67-841f-6a9465d9d515* C:\Windows\SystemApps\Microsoft.Windows.FileExplorer_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.FileExplorer_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.FileExplorer_cw5n1h2txyewy *1527c705-839a-4832-9118-54d4Bd6a0c89* C:\Windows\SystemApps\Microsoft.Windows.FilePicker_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.FilePicker_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.FilePicker_cw5n1h2txyewy *Microsoft.Windows.ParentalControls* C:\Windows\SystemApps\ParentalControls_cw5n1h2txyewy *Microsoft.Windows.PeopleExperienceHost* C:\Windows\SystemApps\Microsoft.Windows.PeopleExperienceHost_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.PeopleExperienceHost_cw5n1h2txyewy C:\Windows\SystemApps\Microsoft.Windows.PeopleExperienceHost_cw5n1h2txyewy *Microsoft.Windows.SecureAssessmentBrowser* C:\Windows\SystemApps\Microsoft.Windows.SecureAssessmentBrowser_cw5n1h2txyewy *Microsoft.Windows.SecHealthUI* C:\Windows\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy *Microsoft.Windows.XGpuEjectDialog* C:\Windows\SystemApps\Microsoft.Windows.XGpuEjectDialog_cw5n1h2txyewy *Microsoft.XboxGameCallableUI* C:\Windows\SystemApps\Microsoft.XboxGameCallableUI_cw5n1h2txyewy *Windows.CBSPreview* C:\Windows\SystemApps\Windows.CBSPreview_cw5n1h2txyewy C:\Windows\SystemApps\Windows.CBSPreview_cw5n1h2txyewy C:\Windows\SystemApps\Windows.CBSPreview_cw5n1h2txyewy PS C:\windows\system32>
Want to add a note for anyone using FORCE APPX UNINSTALL by @BAU. There is a possibility for unexpected outcomes with the scripts use of wildcards and the suggested blacklist. Note that in the "$bloat=" list, if you only want to remove "Microsoft.LockApp", then expand the wildcard name "LockApp" to "Microsoft.LockApp". The short "LockApp" name removes two system apps: "Microsoft.Windows.AssignedAccessLockApp" and "Microsoft.LockApp" also: If you want to remove the system app "Microsoft.MicrosoftEdge", then there is no possible wildcard name expansion of "MicrosoftEdge" that doesn't take out three applications. Two system apps and a UWP: "Microsoft.MicrosoftEdge", "Microsoft.MicrosoftEdgeDevToolsClient" and the UWP Appx: "Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe
the list is just an example, and the edge filter knocking chredge - thats 100% intended but the whole script is just a proof-of-concept that I did not refine further yet (its on my long todo)
It works perfectly fine as is. So you can put it at the bottom of your todo list! I agree about disabling the useless edge dredge. I think your script is attracting a bit more attention and given the range of users on this forum, it's inevitable that someone will blindly apply your script as-is and then complain when stuff they wanted disappears. At least now they can be beaten up for "not reading the whole thread" "buyer beware" and all that . . .