Getting an AD group SID

Using powershell to get a SID for a user group in AD

Posted by Carl Berg on Wed, Mar 19, 2014 | Tags powershell, active directory

Getting a SID for an AD-group is perhaps a little harder than it should be. You can see it in the UI, but you can’t copy it only view it as hex, binary, decimal or ocatal which is pretty useless.

AD group seen from UI

So as usual, powershell saves the day. Here’s what to do:

On the AD-server, Import the ActiveDirectory module in powershell (if not already installed):

Import-Module ActiveDirectory

Once that is done you can list groups like this:

Get-ADGroup -Filter {Name -like "D*"} | Select Name, SID | Format-Table -Auto

AD group seen from UI