|
Answer» Firstly I have had a good LOOK through these forums, I found a heap of stuff that was interesting but nothing quite like what I need.
Firstly the set up is one server with Windows Server 03 on it, then 6 (for now) client machines all running XP PRO SP2. The script needs to run entirely from the client machine.. The tasks it needs to execute in order are;
1- prompt for a computer name to REMOVE from AD on the server 2- Add a specific computer name to AD on the server 3 - Prompt for a new computer name for the client machine, add this new name to the domain, then reboot I would then have a simple bat file "IPCONFIG /registerdns" that runs from the startup on boot which should update the dns on the server with the new details.
I'm currently able to partially do this but with different bat files and a vbs on the server. The current process is, I remote desktop to the server, then run a vbs file which prompts for a computer name to delete from the AD (I have to manually add the other name into AD) Then back on the client machine run the .bat file which adds a computer to AD on the server, prompts for new computer name for the local machine, adds this to the domain and reboots.
The batch file I'm using for the rename, join & reboot process is below.
Quote netdom add /d:domain.local computername set /p newname="newname: " netdom renamecomputer %computername% /newname:%newname% /userd:domainadmin /passwordd:domainpassword /usero:localadmin /passwordo:localpassword /reboot:05 All I need at this point to MAKE it work is a bat file that can prompt for a computer name to remove from AD on the server. My knowledge is fairly limited on batch files so PLEASE be gentle, but any and all help or ideas are appreciated.
|