How to uninstall and reinstall Windows Defender on Server 2019
- Login to Windows Server 2019 with administrator account.
- Right click Start and click Windows PowerShell (admin).
Uninstalling Windows Defender:
Uninstall-WindowsFeature -Name Windows-Defender
RESTART SERVER
Installing Windows Defender:
Install-WindowsFeature -Name Windows-Defender
RESTART SERVER
How to disable Windows Defender through the registry:
Start Server Manager og uninstall feature – Windows Defender.
How to disable Windows Defender through the registry:
This is a bit of lengthy process to disable Windows Defender:
Follow these steps to permanently disable Windows Defender through Registry.
1. Open Start, by clicking on the Windows logo on the bottom left of your screen.
2. Type “Regedit” in the search bar, and proceed by clicking on the Registry Editor with the blue icon. Click on yes when prompted by Windows.

3. The registry editor will open. On the left side, you’ll see different options. You need to locate to Microsoft Defenders location, by expanding the following:
- First, expand the “HKEY_LOCAL_MACHINE” folder by double-clicking on it.
- Next, expand the “SOFTWARE” folder.
- Scroll down and find the “Policies” folder and expand it.
- Expand the “Microsoft” folder.
- Next, click once on the “Windows Defender” folder.

4. Now, right-click on the “Microsoft Defender” folder and hover your cursor above “New.” A new menu will pop out. Proceed by clicking on “DWORD (32-bit) Value”.

5. A new file will appear on the right side with the option to name it. Enter “DisableAntiSpyware” as the name and hit Enter.

6. Next, double click on the newly created “DisableAntiSpyware” file.
7. Edit the value under “Value data:” as 1.

8. Press “Ok” on the bottom to save the value.
9. Finally, restart your system for the changes to take place. After restarting, the Microsoft Windows Defender will be disabled successfully.
If anytime you want to enable the Windows Defender again, follow these steps:
- Open the registry editor.
- Locate to the “Windows Defender.”
- Double click on “DisableAntiSpyware.”
- Edit the “Value Data” as 0, and click on Ok.
- Restart your system for the changes to take effect.
This method is a bit tricky and lengthy, but this will disable Windows Defender permanently. Restarting your computer will not enable the Defender again. Through this method, you can install any app and tweak any setting without the fear of Windows Defender interrupting in Windows 10. Your computer’s security will be compromised so make sure to enable the Defender again so your security stays active.