Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - Command Prompt - Windows 11, 10, etc. ► ««« »»»

Change the workgroup / PC name using the command prompt or PowerShell!


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!
2.) ... Change the PC name with PowerShell!
3.) ... Change the workgroup name using the command prompt!
4.) ... Change the workgroup name with PowerShell!
5.) ... information and tips on the PC name and work group!



Classic solution: ►► Change  PC name and group !

1.) Change the PC name using the command prompt!

1. Start ► the command prompt in admin mode

2. To query the computer name, simply use hostname as the command
PS: To easily change your computer name, provided you know the current computer name.

3. Now simply rename by command:
wmci computersystem where caption='my_pc_name' call rename new_pc_name
or better:
wmic computersystem where name="%COMPUTERNAME%" call rename name="NEW-NAME"

(... see Image-1 Point 1 to 3) 

PS:
Replace my_pc_name with your current computer name and new_pc_name with your desired new computer name. The example here is on a classic MS Windows 10/11 home computer, but as mentioned it works on all MS Windows systems!

(Image-1) Change the PC-Name using the command prompt!
Change the PC-Name using the command prompt!

-
▲ Back to the top ▲




2.) Change the PC name with PowerShell!

1. Open PowerShell as administrator

2. 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!



(Image-2) Change the PC-Name using the PowerShell!
Change the PC-Name using the PowerShell!

-
▲ Back to the top ▲



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>





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.
 

(Image-4) Change workgroups from the PC using PowerShell!
Change workgroup from PC using PowerShell!


-
▲ Back to the top ▲

 

5.) information and tips on the PC name and work group!


You don't need a huge step-by-step guide to complete this simple task, once you've done it you'll get the hang of it! The PC name and workgroup are used for better identification. Previously, the workgroup had a much larger role than it does on current Windows 11 and Windows 10 PCs.


The PC name should of course be chosen so that the PC can be identified with it, for example "PC-living room-1"!

►► Change Windows 10/11 computer name and workgroup, but how?





FAQ 91: Updated on: 26 August 2023 10:48 Windows
Windows-Console

Is my Windows User a Microsoft Account or a Local command line query!


It is practical and easy to determine from the command line in PowerShell: whether there is a Microsoft Account or is a Local Account on Windows 11, 10,
Windows-Console

Query the Mac address via the command line (CMD)!


You can find out the mac address physical address of a computer with the getmac command on MS Windows 11, 10, etc. This can also be used to get the
Windows-Console

Find out the computer name via the command prompt or Powershell!


Its easy to find out the computer name using the command prompt or Powershell commands on Windows 11, 10, etc. You can determine your computer name
Windows-Console

Understand the shutdown command under MS Windows!


The Shutdown command under MS Windows 11, 10, . + MS Server is one of the most popular PC shutdown or restart command lines To use the command line,
Windows-Console

Activate and deactivate Remote Desktop via command line!


Its easy to enable and disable Remote Desktop from the command line on MS Windows 11, 10, etc. and Server OS The remote desktop can be turned off,
Windows-Console

Find out with PowerShell what is preventing shutdown and standby!


It is easy to find out with PowerShell which app or program is preventing shutdown, standby or hibernation on Windows 11, 10, etc. With all Microsoft
Windows-Console

Delete partition with Diskpart under Windows 11, 10, ... and MS Server!


It is easy to delete a partition with Diskpart on all Windows 11, 10, Desktop and MS Server 2022, 2019, operating systems Contents: 1. Deleting

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: windows, 11, 10, console, change, workgroup, name, using, command, prompt, powershell, server, often, used, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + IsMyLcdOK
  + DesktopDigitalClock
  + ClassicDesktopClock
  + PreventTurnOff
  + QuickMemoryTestOK
  + IsMyHdOK
  + AutoPowerOptionsOK
  + OneLoupe
  + TraceRouteOK
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► Number of PCs where I can install Windows 12 with one license key? ◄
► Delete Amazon article "last viewed in history"! ◄
► Download Windows Server 2012 R2 x64 and test it! ◄
► How to enable the password prompt for screen saver in Windows 8.1 (disable, turn off, turn on)? ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....