How Can We Help?

Categories

Powershell – How to find account name from SID

You are here:
< Back

$SID = ‘ENTER_SID’
Get-ADObject -Filter “objectSid -eq ‘$SID'” | Select-Object Name, ObjectClass

Esempio
$SID = ‘S-1-5-21-1597585438-920690035-2477957328-4029’
Get-ADObject -Filter “objectSid -eq ‘$SID'” | Select-Object Name, ObjectClass

 

Complete info:

Get-ADObject -Filter {objectSid -eq ‘INSERIRE_SID’} -IncludeDeletedObjects -Properties *

Esempio
Get-ADObject -Filter {objectSid -eq ‘S-1-5-21-1597585438-920690035-2477957328-4029’} -IncludeDeletedObjects -Properties *