Page 1 of 1 1
Topic Options
#70797 - 2002-10-11 03:51 PM remotely rename a PC
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Has someone come up with a way to either script a local rename or a remote rename of a PC (NT domain, win2k clients)?

[ 11. October 2002, 15:51: Message edited by: Radimus ]
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#70798 - 2002-10-11 03:54 PM Re: remotely rename a PC
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Take a look at this solution: Script to Rename a PC Remotely and join it to a NT 4 Domain
_________________________
There are two types of vessels, submarines and targets.

Top
#70799 - 2002-10-11 03:56 PM Re: remotely rename a PC
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
beautiful...

Thanks
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#70800 - 2002-10-11 03:58 PM Re: remotely rename a PC
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
ohh... and keep your head down up there. It is pretty nervous up there now.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#70801 - 2002-10-11 04:02 PM Re: remotely rename a PC
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Not that easy me thinks,

found following entries in the registry holding my Computername :

HKEY_CURRENT_USER\Software\Microsoft\Windows Media\WMSDK\General\ComputerName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SchedulingAgent\OldName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\Checked Host Name

and many more !

Don't know if ammending the following will change them all [Confused]

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputerName\ComputerName

J.
_________________________



Top
#70802 - 2002-10-11 05:54 PM Re: remotely rename a PC
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
it worked fine, but:

it didn't remove the old machine acct
didn't set netlogon back to auto
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#70803 - 2002-10-12 07:07 AM Re: remotely rename a PC
Vig Offline
Starting to like KiXtart

Registered: 2001-11-14
Posts: 166
Loc: Saudi Arabia
Check out XP's netdom.exe.

code:
The syntax of this command is:
NETDOM RENAMECOMPUTER machine /NewName:new-name
/UserD:user [/PasswordD:[password | *]]
[/UserO:user [/PasswordO:[password | *]]]
[/Force]
[/REBoot[:Time in seconds]]

NETDOM RENAMECOMPUTER renames a computer that is joined to a domain. The
computer object in the domain is also renamed. Certain services, such as the
Certificate Authority, rely on a fixed machine name. If any services of this
type are running on the target computer, then a computer name change would
have an adverse impact.

machine is the name of the workstation, member server, or domain controller
to be renamed

/NewName Specifies the new name for the computer. Both the DNS host
label and the NetBIOS name are changed to new-name. If
new-name is longer than 15 characters, the NetBIOS name is
derived from the first 15 characters

/UserD User account used to make the connection with the domain
to which the computer is joined. This is a required parameter.
The domain can be specified as "/ud:domain\user". If domain is
omitted, then the computer's domain is assumed.

/PasswordD Password of the user account specified by /UserD. A * means
to prompt for the password

/UserO User account used to make the connection with the machine to
be renamed. If omitted, then the currently logged on user's
account is used. The user's domain can be specified as
"/uo:domain\user". If domain is omitted, then a local computer
account is assumed.

/PasswordO Password of the user account specified by /UserO. A * means
to prompt for the password

/Force As noted above, this command can adversely affect some services
running on the computer. The user will be prompted for
confirmation unless the /FORCE switch is specified.

/REBoot Specifies that the machine should be shutdown and automatically
rebooted after the Rename has completed. The number of seconds
before automatic shutdown can also be provided. Default is
30 seconds

NETDOM HELP command | MORE displays Help one screen at a time.
The command completed successfully.


Top
#70804 - 2002-10-12 09:24 AM Re: remotely rename a PC
LASAD Offline
Getting the hang of it

Registered: 2001-10-02
Posts: 60
Hi,

What if I have a list of PCs that I want to rename?.I was thinking of INI file that contains the old and new Name of each PC, but don't know how to apply it in this script!!.

Thanks

Sam

Top
#70805 - 2002-10-14 02:42 AM Re: remotely rename a PC
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Look up ReadProfilestring() in the KiXtart Manual for a way to read .INI files.
_________________________
There are two types of vessels, submarines and targets.

Top
#70806 - 2002-10-14 03:48 AM Re: remotely rename a PC
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
See also the FAQ

Topic: File Input/Output Primer
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1574 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.166 seconds in which 0.131 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org