When replacing a file server with new server and new name you probably want to keep the old name and add a redirect. Originally, I thought this was a simple “change the DNS IP” and job done but there’s a little bit more to it than just that!
1) Locate OLDSERVER entry in DNS and delete it.
2) If the OLDSERVER server AD object still exists, you need to delete it. Failing to remove the old computer object will result in this error:
Unable to add NEWSERVER.
as an alternate name for the computer.
The error is: Cannot create a file when that file already exists.
The command failed to complete successfully.
3) Run this command to add the server alias:
netdom computername NEWSERVER /add:OLDSERVER
Note: if you have subdomains in use (sub.domain.com) then you need to specifically define this overwise the object will add “oldserver.domain.com” rather than “oldserver.sub.domain.com”
4) Register the machine in DNS
5) Run this command to check the aliases are shown on the machine
netdom computername NEWSERVER /enum
6) Final check to show what SPF entries have been created:
setspn -l NEWSERVER
Original Post: https://blogs.technet.microsoft.com/askpfeplat/2017/06/19/using-computer-name-aliases-in-place-of-dns-cname-records/