Avatar of IT CAMPER
IT CAMPERFlag for United States of America

asked on 

Script or batch to turn off or tweak windows settings

I need a script or batch that I can run on Windows 7/8/2003/2008 that will do the following...

Turn off and disable Windows firewall

Adjust 'balanced' power options to turn off display after 30 mins and put the computer to sleep 'never', when plugged in.
VB ScriptWindows BatchScripting Languages

Avatar of undefined
Last Comment
IT CAMPER
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

They all sound like things that you'd do through Group Policy - are these devices not on a AD domain?
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of IT CAMPER
IT CAMPER
Flag of United States of America image

ASKER

This will be used on standalone systems, so local GPO would work okay, but I am looking to automate these steps.

Lee, the batch tweaks the power options ok, but the firewall is not changing its state to disabled and the service is not stopping.  Do I need to insert something into your batch?
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Run the netsh command separately and check for errors.  Review the event logs.  I just tested that command and its working fine.
Avatar of IT CAMPER
IT CAMPER
Flag of United States of America image

ASKER

You were correct.  Thanks!
VB Script
VB Script

VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic, but with some important differences. VBScript is commonly used for automating administrative and other tasks in Windows operating systems (by means of the Windows Script Host) and for server-side scripting in ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.

39K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo