Tip: You can enable or disable the Windows Firewall :
Windows 8 / 2012 :
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
Earlier Windows :
netsh advfirewall set allprofiles state on
It can be useful for troubleshooting test for example to check id it’s firewall related issue.
Basic example:
1 2 3 4 5 6 7 8 9 |
function Enable-Firewall { Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True } function Disable-Firewall { Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False } |
Disabled
Enabled