Removing OEM configured bookmarks from Edge

I believe most will agree when I say that OEM branded configuration on Windows devices can be both unwanted and frustrating to remove. Especially when you provisioning devices using Autopilot and want to apply organization's configuration policies.

I recently encountered an issue with Lenovo Windows 11 devices that came pre-installed and configured with things that the customer didn't want. While the procurement process gets worked out with the supplier to provide a clean image, I still needed to address these unwanted items.

One of the items were pre-configured Edge bookmarks that had no place in the bookmarks that I was putting in place. It was obvious that they had to go. 

The bookmarks are located under  C:\Users\<Userprofile>\AppData\Local\Microsoft\Edge\User Data\Default


If you open it then you can match contents with what shows up in the favorites on Edge.

Solution

I created a simple 1 line script to delete the Bookmarks file as part of the Autopilot provisioning process.

Get-ChildItem "$env:USERPROFILE\AppData\Local\Microsoft\Edge\User Data\Default\Bookmarks" | ForEach-Object {Remove-item $_ }

Import the PowerShell script from above into Intune.

2. Browse to Devices – Windows – PowerShell Scripts
3. Click on Add
4. Give a Name
5. Select the script
6. Set Run this script using the logged on credentials as Yes
7. Set Enforce script signature check to No
8. Set Run script in 64 bit PowerShell Host as Yes
9. Commit and deploy to a user-based group.


End Result

The script will run with logged on user's credentials. It will delete the existing Bookmarks file and a new one will get created when the Edge browser is opened again. Only this time, the OEM entries from the Bookmarks file will be gone and not show up in the Favorites again.

Comments

Popular posts from this blog

How to force escrowing of BitLocker recovery keys using Intune

Prevent users from running certain programs or applications on Windows endpoints using Intune

Intune: Configure Printers for Non-Administrative Users