Another option is to enable "Smart App Control" this will permanently disable defender but you will only be able to run signed executables, and to turn it on you must have never run any unsigned executables in the past (or reformat your hard drive).
There's an app called DefenderControl that will disable it, as well, using various methods.
You can also install some other anti-virus software, but you can't make your own -- they need to be signed with a special key.
A fun bit of trivia: defender doesn't turn itself on until after the "out of box experience" is finished, under the rationale that users can't install any malware until they can use the computer. Thus you can run defender disabling scripts/programs from a customized installer without them getting nuked by defender.