Jump to content
RESET Forums (homeservershow.com)
Sign in to follow this  
Mr_Smartepants

[How-To] Change servername and workgroup after install (without breaking anything)

Recommended Posts

Mr_Smartepants

I couldn't find any mention of this specifically here so I thought I'd make a quick post.

Many have mentioned how to (incorrectly) change the workgroup name by removing the certificate services (which breaks the OS).

Here's how to do it in WHS2011 & Server 2012 Essentials (should work on others too) by using Powershell.

 

RDP into the server.

Open Powershell as an administrator

Type the following to change the workgroup name:

 

$SysInfo = Get-WmiObject Win32_ComputerSystem
$SysInfo.JoinDomainOrWorkgroup("NewWorkgroupName")
 

 

Type the following to change the server name:

 

$SysInfo = Get-WmiObject Win32_ComputerSystem
$SysInfo.Rename("NewServerName")
 

Changes take effect after rebooting the server.

 
Hope this helps someone else.
 
Edited by Mr_Smartepants
  • Like 1

Share this post


Link to post
Share on other sites
jmwills

Where "NewWorkGroupname" & "NewServername" are the new names you want to use......for those not accustomed to using PowerShell

Share this post


Link to post
Share on other sites
ikon

I have done this in the past using the certificate method and I haven't noticed any issues. However, what I did is remove the 2 certificate services, change the name and/or workgroup, reboot, and then re-enable the certificate services.

 

Are you saying there is an issue with this technique?

Share this post


Link to post
Share on other sites
Mr_Smartepants

Well, there are many other websites which have instructions on removing the certification authority "role" in order to change the names.  When I tried removing/adding the role I broke the entire server install and had to reinstall the OS.

I've never tried stopping the services.

Anyway, the powershell method is quick and painless and doesn't break anything.  I've done it multiple times in my testing with no harm done.

Edited by Mr_Smartepants

Share this post


Link to post
Share on other sites
ikon

My bad; I did remove the roles, change the name, then add the roles back again -- no issues that I know of, but I'm open learning about any I might have overlooked. That said, having the Powershell method published here makes it a great reference for the future.

Share this post


Link to post
Share on other sites
Joe_Miner

 

I couldn't find any mention of this specifically here so I thought I'd make a quick post.

Many have mentioned how to (incorrectly) change the workgroup name by removing the certificate services (which breaks the OS).

Here's how to do it in WHS2011 & Server 2012 Essentials (should work on others too) by using Powershell.

 

RDP into the server.

Open Powershell as an administrator

Type the following to change the workgroup name:

 

$SysInfo = Get-WmiObject Win32_ComputerSystem
$SysInfo.JoinDomainOrWorkgroup("NewWorkgroupName")
 

 

Type the following to change the server name:

 

$SysInfo = Get-WmiObject Win32_ComputerSystem
$SysInfo.Rename("NewServerName")
 

Changes take effect after rebooting the server.

 
Hope this helps someone else.
 

 

 

Very Cool!  Thank you Mr_Smartepants!  +1

Share this post


Link to post
Share on other sites
Mr_Smartepants

OK, well it seems that renaming the server (not the workgroup) somehow breaks the server backup function.

I don't know why.  It may be tied to the scheduler but the backup service is refusing to start on my WHS2011 testbed.

Share this post


Link to post
Share on other sites
ikon

That's an interesting result. Now I'm trying to remember if I've ever changed the server name or not. I know for sure I've changed the workgroup, and it has worked, but I'm not 100% certain I've changed the server's name.

Share this post


Link to post
Share on other sites
jmwills

Try changing both at the same time and see if it still works.

Share this post


Link to post
Share on other sites
jem101

Renaming the server may well have broken the back-end database features, I'm not sure how WHS handles backup catalogs but if you try to just rename a SQL server for instance all sorts of bad stuff happens.

 

For WHS renaming the workgroup only should be OK

 

The situation is different for 2012 Essentials if it is running as a domain controller and has the CA role installed on it - it is impossible to change the server name and/or the domain name without removing the role first and then re-adding it afterwards, doing so would break the certificate trust chain. And if you want to rename a DC I'd strongly advise you use the NETDOM command.

 

John 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  



×
×
  • Create New...