{"id":9078,"date":"2025-07-31T10:43:31","date_gmt":"2025-07-31T10:43:31","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=9078"},"modified":"2025-07-31T10:43:33","modified_gmt":"2025-07-31T10:43:33","slug":"computer-renaming-but-not-updating-domain-controller-active-directory","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/computer-renaming-but-not-updating-domain-controller-active-directory","title":{"rendered":"Computer renaming but not updating Domain Controller ( Active Directory )"},"content":{"rendered":"\n<p>Recently trying to rename a computer in a multi Domain Controller Enviroment , the device renamed howvever on reboot didn&#8217;t show the new PC Name<\/p>\n\n\n\n<p>Using the below powershell I was about to query 10 domain controllers and work out it was updating on one and not the other <\/p>\n\n\n\n<p><code>repadmin \/replsummary<\/code><br><br>Showed issue with replication on that server , rebooting it fixed this<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\"># Import the Active Directory module\nImport-Module ActiveDirectory\n\n# Get all domain controllers in the domain\n$domainControllers = Get-ADDomainController -Filter * | Select-Object -ExpandProperty HostName\n\n# Old computer name to query (update if different)\n$computerName = \"ISTESTH\"\n\n# Loop through each domain controller and query the computer object\nforeach ($dc in $domainControllers) {\n    Write-Host \"Querying DC: $dc\"\n    \n    try {\n        $computer = Get-ADComputer -Identity $computerName -Server $dc -ErrorAction Stop\n        Write-Host \"  Found computer object: $($computer.DistinguishedName)\"\n        Write-Host \"  Name: $($computer.Name)\"\n        Write-Host \"  SID: $($computer.SID)\"\n        Write-Host \"  Last Modified: $($computer.Modified)\"\n    }\n    catch {\n        Write-Host \"  Error: $($_.Exception.Message)\" -ForegroundColor Red\n    }\n    Write-Host \"------------------------\"\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Recently trying to rename a computer in a multi Domain Controller Enviroment , the device renamed howvever on reboot didn&#8217;t show the new PC Name Using the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9078","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=9078"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9078\/revisions"}],"predecessor-version":[{"id":9079,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/9078\/revisions\/9079"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=9078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=9078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=9078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}