EricPelletier
asked on
How to reset domain computer account?
Hi experts,
I'm having some computers that lost the sychronisation with the domain. For Win2K I used netdom reset command and it worked fine but it doesn't on WinXP Pro computer.
Is there a way to resynch/reset computer account using a vbscript even if it is a Win2K or WinXP?
Our domain is Active Directory Native.
Our branches are across Canada so I need to do it remotly.
Thank you
Eric
I'm having some computers that lost the sychronisation with the domain. For Win2K I used netdom reset command and it worked fine but it doesn't on WinXP Pro computer.
Is there a way to resynch/reset computer account using a vbscript even if it is a Win2K or WinXP?
Our domain is Active Directory Native.
Our branches are across Canada so I need to do it remotly.
Thank you
Eric
it should work fine on xp as well. Did you have any errors?
ASKER
Yes, I got access denied. But I'm using it exactly the same way as Win2K and the credentials are good.
It is documented on Microsoft Web site as none working on XP pro. That is why I'm looking for something else.
It is documented on Microsoft Web site as none working on XP pro. That is why I'm looking for something else.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Place the following "" in a batch file. (without quotes) and name it renamePC.
"echo rename oldcomputername newcomputername yourusername
pause
netdom renamecomputer %1 /newname:%2 /userd:%3 /passwordd:* /usero:administrator /passwordo:* /REBoot"
Pre-requisite - For the Netdom utility to work, you need to install the Windows Support Tools from the XP SP2 cd at
D:\Support\Tools\setup.exe .
Run a Complete install or Custom and then select to install all items.
Run the renamePC.bat from a command prompt where you saved the batch file to.
If you saved it to C:\Netdom then you would do Start/Run/CMD enter. Then type CD Netdom.
From the C:\Netdom> prompt you would type "renamepc ComputerOLD-xp ComputerNEW-xp yourADusername" (without the quotes)
syntax:
renamePC [old PC name] [new PC name] [your user name] - (without the brackets)
example:
1. renamepc ComputerOLD-xp ComputerNEW-xp yourADusername
then Press any key to continue...
2. Type the password associated with the object user: (this is the PC local admin password)
If you type in the wrong password you get "Logon failure: unknown user name or bad password.
The command failed to complete successfully."
3. Then you should get a little NetDom pop-up windows asking you "Do you want to proceed (Y or N) ?" Click Yes
4. Type the password associated with the domain user: (your network login password with AD permissions to rename a computer)
This operation will rename the computer oldPCName to newPCName.
Certain services, such as the Certificate Authority, rely on a fixed machine name. If any services of this type are running on oldPCName,
then a computer name change would have an adverse impact.
The command completed successfully.
Here if you type in the wrong password you again get "Logon failure: unknown user name or bad password.
The command failed to complete successfull
"echo rename oldcomputername newcomputername yourusername
pause
netdom renamecomputer %1 /newname:%2 /userd:%3 /passwordd:* /usero:administrator /passwordo:* /REBoot"
Pre-requisite - For the Netdom utility to work, you need to install the Windows Support Tools from the XP SP2 cd at
D:\Support\Tools\setup.exe
Run a Complete install or Custom and then select to install all items.
Run the renamePC.bat from a command prompt where you saved the batch file to.
If you saved it to C:\Netdom then you would do Start/Run/CMD enter. Then type CD Netdom.
From the C:\Netdom> prompt you would type "renamepc ComputerOLD-xp ComputerNEW-xp yourADusername" (without the quotes)
syntax:
renamePC [old PC name] [new PC name] [your user name] - (without the brackets)
example:
1. renamepc ComputerOLD-xp ComputerNEW-xp yourADusername
then Press any key to continue...
2. Type the password associated with the object user: (this is the PC local admin password)
If you type in the wrong password you get "Logon failure: unknown user name or bad password.
The command failed to complete successfully."
3. Then you should get a little NetDom pop-up windows asking you "Do you want to proceed (Y or N) ?" Click Yes
4. Type the password associated with the domain user: (your network login password with AD permissions to rename a computer)
This operation will rename the computer oldPCName to newPCName.
Certain services, such as the Certificate Authority, rely on a fixed machine name. If any services of this type are running on oldPCName,
then a computer name change would have an adverse impact.
The command completed successfully.
Here if you type in the wrong password you again get "Logon failure: unknown user name or bad password.
The command failed to complete successfull