Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question is related to, but I'm in a different situation. The netdom tool will not work on a computer not joined to a domain. I've tried setting the hostname from the registry, but I was wondering if there was another way from the command-line.

share|improve this question

migrated from Jun 9 '10 at 19:06

This question came from our site for professional and enthusiast programmers.

Have you looked at the other solutions on that page? Assuming that they work all you'd need to do would be to copy the script to notepad, change the hostname in the script, save it as something.vbs and then run it. – ho1 Jun 9 '10 at 10:52
up vote 6 down vote accepted

Right from the link you provided:

wmic computersystem where name="OLDNAME" call rename name="NEWNAME"

Then reboot with

shutdown /r /t 0
share|improve this answer
How careless of me. Thanks for pointing that out! – Joe Jun 9 '10 at 23:28
@Joe - No prob! If this solves your problem, you can accept it by clicking the check box under the voting to the left of my answer. – MDMarra Jun 10 '10 at 1:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.