I have set of Sids provided by client to delete the respective users from site permanently using share point 2013 power shell.
Firstly, I tried below script to get user by sid as below, but it does not provide user details for some Sids (These sids has to be deleted by me anyway from the site)
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Variables $SiteURL="https://intranet.crescent.com" $UserSID = "S-1-5-21-3173304932-3636910964-1439844995-11231" #Get the User by SID Get-SPUser -Web $SiteURL -limit All | where {$_.Sid -eq $UserSID} | Select UserLogin, DisplayName
Kindly help me in achieving the same.
Thanks