Solved

Deactivating windows firewall with script

Posted on 2007-04-02
5
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

622 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