Solved

change username using command line

Posted on 2009-04-08
2
977 Views
Last Modified: 2013-12-28
Does any know how to change the username on a computer using comming line, I am trying to change the Guest username one 150 PC.
0
Comment
Question by:woodall01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 250 total points
ID: 24098115
There is no "net user rename" command.  but I found this here on EE.

http://www.experts-exchange.com/Programming/Misc/Q_22031500.html

It points to the following VBScript code which appears to do what you desire.
' This code renames a local account.
' ---------------------------------------------------------------
' From the book "Windows Server Cookbook" by Robbie Allen
' ISBN: 0-596-00633-0
' ---------------------------------------------------------------
 
' ------ SCRIPT CONFIGURATION ------
strComputer = "<ServerName>"   ' e.g. srv01
strOldName = "<OldName>"       ' e.g. Guest
strNewName = "<NewName>"       ' e.g. RallencorpGuest
' ------ END CONFIGURATION ---------
set objComp = GetObject("WinNT://" & strComputer)
set objUser = GetObject("WinNT://" & strComputer & "/" & strOldName & ",user")
set objNewUser = objComp.MoveHere(objUser.ADsPath, strNewName)
WScript.Echo "Successfully renamed account"

Open in new window

0
 
LVL 5

Expert Comment

by:wpathan
ID: 24098190
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
An article on effective troubleshooting
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question