Import Firewall Extract into GPO Using Script

shinga77

New member
Local time
1:54 PM
Messages
9
Good Day,


we are running a lot of Windows 7 based machines which are not on a Domain. I have a script to import the GPO's into the other machine as well as an extract of the firewall rules. I know hou to import this script into windows firewall using "netsh advfirewall", what I want to know is how I can import this into the group policy firewall with a script instead of the windows firewall.



If it is in GPO it makes it more difficult for the user to change or alter the firewall rules.
 

My Computer

Computer type
PC/Desktop
OS
ALL
I'm not familiar with using scripts to change GPO polices. Here's a whole bunch of Info. on it though. Group Policy Management Console Scripting Samples (Windows)

I don't know if a Windows firewall script would be compatible with group policy. If it's XML then the settings are most likely different in the script.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
It's a wfw file. You manually import it into group policy into firewall. But I can't find a way to do it with a script yet.
 

My Computer

Computer type
PC/Desktop
OS
ALL
As you've mentioned, the "netsh advfirewall import" can import a .wfw into the firewall policy and is 100% command line, hence scriptable.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
Correct, but that pulls the settings into the windows firewall based in control panel. We want it in the firewall section of group policies on gpedit
 

My Computer

Computer type
PC/Desktop
OS
ALL
Back
Top