change IP address via command line
Results 1 to 2 of 2

Thread: change IP address via command line

  1. #1
    Join Date
    Mar 1999
    Location
    mpls
    Posts
    408

    change IP address via command line

    Anyone know how a user can change there IP address through a command line? Or a script? I have a user who goes to different offices with his laptop, and they are in different subnets. I'd love to have a script for him that he could just run which would allow an automatic change of his:

    IP address
    subnet mask
    default gateway

    (oh, and no DHCP)
    Thanks
    ...this one goes to 11...

  2. #2
    Join Date
    Mar 1999
    Location
    mpls
    Posts
    408
    Never mind, I found it. Here's how if anyone's interested:

    netsh interface ip set address "<connection name>" <static or dhcp> <ip address> <netmask> <gateway> <metric>

    Where connection name = local area connection, or local area connection 2, depending on the interface you want changed.

    Also, the metric is number of hops to the gateway, usually 1. I think this is an optional field.
    ...this one goes to 11...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •