Synssins shares a method for replacing an older Windows File Server with new, while keeping all shares and DNS intact:
- "Export [HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares] key from the registry. You want this key and everything under it.
- Detach the data disk (if a VM) and reattach it to the new server and assign the same drive letter, or robocopy the data from the legacy server to the new server into the same drive letter and folder path as the legacy server.
- Remove the legacy server from the domain and ensure the DNS record for it is gone. You'll want this DNS record pointing at the new server, and this will be done automagically in the next steps.
- Import the key, then run the netdom alias commands in an elevated PowerShell or Command Prompt.
It registers the DNS A record for the alias (legacy server name in this case), registers the additional SPNs, and adds the OptionalNames registry key. No more CNAMEs or manually modified SPNs.
netdom computername <COMPUTER> /add:<ALIAS>
Netdom computername NewFile01 /add:oldfile01.domainname.tld
You can repeat this command as many times as you need to for additional records.
More information can be found here.
Total downtime in a VMWare environment is less than five minutes, barring any DNS server replication in play."