There are two ways for removing Windows defender the first is Via Group Policy the second via registry editor. lets start with the first:
To Turn Off Windows Defender using Group Policy
1. Press the windows key+R on your keyboard to open the Run window. There type “gpedit.msc” and click OK or press enter to open the Group Policy Editor window.
3. From the Group Policy Editor window on the left, navigate to the following location:
Computer Configuration/Administrative Templates/Windows Components/Windows Defender
4. Once there locate “Turn off Windows Defender” policy, then double click to edit. (see above screenshot)
5. To Turn Off Windows Defender check-mark Enabled, click on Apply then OK. (see screenshot below)
8. When finished, close the Local Group Policy Editor.