Windows – How to assign Windows Firewall profiles to network interfaces from the command line

command linewindows firewallwindows-server-2008-r2

I would like to assign Windows Firewall's public profile to the public Ethernet interface and the private profile to the private Ethernet interface. I can do this with the GUI via

  1. Open Windows Firewall with Advanced Security
  2. Click on Windows Firewall Properties
  3. Click the Private Profile Tab
  4. Click Customize
  5. Select the Interface I want (private)
  6. Click OK
  7. Repeat step 3-6 for the public profile

How do I do this via command line? I'm using Windows Server 2008 R2

Best Answer

I'm afraid this GUI won't assign profiles to interfaces. It seems like it can only guarantee that certain profile won't apply to certain NIC when Windows thinks its network classifies as such profile. Mind the name of the PS parameter, "DisabledInterfaceAliases".

Related Question