Solved

Deactivating windows firewall with script

Posted on 2007-04-02
5
298 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
Comment Utility
Place this in a batch file:

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

Expert Comment

by:sirbounty
Comment Utility
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
Comment Utility
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
Comment Utility
Wow -  perfect -  the last solution is exactly what I need -  you are THE MAN -  thanks much
0
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
Happy to help - thanx for the grade! :^)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When you receive another warning that your shared drive is almost full and you have asked your users to clean out old files again and again, here is a single command that may help. This command will place all the files that have not been used rec…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

6 Experts available now in Live!

Get 1:1 Help Now