Solved

Deactivating windows firewall with script

Posted on 2007-04-02
5
302 Views
Last Modified: 2010-04-16
Hello Experts,
Does anyone know of a way to deactivate windows firewall with script (batch, vbscript).
Or perhaps any other way to do it on all workstations in my network remotely (500 computers).
Thanks


0
Comment
Question by:lescluster
  • 4
5 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18838946
Place this in a batch file:

@echo off
sc config sharedaccess start= disabled
net stop sharedaccess
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18838961
If you're only looking to disable it, then you can do something like this if you have a list of computers...

For /f %%a in (C:\Computers.txt) do sc \\%%a config sharedaccess start= disabled

That will loop through all computers and disable the service...
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18838966
You could subsequently use psexec to stop the service too, if you're not opposed to using it...

For /f %%a in (C:\Computers.txt) do (
  sc \\%%a config sharedaccess start= disabled
  psexec \\%%a net stop sharedaccess
)
0
 

Author Comment

by:lescluster
ID: 18838994
Wow -  perfect -  the last solution is exactly what I need -  you are THE MAN -  thanks much
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18839009
Happy to help - thanx for the grade! :^)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

To setup a SonicWALL for policy based routing to be used with the Websense Content Gateway there are several steps that need to be completed. Below is a rough guide for accomplishing this. One thing of note is this guide is intended to assist in the…
I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now