General discussion

  • Creator
  • #2188880

    command prompt to set IP


    by power computing inc. ·

    I was wondering if there is a way to perform a check to see if an IP address is in use on the network before setting an IP through a command prompt. I know the syntax of how to use netsh to set the IP using a command prompt. What I am attempting to do is configure Internet filtering for specific users based on their IP address so I created a script to set their IP address when they login to the PC. The problem I have exists with the fact that they also want to have roaming profiles so they can log into multiple PC’s and get the same desktop, favorites, etc. I could write a script when they logoff to set the IP to DHCP, but when I do that the PC doesn’t pull in the IP address fast enough and gives an error that it can’t save the profile data. My thought then proceeded to setting a different IP address when they logged off, but then when they logged off the second machine, they would again get an IP conflict. So now I’m trying to see if there is any way to perform a check if an IP is in use and then use the “if then” type statement such as if is in use, then , otherwise run “netsh interface ip set…”. Thank you for your assistance!

All Comments

  • Author
    • #3046434

      Reply To: command prompt to set IP

      by bart777 ·

      In reply to command prompt to set IP

      That’s a tough one.

      If the goal is just to impement IE filtering you might consider something like ISA server or possibly a Linux based setup for your proxy server. (Linux being cheaper of course)

      I’m not sure that what you are doing would work as the user moves around. As you keep resetting the IP’s on allof these machines you are bound to run into all sorts of conflict issues.

      Personally I would just use some sort of proxy server.

      Good luck

Viewing 0 reply threads