You mount a recovery point or perform a Restore. You look at the permissions for one of the folders and see that one or more users with access rights show as SID only. You want to determine the user names for further troubleshooting.
Warning: AppAssure does not support PowerShell scripting. All scripts mention in this article are meant to be used as examples only. Click here for more information.
A PowerShell script has been prepared to address this. It supposes that you are logged with the appropriate permissions on a domain computer.
Please identify the $SID value in the script and replace it with the SID you want to inquire about. For the Example below, the SID is S-1-5-21-2441721000-1906456182-2289607609-500 and is mapped to the account Administrator on the SupportLab3.local domain.
NOTE: The script works for local accounts as well; however, since the user was created on a different computer, you will get correct results only for “well known” SIDs (i.e. SID S-1-1-0 maps to Everyone), otherwise a “Some or all identity references could not be translated.” exception will be thrown.
Write-Host “`r`nMap SID to User`r`nPlease make sure that the `$SID variable value is the SID to map to user”
#check if the activedirectory module is available and if not issue warning
if ((get-module -listavailable -name activedirectory) -ne $null)
{
#check if the ActiveDirectory Powershell Module is installed and import it if it is not present
if ((Get-module -name ActiveDirectory) -eq $null){import-module ActiveDirectory; Write-host “$(get-module -name ActiveDirectory) module was installed” -f “Yellow”}
#Enter SID value
$SID = “S-1-5-21-2441721000-1906456182-2289607609-500″ #Replace as needed!
#create a SID object
$SID_Object = New-Object System.Security.Principal.SecurityIdentifier($SID)
#Get the corresponding user object
$user_Object = $SID_Object.Translate( [System.Security.Principal.NTAccount])
#Show User
Write-Host “`r`nThe user mapped to SID $($sid) is $($user_Object.value)`r`n” -f “Yellow”
}
else {Write-host “WARNING: ActiveDirectory Module is Not Available on this machine; please try another one” -f “Red”}
© ALL RIGHTS RESERVED. 이용 약관 개인정보 보호정책 Cookie Preference Center