G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

Hi. Has anyone figured out a way of renaming multiple pc's in an active
directory domain? I have approximately 400 machines in different OU's that
need to conform to the new naming convention we are implementing. I have
found some scripts on how to rename a computer name and some scripts on
renaming the actual account in AD but I have not been able to combine the two
and to create a script that can rename the pc as well as it's account in AD.
Any help would be greatly appreciated.

Thanks,

Morne
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

Morne wrote:
> Hi. Has anyone figured out a way of renaming multiple pc's in an
> active directory domain? I have approximately 400 machines in
> different OU's that need to conform to the new naming convention we
> are implementing. I have found some scripts on how to rename a
> computer name and some scripts on renaming the actual account in AD
> but I have not been able to combine the two and to create a script
> that can rename the pc as well as it's account in AD. Any help would
> be greatly appreciated.

In the future - if you feel you must post to multiple newsgroups -
CROSSPOST - don't multi-post.

As I answered in microsoft.public.windowsxp.setup_deployment:

The command netdom can rename a computer in an AD environment.
All you need to do is create a simple script.

For example, the following (if put in a batch script) would accept the old
computer name, new computer name, administrator username and password and
rename the "old computer name" to the new computer name.

netdom renamecomputer %1 /newname:%2 /userD:YOURDOMAIN\%3 /passwordD:%4
/userO:YOURDOMAIN\%3 /passwordO:%4 /force /reboot:60

In other words - if you put the above line (if it split, it is supposed to
be one single line) and replaced "YOURDOMAIN" with your actual domain name
and saved it as "rendompc.bat" - then when you called the script (for
example) - you would call it like this:

rendompc.bat OldPCName1 NewPCName1 administrator P455w0rd

The OldPCName1 would be renamed to NewPCName1 and rebooted after 60 seconds.
The name of the system and the name in active directory would be changed.

This works with Windows XP for sure - I don't THINK it would work with
Windows 2000 - but cannot recall.

You can create a script that contained the Old names, New names, username
and password for all the machines and run it.. Or have a list it reads
from - that would be better.

--
<- Shenan ->
--
The information is provided "as is", it is suggested you research for
yourself before you take any advice - you are the one ultimately
responsible for your actions/problems/solutions. Know what you are
getting into before you jump in with both feet.