Windows Server · Oct 12th 2026 · 7 Min readHow to Change Server Name for Windows and Linux Server?
Your QuickBooks Enterprise server just joined a new domain, and every mapped drive, SQL connection string, and shared printer still points to the old machine name. Or you’re onboarding a new client’s server into your hosted environment and the name WIN-A3X7Q2 makes zero sense in six months. Either way, renaming the server is a two-minute task if you know the exact path — and a two-hour rollback if you skip the SQL metadata step.
This guide covers both Windows Server (GUI, PowerShell, and domain rename) and Linux, plus the one SQL Server cleanup step most walkthroughs skip entirely.
Before You Rename Anything
A few ground rules that will save you grief:
- Windows server names are limited to 15 characters. They can contain letters, numbers, and hyphens. They cannot contain
/ : * ? " |, and a period cannot be the first character. - Write down the old name. SQL Server, mapped drives, and any software license tied to the hostname will need updating.
- Plan for a restart. The new name does not take effect until the server reboots — you cannot avoid it.
- Domain-joined servers need extra steps. Use
netdom renamecomputer(covered below) rather than the GUI alone, or the domain account gets orphaned.
Change Server Name on Windows: GUI Method
This path works for standalone servers and is the same on Windows Server 2016, 2019, and 2022.
- Open Control Panel from the Start menu.
- Select System and Security, then click System.
- Under Computer name, domain, and workgroup settings, click Change settings.
- On the Computer Name tab of System Properties, click Change.
- Type the new server name in the Computer name field.
- If prompted about the DNS suffix, click More and update it if needed, then click OK.
- Click OK on the confirmation dialog. Windows will tell you a restart is required.
- Restart the server. The new name is active once it comes back up.
Verify success: open a Command Prompt and run hostname. It should return your new name.
Change Server Name on Windows: PowerShell Method
PowerShell is faster when you’re managing multiple servers or working over a remote session without a full desktop.
Open an elevated PowerShell window and run:
“powershell Rename-Computer -NewName "NewServerName" -Restart “
The -Restart flag triggers the required reboot immediately. Drop that flag if you want to restart on your own schedule — the name change is staged and takes effect on the next reboot regardless.
For remote machines:
“powershell Rename-Computer -ComputerName "OldName" -NewName "NewName" -DomainCredential DOMAINAdmin -Restart “
Renaming a Domain-Joined Server
If the server is a member of an Active Directory domain, use netdom renamecomputer from an elevated Command Prompt instead of the GUI or PowerShell alone. This renames both the machine and its corresponding domain account in one step:
“cmd netdom renamecomputer %computername% /NewName:NewServerName /UserD:DOMAINAdmin /PasswordD:* /Force “
You’ll be prompted for the password. A restart is still required after this command. Skipping netdom and using only System Properties on a domain member can leave a stale account object in AD — not a disaster, but messy to clean up.
The SQL Server Step Everyone Skips
If SQL Server is installed on the renamed machine — which it is if you’re running QuickBooks Enterprise with a dedicated SQL backend — you must update SQL’s internal metadata. Microsoft is clear that you do not rerun SQL Setup. Instead:
- Connect to the SQL instance using the old name (while still logged in post-reboot, SQL accepts connections via old metadata briefly) or use
localhost. - Run the following in SSMS or
sqlcmd:
“sql EXEC sp_dropserver 'OldServerName'; GO EXEC sp_addserver 'NewServerName', local; GO “
- Restart the SQL Server service.
After the service restarts, SELECT @@SERVERNAME returns the new name, and QuickBooks or any other application connecting by server name will resolve correctly Microsoft.
Skip this step and you’ll get cryptic SQL connectivity errors the next time a multi-user QuickBooks session tries to attach.
Change Server Name on Linux
Linux distributions vary slightly, but the two-step pattern is consistent across Ubuntu, CentOS, RHEL, and Debian.
Step 1 — Check the current hostname:
“bash hostname “
Or for the fully qualified version:
“bash hostnamectl status “
Step 2 — Set the new hostname:
On systemd-based systems (Ubuntu 16+, CentOS 7+, RHEL 7+):
“bash sudo hostnamectl set-hostname newservername “
This writes to /etc/hostname automatically. No reboot required for the command to register, but active shell sessions still show the old name until you open a new terminal or reboot.
Step 3 — Update /etc/hosts:
Open /etc/hosts in your editor of choice:
“bash sudo nano /etc/hosts “
Find the line referencing the old hostname (usually mapped to 127.0.1.1) and replace it with the new name. Save and exit.
Step 4 — Verify:
“bash hostnamectl status “
The Static hostname field should show your new name. A full reboot confirms the change persists across restarts.
> Heads up for RHEL/CentOS 6 and older: hostnamectl is not available. Edit /etc/sysconfig/network directly and change the HOSTNAME= line, then run hostname newservername for an immediate (non-persistent) change and reboot to make it permanent.
How Sagenext Helps
Managing server infrastructure on top of running an accounting practice is exactly the kind of overhead that kills billable time. hosts QuickBooks Desktop, QuickBooks Enterprise, Sage 50, Lacerte, Drake, ProSeries, UltraTax, and other tax and accounting applications on fully managed cloud servers.
With Sagenext, provisioning, OS-level configuration changes (including renaming and domain management), data backups, security patching, and software updates are handled by the support team — not by you or a staff member spending an afternoon on a server rename that cascades into a SQL connectivity issue. Your CPAs get multi-user access from any location via remote desktop, and the underlying server work stays off your plate. There’s a free trial available with no credit card required if you want to test the environment before committing.
Key Takeaways
- Windows server names max out at 15 characters and cannot contain
/ : * ? " |. - The GUI path (System Properties → Computer Name → Change) and
Rename-ComputerPowerShell cmdlet both require a server restart to apply. - Domain-joined servers must use
netdom renamecomputerfrom an elevated prompt to avoid orphaning the AD account. - SQL Server instances need
sp_dropserver/sp_addservermetadata updates plus a service restart after the host is renamed — no Setup rerun needed. - On Linux,
hostnamectl set-hostnamehandles the change on systemd-based distros; also update/etc/hoststo keep name resolution consistent. - Always verify with
hostname(Windows/Linux) orSELECT @@SERVERNAME(SQL) before declaring the rename complete.
Frequently Asked Questions
Do I have to restart the server after renaming it on Windows?
Yes, always. Windows stages the name change and applies it only at reboot. There is no way to apply a Windows computer rename without restarting — the operating system needs the restart to update the registry, Kerberos tickets, and service principal names. Plan the restart during a maintenance window, especially if the server hosts a shared application like QuickBooks Enterprise.
Can I rename a Windows domain controller the same way?
No. Domain controllers require a different procedure using netdom computername (not renamecomputer) and involve adding a new DNS name, waiting for replication, and then removing the old name. Renaming a DC incorrectly can break Active Directory replication. The steps above apply to member servers and standalone servers only.
After renaming, QuickBooks can’t connect to the SQL server. What’s wrong?
QuickBooks Database Server Manager and the SQL instance still reference the old server name in metadata. Run sp_dropserver 'OldName' and sp_addserver 'NewName', local in SSMS, restart the SQL Server service, and then reopen QuickBooks. If the company file path also contained the server name, update that reference in QuickBooks as well. Microsoft Sql Server 2025 Guide
Does changing the Linux hostname require a reboot?
Not strictly. hostnamectl set-hostname takes effect immediately in new shell sessions without a reboot. However, some services cache the old hostname at startup and won’t reflect the change until restarted or until the machine reboots. For production servers, schedule a reboot to confirm the name persists and all services resolve correctly.
Will renaming the server affect my SSL certificates or remote desktop connections?
Potentially yes. SSL certificates issued to the old server name (common name or SAN) will no longer match. If you use an RDP certificate tied to the hostname, you may get a certificate warning on reconnect. Plan to reissue or update any certificates that reference the old name after the rename is complete.

