Discussion Locked

Script for Active Directory - Machine ac

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I have a lot of machine names, collected in a text file, does anyone know of a script/batch job, which automatically add these to AD ??

Med venlig hilsen / Best Regards

John Garner
--------------------------------------------
MaerskData A/S, Server Based Solutions
Direct phone: +45 3910 2539
E-Mail: jog@maerskdata.dk
--------------------------------------------

2 replies

by beermonster

Hi,
I'm a bit unclear about exactly what you are trying to achieve. If, as you seem to be saying, you just want to add a machine account object for each name in your text file then you'll be left with nothing more than a set of 'empty' machine accounts that don't relate to any live machine on your network. If that is what you want then you can do this simply by running a script on your domain controller, that looks something like this -

For /F %%A in (c:\mytextfile.txt) do net computer \\%%A /add

note that that is all on one line. Your text file will need to list each computername (and JUST the computername) on a separate line. This same functionality was also available in NT 4. Hope this helps.......

by jog

I simply have to use the AD service as an adress book for another application, which use LDAP lookup. So I am searching for a script that can automatically add machine names to AD (approx 10000 machines), no user information is needed so this wiil not be added.

This discussion is closed to new replies.