[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1044
  • Last Modified:

Enabling Windows Firewall ports via batch files Any Windows os

Heyas,

Is their any batch file command that will enable windows firewall ports on the following operating systems Windows XP, Vista, Windows 7.

Thank you.
0
Zack
Asked:
Zack
1 Solution
 
Sushil SonawaneCommented:
You can enable ports through group policy also.

Please refer below link

(http://www.intelliadmin.com/index.php/2008/12/enable-file-and-printer-sharing-using-group-policy-2/)

(http://www.intelliadmin.com/index.php/2008/12/enable-file-and-printer-sharing-using-group-policy-2/)


Below script works on Win XP, 2000 and 2003
 
=======================================================
 
@ ECHO OFF
 
netsh firewall add allowedprogram Program.exe ProgramName ENABLE
 netsh firewall add portopening all 8888 Program-8888 enable
 netsh firewall add portopening all 9090 Program-9090 enable
0
 
ZackGeneral IT Goto GuyAuthor Commented:
Closest solution to what I was looking for.

Thank you.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now