/build/static/layout/Breadcrumb_cap_w.png

Rename computer whilst in domain

Hi,

I have post install task to rename a PC whilst it's in the domain, unfortunately i can't get it to work. It's running following scripted install which itself joins the PC to the domain but with a random name. I would like to rename it to a unique number from a list. The following is what I have been using, any ideas on where i might be going wrong?

wsname.exe /RDF:namedb.dat /DFK:$MAC /rcid /user:domain\account /pass:password

Thanks!

0 Comments   [ + ] Show comments

Answers (4)

Posted by: ewagner 12 years ago
Orange Belt
1
Here's the command I use to accomplish the same thing:

netdom renamecomputer oldname /newname:newname /userd:DOMAIN\account /passwordd:password /Force

Perhaps you'll have better luck with NETDOM, versus WSNAME. NETDOM will accept variables as values, so you can easily incorporate it into a batch file to pipe in that unique number you want to use.

Comments:
  • I use netdom command and it gets the job done for what i need it to do - shigbee 12 years ago
Posted by: dchristian 12 years ago
Red Belt
0
Try adding this to the end of your command:
/LOGFILE:C:\name.txt
That way we can see what the exact error is.

Comments:
  • I would do this, or log in with the same account that ran WSname initially and look for WSname.log in %temp% - warmep 12 years ago
Posted by: Moedius 12 years ago
Blue Belt
0
Just a thought, if you havent tried something like this already - I've seen a similar issue in the past using deployment solution. The problem was identical though, a post build task to rename the workstation and re-add to the domain was failing, and while it's been some years and I dont recall the source of the problem, I do remember that it was related to timing, and we had to put a pause in prior to the task running to get it to work.
Posted by: WGM_Jeff 12 years ago
4th Degree Black Belt
0
That all looks right to me. It could possibly an issue with the namedb.bat file.

Comments:
  • Tried again manually from a command prompt window and it does work but for some reason as a Post Install task it doesn't and i'm not sure why.

    Created the post install task again, zipped wsname.exe and namedb.dat file and used the same command line as a new application task. Same problem. Any ideas? - amjreh 12 years ago
  • - ewagner 12 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ