Pick the protections you want in your script.
These controls tighten how OneDrive and Office launch web content through the legacy browser surface that
still sits behind groove.exe.
Relaxed applies core protections that are unlikely to break everyday OneDrive usage. Strict adds more aggressive download restrictions. Custom lets you toggle individual controls by hand.
Tip: Most users can start with Relaxed. If a niche workflow breaks under Strict, generate a Custom script and only keep the controls that fit your environment.
How to use: Save the script, open PowerShell as Administrator, and run
Invoke-OneDriveBaseline to apply these settings. To reverse them, run
Invoke-OneDriveBaselineRollback.
Rollback scope: The rollback function only removes the registry values for the controls you generated in this script. It does not restore older domain Group Policy settings or other IE FeatureControl entries.
Before you run the script
- Use this only on Windows devices that you manage yourself.
- Back up at least one test system or create a restore point.
- Generate the script and read the comments above each command.
- Remove anything that does not fit your environment or policies.
- Run on a non-critical device first, from an elevated PowerShell window.
Good next steps
- Save your adjusted script in a safe folder or version control.
- Document which controls you applied and to which systems.
- Revisit your baseline as your OneDrive usage and risk profile evolve.
- For domain-joined or regulated environments, work with your IT or security team.