This is a powershell script. The SID is embedded in the script rather than supplied as a parameter because you'll want a real editor to enter something that long and fiddly, and if you make a mistake you won't have to type it all again.
$sid = "S-1-5-21-3958373422-900878746-1697231957-1464"
$objSID = New-Object System.Security.Principal.SecurityIdentifier($sid)
$objUser = $objSID.Translate( [System.Security.Principal.NTAccount])