Waukesha County Help Center

    Powershell Command to match SID number to Active Directory object

    June 17th, 2022

    Written By John Flaig

    Updated by John Flaig on June 17th, 2022

    ***Bring up Powershell***

    import-module activedirectory

    Get-ADUser -Filter * | Select-Object -Property SID,Name | Where-Object -Property SID -like "S-1-5-21-784038978-3365543830-129711908-xxxxx"

    ***For deleted objects***

    $SID = "S-1-5-21-784038978-3365543830-129711908-xxxxx"

    Get-ADObject -IncludeDeletedObjects -Filter * -Properties * | where{$_.objectSid -eq $SID


    Was this article helpful?

    Send feedback

    Can’t find what you’re looking for?

    Our award-winning customer care team is here for you.

    Contact Support