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:

https://learn.microsoft.com/en-us/archive/blogs/josebda/multiple-names-for-one-computer-consolidate-your-smb-file-servers-without-breaking-unc-pathshttps://learn.microsoft.com/en-us/archive/blogs/josebda/multiple-names-for-one-computer-consolidate-your-smb-file-servers-without-breaking-unc-paths