If you have an old fileserver name that you want to retain on your new server or simply would like to add a new name to your fileserver, these two lines of code might help you.
NETDOM COMPUTERNAME oldFileServerName /ADD newFileServer.contoso.local
ipconfig /registerdns
DNS CNAME is not needed, the computer account is going to add the entry in Windows DNS by itself.
References:
Reading time: 1 min