One of our Team contacted us as they wanted to know the built-in Administrator account for the Domain as it was renamed long ago and
many admins have changed over the years, so they are not able to find it.
This post will make it simple and provide the code that you can use to easily find these accounts.
First step is to get the Domain SID:
$domain = Get-ADDomain techwizard.com -Server techwizard.com
$domainsid = $domain.DomainSID
Now we know the SID of domain, we can form the built-in Administrator SID.
Which is of the format à
S-1-5-21domain-500
Second Step is to generate Admin account SID:
$adminacocuntsid = $domainsid.Value + “-500”
Now, you just need to run below command to get the built-in administrator account.
Get-ADuser -Filter {SID -eq $adminacocuntsid} -Server techwizard.com
Putting it all together: (replace techwizard.com with your domain)
$domain = Get-ADDomain techwizard.com -Server techwizard.com
$DomainSID = $domain.DomainSID
$adminacocuntsid = $domainsid.Value + “-500”
Get-ADuser -Filter {SID -eq $adminacocuntsid} -Server techwizard.com
I hope this TIP will assist you if you are in the same situation.
Thanks for reading …
Tech Wizard