Changing workgroup or PC name using Command Prompt or PowerShell is om MS Windows 11, 10, ... and MS Server OS!Is not impossible either, this is often used by Microsoft server administrators under Web Server 2022, 2019, 2016, ..., why shouldn't you test and use it as a standard user under Windows 11, 10, 8.1, ... if it there is already the possibility ► to change the PC name and the group in a different way! Contents:
1.) ... Change the PC name using the command prompt!
|
(Image-1) Change the PC-Name using the command prompt! |
![]() |

2.) Change the PC name with PowerShell!
1. Open PowerShell as administrator2. And execute the following command:
Rename-Computer New-PC-Name
(... see Image-2 Point 1 to 3)
Tip:
With $env:COMPUTERNAME you can query the current PC name on all Microsoft operating systems, regardless of whether it is an MS Server 2022, 2019, ... or a simple MS Windows 11, 10 Home! Use your new PC name instead of New-PC-Name!
With $env:COMPUTERNAME you can query the current PC name on all Microsoft operating systems, regardless of whether it is an MS Server 2022, 2019, ... or a simple MS Windows 11, 10 Home! Use your new PC name instead of New-PC-Name!
(Image-2) Change the PC-Name using the PowerShell! |
![]() |

3.) Change the workgroup name using the command prompt on Windows 11, 10, ...!
1. Start ► the command prompt in admin mode
2. And execute the command:
Microsoft Windows [Version 10.0.22000.120]
(c) Microsoft Corporation. All rights reserved.
C:\Windows\system32>wmic computersystem where name="%computername%" call joindomainorworkgroup name="The Group"
Executing (\\SOFTWAREOK-PC11\ROOT\CIMV2:Win32_ComputerSystem.Name="SOFTWAREOK-PC11")->joindomainorworkgroup()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
ReturnValue = 0;
};
C:\Windows\system32>
2. And execute the command:
Microsoft Windows [Version 10.0.22000.120]
(c) Microsoft Corporation. All rights reserved.
C:\Windows\system32>wmic computersystem where name="%computername%" call joindomainorworkgroup name="The Group"
Executing (\\SOFTWAREOK-PC11\ROOT\CIMV2:Win32_ComputerSystem.Name="SOFTWAREOK-PC11")->joindomainorworkgroup()
Method execution successful.
Out Parameters:
instance of __PARAMETERS
{
ReturnValue = 0;
};
C:\Windows\system32>
The easy Solution for all MS Windows and Server OS to change workgroup
4.) Change the workgroup name with PowerShell on Windows 11, 10, ...!
1. Open ►► PowerShell as administrator
2. And execute the following command.
Add-Computer -WorkGroupName "Workgroup Name"
Replace "Workgroup Name" with the actual name of the workgroup you want to join.
2. And execute the following command.
Add-Computer -WorkGroupName "Workgroup Name"
Replace "Workgroup Name" with the actual name of the workgroup you want to join.
FAQ 91: Updated on: 12 August 2021 18:40