Question

Locked

netsh command static ip assign

By spesse ·
Hi I cant get this to work...
---------------------------
@echo off
SET /P IP= IPADRESS:
SET /P MASK= SUBNET:
SET /p GW= GATEWAY:
netsh interface ip set address "Local Area Connection" static %IP% %MASK% %GW%
pause
----------------------------
Why?? i would like to have a small batfile just doit..
aia have tryed with vbs very messy

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Try this:

by fwang In reply to netsh command static ip a ...

netsh interface ip set address local static IP Mask Gateway GWmetric

For example:
netsh interface ip set address local static 10.0.0.5 255.255.255.0 10.0.0.1 1

for gwmetric: The metric for the default gateway. This field should not be set if gateway is set to "none".

Collapse -

Does it works on Blade server

by pritam.patil In reply to netsh command static ip a ...

Does NETSH works on Blade server??

Back to Desktop Forum
3 total posts (Page 1 of 1)  

Hardware Forums