Reputation: 4305
How to change user account name using command prompt in win7? Maybe you tell me that it can be find easily by googling, but I searched and I did not find any working command.
Here is a command which seems to work, but unfortunately it is not working :(
wmic UserAccount where Name="OLDName" call Rename Name="NEWName"
Upvotes: 0
Views: 2305
Reputation: 3837
When I use this command line directly in PowerShell (Administrator), I got the following error:
PS C:\WINDOWS\system32> wmic useraccount where name="OLD" rename NEW
ERROR:
Description = Invalid query
But I called it successfully when I entered into wmic
:
PS C:\WINDOWS\system32> wmic
wmic:root\cli>useraccount where name="OLD" rename NEW
Upvotes: 1
Reputation: 1660
Shouldn't it just be:
wmic UserAccount where Name="OLDName" Rename "NEWName"
Upvotes: 1