Here are a few useful commands to use in the windows command line. Occasionally you may find these can save you some time.
Change computer name:
netdom renamecomputer %COMPUTERNAME% /newname:server_name /force /reboot:5
This will rename the machine and then reboot. You throw in the %COMPUTERNAME% variable so that you don't need to know the computer generated name windows gave it upon installation. netdom is used to manage a few things in windows, but primarily I think you'll find it being used for this sort of thing.
Enroll in a domain:
netdom /join /d:domain.local server_name /ud:administrator /pd:password /force /reboot:5
Once again netdom is used here. server_name needs to be the same name you set in the previous command. Some notes; /ud sets the username - don't prepend the domain name, it gets this from the domain you define in /d. You must also set the /pd - password - if you don't it appears to just send a blank password. Considering the fact that you must actually type the password in cleartext (and more likely put this into a script) you will probably want to create a temporary account used to enroll all of your PC's and then disable/delete the account.
No comments:
Post a Comment