在Windows 11中如何使用命令行更改计算机名称

从系统属性更改PC名称:

sysdm.cpl

使用命令行修改计算机名:

wmic computersystem where name="Old_Name" call rename name="New_Name"

输出示例:

Executing (\ALLWORKPC\ROOT\CIMV2:Win32_ComputerSystem.Name="ALLWORKPC")->rename()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
        ReturnValue = 0;
};

通过PowerShell更改计算机名:

Rename-Computer -NewName "AllWorkPC"
日期:2020-07-07 20:57:06 来源:oir作者:oir