This powershell script adds exclusions to windows defender for Overwatch and Battle.net and their related folders. This does not include EVERYTHING overwatch touches, but the base folders and files.
DISCLAIMER: This script is intended to modify Windows Defender exclusions for Overwatch. Use this script at your own risk. Adding exclusions can potentially reduce your computer's security. Ensure you understand the implications and have adequate security measures in place.
Below you will find step-by-step instructions on how to run the OverwatchExclusions.ps1 script in an elevated PowerShell window, how to change the execution policy to unrestricted, and then how to revert it back to the original policy.
- Windows operating system
- PowerShell installed
- Git installed (if using Git to clone the repository)
- Administrator privileges
-
Download the Script
There are two ways to download the script:
-
Download ZIP:
- From this page click on the green Code button at the top right corner.
- Select Download ZIP from the dropdown menu.
- Extract the ZIP file to your desired location.
-
Using Git:
If you have Git installed, you can clone the repository by executing the following command in your terminal or PowerShell:
git clone https://github.com/yourusername/yourrepository.git
Replace
yourusernameandyourrepositorywith the appropriate GitHub username and repository name.
-
Open an Elevated PowerShell Window
- Press
Win + Xto open the Power User Menu. - Select Windows PowerShell (Admin) or Windows Terminal (Admin).
- If prompted by User Account Control (UAC), click Yes to allow.
- Press
-
Set Execution Policy to Unrestricted
-
In the PowerShell window, execute the following command to change the execution policy:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
-
You may be prompted to confirm the change. Type
Yand pressEnter.
-
-
Run the
OverwatchExclusions.ps1Script-
Navigate to the directory where the
AddOverwatchExclusions.ps1script is located. For example:cd C:\Path\To\Script
-
Execute the script by running:
.\OverwatchExclusions.ps1
-
-
Revert the Execution Policy to the Original
-
After running the script, it is recommended to revert the execution policy to its original state. If you do not know the original policy, it's commonly set to Restricted. Execute the following command to revert:
Set-ExecutionPolicy -ExecutionPolicy Restricted
-
Again, you may be prompted to confirm the change. Type
Yand pressEnter.
-
- Make sure to verify the script's source and ensure it's safe before running it.