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

  
HOME ► Faq ► FAQ - Windows cmd.exe Command-Prompt ► ««« »»»

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!



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 ▲

 


FAQ 91: Updated on: 12 August 2021 18:40 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 Windows 11, 10, etc. This can also be used to get the Mac
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
  + File management
  + Decoration and fun
  + Automation
  + Office
  + Order on the PC
  + PC testing tools

  + 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
  + ThisIsMyFile
  + TheAeroClock
  + CoronaKO
  + MatriX.CoronaKO
  + Find.Same.Images.OK
  + 3D.Benchmark.OK
  + PhotoResizerOK
  + Office.Files.Images
  + Film.Strip.Explorer
  + PAD-s


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

 © 2022 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu
0.061


► Where is MS Paint in Windows 10 / 11, how to find,  run, start? ◄ ► Top Secret and hidden Commands for Windows 11/10 Explorer! ◄ ► Can I remove the process killer from my new Windows 11 or 10? ◄ ► Change Windows Desktop Icon Size and View, plus save! ◄ ► Why should I donate, Donations are done by so many other users, or? ◄ ► Folder everybody permissions on Windows 10 (free for everyone)? ◄ ► Virus message TheAeroClock! ◄ ► Restart the MS Explorer in Windows 8.1 / 10 / 11 (Reset, Filemanager)! ◄
This website uses cookies to ensure you get the best experience on our website more Infos & Privacy Policy
....