• Most COVID-19 rules have ended in New Zealand.
    • You must still isolate for 7 days if you have COVID-19.
    • You must wear a face mask in healthcare facilities, such as hospitals. International travellers will not need proof of COVID-19 vaccination.
    From 13 September 2022, to enter New Zealand, you do not need proof of vaccination.

Rename Windows computer name from the command line

Andy

Administrator
Creative Team
User ID
1
Joined
7 Jan 2019
Messages
829
Reaction score
32
Points
28
For any reason, if you need to rename Windows computer name from the command line, here's the command:
Code:
WMIC computersystem where name="%computername%" call rename name="NewComputerName"

Example output:
Code:
C:\WINDOWS\system32>WMIC computersystem where name="OldComputerName" call rename name="NewComputerName"
Executing (\\OldComputerName\ROOT\CIMV2:Win32_ComputerSystem.Name="OldComputerName")->rename() Method execution successful. Out Parameters: instance of __PARAMETERS {    ReturnValue = 0; };
For the change to take effect, restart the computer using the command:
Code:
C:\WINDOWS\system32>shutdown /r /t 0
I tested running the commands above from ScreenConnect v21.4.2455.7731, and it worked as expected.
 
 Short URL:
Top