Minimal Script Version for GPO/Scripted Removal of MS Edge #18
DashingMrDasher
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! My company wanted a way to remove MS Edge from our RDS farm servers, so I stripped down the OG script (amazing work, he3als!), to make it extra simple/small, and is only for removing MS Edge MSI or App Store.
Why I modified the script at all: The primary issue with the OG script that I encountered in my use case, is that the script seemed to still be producing some sort of output that was tripping up Task Scheduler, even when using the NonInteractive switch. After trying a few variations of my Scheduled Task, I decided to slim down the script to accommodate a completely headless run, specifically targeted to just find and remove MS Edge MSI or AppX.
I placed the modified .ps1 into the NETLOGON DFS share in our domain(s) and created a Group Policy which grabs a copy of the script and places it on the server(s) in a local folder, and creates a Scheduled Task which runs at Startup, before user login, and removes MS Edge. I've tested this with Server 2016, 2019, and 2022, without issue or nuance between the three. The reason I used this method is the expectation that a future Microsoft update will reinstall Edge, at some point, so this removal task checks for the existence of the MSI (or App) and removes if found. It runs once at each startup. Not the most eloquent solution, so if anyone else has a more efficient way to accomplish this, or wants to improve on the script variation, please feel free; the vast majority of the script is just derivation from the original.
I take no credit (or blame) for the scripting, but figured I'd include the variation here, just in case someone else has a similar need. Ideally, they'll be able to quickly configure a tested method for what I assume is a relatively common desire (to remove Edge and salt the earth) Godspeed! :)
Beta Was this translation helpful? Give feedback.
All reactions