{"id":3590,"date":"2020-04-09T23:37:41","date_gmt":"2020-04-09T22:37:41","guid":{"rendered":"http:\/\/www.edwardsd.co.uk\/work\/?p=3590"},"modified":"2020-04-09T23:39:02","modified_gmt":"2020-04-09T22:39:02","slug":"adding-dns-alias-replacing-file-server","status":"publish","type":"post","link":"https:\/\/www.edwardsd.co.uk\/work\/2020\/04\/adding-dns-alias-replacing-file-server\/","title":{"rendered":"Adding DNS Alias | Replacing File Server"},"content":{"rendered":"<p>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 \u201cchange the DNS IP\u201d and job done but there\u2019s a little bit more to it than just that!<\/p>\n<p><strong>1) Locate OLDSERVER entry in DNS and delete it.<\/strong><\/p>\n<p><strong>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:<\/strong><\/p>\n<p style=\"padding-left: 40px;\"><em>Unable to add NEWSERVER.<\/em><br \/>\n<em>as an alternate name for the computer.<\/em><br \/>\n<em>The error is: <\/em><em>Cannot create a file when that file already exists.<\/em><br \/>\n<em>The command failed to complete successfully.<\/em><\/p>\n<p><strong>3) Run this command to add the server alias:<\/strong><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">netdom computername NEWSERVER \/add:OLDSERVER<\/pre>\n<p><strong>Note:<\/strong> if you have subdomains in use (sub.domain.com) then you need to specifically define this overwise the object will add \u201coldserver.domain.com\u201d rather than \u201coldserver.sub.domain.com\u201d<\/p>\n<p><strong>4) Register the machine in DNS<\/strong><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">IPConfig \/RegisterDNS<\/pre>\n<p><strong>5) Run this command to check the aliases are shown on the machine<\/strong><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">netdom computername NEWSERVER \/enum<\/pre>\n<p><strong>6) Final check to show what SPF entries have been created:<\/strong><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">setspn -l NEWSERVER<\/pre>\n<p><strong>Ref: <\/strong><span style=\"font-size: 1rem;\">https:\/\/support.microsoft.com\/en-gb\/help\/3181029\/smb-file-server-share-access-is-unsuccessful-through-dns-cname-alias<\/span><\/p>\n<p><strong>Netdom:<\/strong> https:\/\/docs.microsoft.com\/en-us\/previous-versions\/windows\/it-pro\/windows-server-2008-R2-and-2008\/cc835082(v=ws.10)<\/p>\n<p><strong>Original Post:<\/strong> https:\/\/blogs.technet.microsoft.com\/askpfeplat\/2017\/06\/19\/using-computer-name-aliases-in-place-of-dns-cname-records\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 \u201cchange the DNS IP\u201d and job done but there\u2019s a little bit more to it than just that! 1) Locate OLDSERVER entry in DNS and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[44,51,54],"tags":[],"class_list":["post-3590","post","type-post","status-publish","format-standard","hentry","category-windows-server-2012","category-windows-server-2016","category-windows-server-2019"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pOPt8-VU","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts\/3590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/comments?post=3590"}],"version-history":[{"count":9,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts\/3590\/revisions"}],"predecessor-version":[{"id":3624,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/posts\/3590\/revisions\/3624"}],"wp:attachment":[{"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/media?parent=3590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/categories?post=3590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.edwardsd.co.uk\/work\/wp-json\/wp\/v2\/tags?post=3590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}