netsh -r

G

Guest

I was hoping to use netsh -r to set firewall settings for a bunch of PC's in
a classroom in a script. However, when I connect to a machine using this
technique and enter the firewall command, I always get the following message.
"The following command not found - firewall.

On the other hand if I use RTS to connect to the same PC and then enter the
netsh command locally, the firewall command is accepted.

Is this a problem or is it by design? I was hoping to run a single script
from one PC to update the firewall settings on all the PC's in the classroom.
 
G

Guest

Mark:

Try remotely executing the netsh command.
www.sysinternals.com
download utilty suite, pstools.
use psexec with the -u and -p switches.
for example
psexec -u <UserWithAdminRights> -p <AdminPassword> \\<remotePC> netsh ....
That is the equivalent of executing the netsh command locally.
It is transparent to the user and easily facilitates scripting.

Good luck
 
R

Rodders

Good answer and if you use the @file option with a list
of the computers it will go off and do the lot for you :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top