gparmar Posted October 24, 2005 Posted October 24, 2005 Hello,I have been looking out for a vb script which will assign a specific IP based on the MAC address it reads from a txt file.help me achieve this.any tools/how to/guides.thanks
oioldman Posted October 27, 2005 Posted October 27, 2005 I'd go wth hj_fr, use DHCP.Get the PC MAC address add it to DHCP reservations with your desired ip, and bingo all done
Yzöwl Posted October 27, 2005 Posted October 27, 2005 More information would also be of help to further responders.Have you just got a list of MAC Addresses, have you got a list of MAC Addresses each accompanied by a required IP Address and SubNet. etc.
cluberti Posted October 27, 2005 Posted October 27, 2005 Something like this vbscript will get you a PC's MAC address:' ----------'Dim objNetworkAdapters, objAdapter, objWMISet objWMI = NothingSet objWMI = GetObject("winmgmts:")' Get a list of IP-enabled adaptersSet objNetworkAdapters = objWMI.ExecQuery("select * from Win32_NetworkAdapterConfiguration where IPEnabled = 1")For Each objAdapter In objNetworkAdapters wscript.echo "Network adapter: " & objAdapter.Caption & " has MAC address " & objAdapter.MacAddress'' ----------What you do with that information is up to you , but at least you can now have the MAC address of each machine.
RogueSpear Posted October 28, 2005 Posted October 28, 2005 If you have so many computers that you need a script to do this, then that means you really should be running a DHCP server and using reservations. I know that reservations defeat half the purpose of DHCP, but still it's a hell of a lot easier to change a DNS server assignment on 100 workstations via DHCP than to physically visit each one (or even to script that out too).
gparmar Posted November 1, 2005 Author Posted November 1, 2005 thanks for all the replies. will try out DHCP reservtrions.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now