This is a simple script to convert a SID to a username
# Returns a username based on a SID
# Author: Ryan Nemeth
# Date: 12/2/2014
$SID = read-host “Please enter the SID: ”
$object = New-Object System.Security.Principal.SecurityIdentifier($SID)
$User = $object.Translate( \[System.Security.Principal.NTAccount\])
write-host “The user is: ” $User.Value