Quick Fix: Reset Windows Firewall SBS & Windows Server Essentials
February 5, 2013 11 Comments
Whilst troubleshooting a problem on a server, have you ever reset Windows Firewall back to Defaults?
It would seem like a logical step in some cases, however it could have unexpected consequences.
Did you know you could export the policy from Windows Firewall?
Under Advanced Settings, You can right Click ‘Windows Firewall with Advanced Security’ and click ‘Export Policy’
Of course the reverse is true,and you can then Import a previously exported policy. An import will overwrite the existing policy.
This is all fine, however, if on an Essentials OS you happened to click ‘Restore Defaults’ you would have just wiped out a few custom rules, and disabled some other built-in ones.
But which? How to get them back? There is no function built in to do this. So you need to rely on having an existing Essentials server to compare with or phoning a friend.
Until now.
This is something i have thought should be included in the SBS Essentials and Windows Server 2012 Essentials OS for a long time.
After having this very question pop up in the forum recently i decided to set to work and write a script to restore the Essentials firewall customisations. You can download them from here:
SBS 2011 Essentials: http://gallery.technet.microsoft.com/SBS-2011-Essentials-Repair-cc339f45
Windows Server 2012 Essentials: http://gallery.technet.microsoft.com/Repair-Windows-Firewall-25814cce
Just open up a PowerShell window and run the script and your firewall will be magically repaired!
Good job!
good article – having a problem starting powershell in downloads – windows won’t allow me to write destination script 100% as you have done can you help please ?
Hi Robert thanks for the article – I am trying to follow it to the letter but can’t get the power shell to start in the same way you can – how can I get it the same as yours?
hmmm i cant get this to work for WSE 2012 R2. i get an error saying its for SBS 2011 Essentials only…yet i downloaded the WSE 2012 version.
help please!
ok so i worked out how to fix this script so it will run on WSE 2012 R2. this fixed my firewall too!
you need to change the name result filter of the OS so it will run. add the ‘R2’ into the name and you are good to go :)
Ill amend, not looked at this for a while.
thank you Robert. It would be good to have the settings verified that they are 100% correct for WSE 2012 R2…
Or even better would be a post of the exported firewall rules from a fresh WSE2012 R2 install :)
Is this still good for Server 2012 Essentials?
Yeah should be.
Do you have something similar for SBS2011?
Do you have something similar for Server 2016 for essentials dashboard?