Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Renameing a windows 2000 machine via a script

18 views
Skip to first unread message

Joel Handler

unread,
Dec 10, 2003, 10:17:53 AM12/10/03
to
Does anyone know how you can rename a computer through a
script?

Thanks,
Joel

Torgeir Bakken (MVP)

unread,
Dec 10, 2003, 10:28:17 AM12/10/03
to
Joel Handler wrote:

> Does anyone know how you can rename a computer through a
> script?

Hi

Changing computer name for WNT/W2k/WXP with vbscript and registry writes,
alternatively with command line utility Compname.exe:

http://groups.google.com/groups?selm=3DBD6E02.F0D75A0%40hydro.com

Note that above methods will break any domain membership.

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


Mike Kolitz

unread,
Dec 10, 2003, 4:26:18 PM12/10/03
to
To keep domain memberships, you'll need a tool called NetDom.
Once you've got it, the syntax is something similar to:

netdom renamecomputer %computername% /newname:<new name> /userd:<userID>
/passwordd:<password> /force /verbose /reboot:<time limit>

*NOTE: "/passwordd" is not a typo.
--
Mike Kolitz MCSE 2000
MS-MVP - Windows Setup and Deployment

Remember to check Windows Update often,
and apply the patches marked as Critical!
http://windowsupdate.microsoft.com

"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:3FD73B91...@hydro.com...

Torgeir Bakken (MVP)

unread,
Dec 10, 2003, 4:52:29 PM12/10/03
to
Mike Kolitz wrote:

> To keep domain memberships, you'll need a tool called NetDom.
> Once you've got it, the syntax is something similar to:
>
> netdom renamecomputer %computername% /newname:<new name> /userd:<userID>
> /passwordd:<password> /force /verbose /reboot:<time limit>

Hi

That is for the netdom.exe that comes with "Support Tools" for Windows XP, and
it will not work on a Windows 2000 computer as the OP wanted. It will err with
the message "The procedure entry point NetAddAlternateComputerName could not be
located in the dynamic link library NETAPI32.dll." if you try it on a Win2k
computer.

The netdom.exe that comes with "Support Tools" for Windows 2000 does not
support the parameter renamecomputer.

Mike Kolitz

unread,
Dec 10, 2003, 6:16:38 PM12/10/03
to
Hi Torgeir,

We're rolling out Windows 2000 right now, and that's the technique that we
use to rename the PCs. After your comment, I decided to check out why this
is working for us...

It looks like one of the consultants who helped us design our build process
nabbed the NETDOM.EXE from a beta build of Windows Server 2003.

I've just confirmed that the release version of Windows Server 2003's
NETDOM.EXE (5.2.3790) does work on Windows 2000.

Sorry for the bit of misinformation. It was news to me, too! :)

--
Mike Kolitz MCSE 2000
MS-MVP - Windows Setup and Deployment

Remember to check Windows Update often,
and apply the patches marked as Critical!
http://windowsupdate.microsoft.com

"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message

news:3FD7959C...@hydro.com...

0 new messages