Getting on Object Name from a SID



If you wish to get an object name from a SID (which is a security identifier) then first you need a set the identifity with this:

$sid = ‘S-1-5-21-2412346651-123456789-123456789-12345678’

Then you need this command to to use the variable $sid to lookup the value in SID:

Get-ADObject –IncludeDeletedObjects -Filter "objectSid -eq '$sid'" | Select-Object name, objectClass

This will then return the object SID as you can see below, as you can see this is a user object with the Name of the account shown:



Previous Post Next Post

نموذج الاتصال