Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically change Computer Name 98/2K/XP

Status
Not open for further replies.

edushkushot

Programmer
Jan 11, 2004
15
US
Hi there,

I am looking to write a script that will change all the computer names in our Active Directory Domain. I am going to use a vbscript tied to a logon script, so I can determine the user and their group from there. I also found a cool utility called compname.exe.

But I need help getting started with accessing Active Directory Information from vbscript. Anyone do this before? Thanks in advance.

G :)
 
Yes, we did this when we rolled out XP. What we did was to use a script using the getmac utility in the resource kit and made a .txt file that had the MAC associated with the computer name, like:

00095B93C028=ComputerName

Then we manipulated this file and changed the old name to the new name. Then when we ran the final script it would parse this .txt file until it found its MAC, and then would use the Computer name specified. Not sure if this is what you were after. If not you could also look at the netdom utility. It will let you rename, as well as unjoin and rejoin the domain.

Z



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top