About Me

My photo
HANUMANGARH, RAJASTHAN, India

Thursday, 15 September 2022

Resolve SID to user name

 Function f-sid {

param ( [Parameter(Mandatory=$true)][String]$Sid)

$objSID = New-Object System.Security.Principal.SecurityIdentifier($Sid)

Try {

($objSID.Translate( [System.Security.Principal.NTAccount])).value

}

Catch {

Write-host “`nCouldn’t find any entry matching SID : $Sid” -foregroundcolor cyan

}

}

#Put all SID in text file and run:

get-content C:\Users\su-skumar\Desktop\ser.txt | % { f-sid $_ }

No comments:

Post a Comment

Export contact from Justdial

  Extract Data From JustDial using Selenium Let us see how to extract data from Justdial using Selenium and Python. Justdial is a company th...