×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Remotely Rename Windows 10 System

Remotely Rename Windows 10 System

Remotely Rename Windows 10 System

(OP)
I need a way to remotely rename a Windows 10 computer after it has been freshly imaged. Windows is assigning a default name (ie: WINDOWS-34JDR8E) and I'd like to be able to run a VBScript that asks for the current name of the system (ie: WINDOWS-34JDR8E), asks for the new name (ie: NEW-NAME), and successfully renames the computer without having to manually log into the computer and manually rename it.

I searched around a lot and the only thing I could find that indicated it worked in Windows 10 was a batch file used to run a WMIC command (ie: wmic /node:"oldname" computersystem where caption="oldname" call rename name="newname" username="administrator" password="adminpassword"). The command returns a value of 0 (zero) when successful but more often then not returns 1312, which basically means it didn't work.

Has anyone got any magic up their sleeves that will work to remotely rename a Windows 10 computer on a domain?

RE: Remotely Rename Windows 10 System

This can be done with WinRM and PowerShell.

Just my $.02

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg

RE: Remotely Rename Windows 10 System

(OP)
gbaughma: What is the syntax of the command?

RE: Remotely Rename Windows 10 System

You have to make a powershell connection to the computer to be renamed, then it's:

Rename-Computer -ComputerName oldname -NewName newname -SomainCredential domain\login -Force -Restart

Just my $.02

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg

RE: Remotely Rename Windows 10 System

Greg:
If there is a PowerShell solution to a vbscript question, please direct people to the PowerShell forum and post the solution there.
forum1619: PowerShell (Microsoft)

RE: Remotely Rename Windows 10 System

Oops.... my bad. Just responded to the question, and wasn't paying attention to the forum.

Just my $.02

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close