

| Remotely Rename Domain PC |
|
|
|
|
A task as simple as renaming a Domain PC remotely would seem like a simple task. For whatever reason, there is really no good way of doing this. After searching through various scripts to do this job, I finally found a pretty good way of doing this. All it requires is a little vb script and netdom.exe from the Windows Support Tools. First off, you will need to download the Windows XP Support tools from here Install the support tools to the default path. After it is installed, we are going to create a vb script. COPY EVERYTHING BELOW THIS LINE 'open the file system object Dim sNewCname 'Variable to hold Computer Name you enter in the inputbox 'First param is message text, second is message title Call WSHShell.Run("cmd.exe /K netdom renamecomputer " & sOldCname & " /newname:" & sNewCname & " /userd:DOMAIN\ADMINISTRATOR /passwordd:PASSWORD /usero:DOMAIN\ADMINISTRATOR /passwordo:PASSWORD /force ") ----------------------------------------------------------------------------------------- After you copy and paste the text into notepad, replace the capitalized text on the last line to fit your network. For the password fields, if you do not want to store passwords in clear text in the vbs file, replace PASSWORD with *. Save the file as Remotely_Change_Computername.vbs and save it in a location you will remember. When you run the script it will prompt you for the current computername, type in the current computer name and press enter. Note: You can just run the netdom.exe file from the command line using netdom.exe renamecomputer OldName /NewName /userd:DOMAIN\ADMINISTRATOR /passwordd:PASSWORD /usero:DOMAIN\ADMINISTRATOR /passwordo:PASSWORD /force NOTE: THIS INFORMATION IS PROVIDED "AS IS" WITH NO WARRANTIES EXPRESSED OR IMPLIED.
Advertisements
|










