1. Press Win + R, type gpedit.msc, and press Enter.
  2. Go to:
    Computer Configuration → Administrative Templates → Network → Network Connections → Windows Defender Firewall
  3. Select the required profile:
    Domain Profile, Private Profile, or Public Profile.
  4. Open the setting you want to modify (for example, firewall state or inbound/outbound rules).
  5. Set the option to Enabled or Disabled as needed.
  6. Click Apply, then OK.
  7. Restart the server or run gpupdate /force to apply the changes.