Avatar of rxn6057
rxn6057

asked on 

Need help on changing subnet mast and gateway ip addresses on 30 servers remotely

can someone please point me to a utility tool I can use to change the gateway and subnet mask of over 30 servers. May somone has a script of some sort. I've been testing using netsh but I get the error below.

C:\>netsh -r 172.25.212.222 interface set address name="Local Area Connection"
source=static mask = 255.255.252 0 gateway=172.25.213.254 gwmetric=1

The following command was not found: interface set address "name=Local Area Conn
ection" source=static mask = 255.255.0 0 gateway=192.168.1.1 gwmetric=1.
TCP/IPMicrosoft Legacy OSNetwork Management

Avatar of undefined
Last Comment
jahboite
Avatar of TG Tran
TG Tran
Flag of United States of America image

The problem you have is trying to "netsh" to a remote machine.  If you to take this route, you need to remotely connect first with:
netsh -r <servername> -u <username> -p <password>

Once connected, you can then issue the rest of netsh commands.

Another route is to use psexec to connect and then execute netsh

Yet another method is to create a netsh config file for the server and store it on a network share, and execute:
netsh -r <servername> -f <\\sharename\configfile>
ASKER CERTIFIED SOLUTION
Avatar of jahboite
jahboite
Flag of United Kingdom of Great Britain and Northern Ireland 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
Microsoft Legacy OS
Microsoft Legacy OS

The Microsoft Legacy Operating System topic includes legacy versions of Microsoft operating systems prior to Windows 2000: All versions of MS-DOS and other versions developed for specific manufacturers and Windows 3/3.1, Windows 95 and Windows 98, plus any other Windows-related versions, and Windows Mobile.

55K
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