Notice: Due to size constraints and loading performance considerations, scripts referenced in blog posts are not attached directly. To request access, please complete the following form: Script Request Form Note: A Google account is required to access the form.
Disclaimer: I do not accept responsibility for any issues arising from scripts being run without adequate understanding. It is the user's responsibility to review and assess any code before execution. More information

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

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