Disassembler0 / Win10-Initial-Setup-Script

PowerShell script for automation of routine tasks done after fresh installations of Windows 10 / Server 2016 / Server 2019
MIT License
4.7k stars 1.08k forks source link

Disable Domain Firewall #339

Open Moe1369 opened 4 years ago

Moe1369 commented 4 years ago

Just noticed that the StandardProfile regkey only disables the firewall in private and public scope. It is possible to create a Key named "DomainProfile" under HKLM:\Software\Policies\Microsoft\WindowsFirewall\DomainProfile

Should look something like this:

If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile")) {
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" -Force | Out-Null
}
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfile" -Name "EnableFirewall" -Type DWord -Value 0
}
E3V3A commented 4 years ago

Good and important observation. Perhaps @Disassembler0 can provide a quick fix for this.