command prompt to set IPLocked
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!