Rename Windows Computer
Log In or Register to download the BES file, and more.

4 Votes


We can rename a windows computer from command line using WMIC computersystem command. Please see the command below

WMIC computersystem where caption='currentname' rename newname

Example: If the current computer name is XP-PC, to change it to Windows7-PC, we can run the below command.

wmic computersystem where caption='xp-pc' rename windows7-pc

After running the command, you need to reboot the computer to make the changes effective.

This command works on XP, Vista, Windows 7 and also on Server 2003 and Server 2008 editions.

Property Details

TitleRename Windows Computer
Download Size0
Source ID<Unspecified>
Source Severity<Unspecified>
Source Release Date1/30/2013 12:00:00 AM
KeywordsPRE command WMIC rename computer
Is TaskTrue
Added by on 1/30/2013 1:19:17 PM
Last Modified by on 1/30/2013 1:19:17 PM
Counters 12525 Views / 166 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 2 ratings. ** Log In or Register to add your rating.


isWindows (Relevance 274)
Used in 237 fixlets and 3 analyses   * Results in a true/false
Show indented relevance
name of operating system starts with "Win"
Used in 1 fixlet   * Results in a true/false
Show indented relevance
exists file "wmic.exe" of folder "wbem" of system folder


Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
//ask admin for name of new computer
action parameter query "newComputerName" with description "Please enter the new Computer Name (Ex: Daniel-PC):" and with default value ""
//use WMI to change the name
waithidden wmic computersystem where caption='{computer name as string}' call rename '{parameter "newComputerName" as string}'
continue if {exit code of action = 0}
//flag action as requiring a restart
action requires restart
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.

Action 2

Action Link Click here to Command Reference.
Script Type URL


Social Media:
Share this page on Yammer


Log In or Register to leave comments!
jgstew -
You are correct. There is also the possibility of setting the current computer name in a parameter and then checking that it doesn't match after reboot.
rdshift -
This fixlet should probably have the success criteria changed to: "...all lines of the action script have completed successfully."