Recently I needed the domain SID to configure MFA with a 3rd party tool. Where can I get the domain SID? That’s exactly what I will show in this blog post. Let’s get started!
Retrieving Domain SID
Open PowerShell. Hit the keys and enter the One-Liner below to retrieve the Domain SID of your Active Directory Domain.
(Get-ADDomain).DomainSID.Value

With this command the domain SID is not displayed, it is copied to the clipboard.
(Get-ADDomain).DomainSID.Value | Set-Clipboard

To save the domain SID to a file execute the following command.
(Get-ADDomain).DomainSID.Value | Out-File $home\domainsid.txt

I hope this post was helpful for one or the other.
Categories: PowerShell, Windows Server




1 reply »