#Convert from Base64 to SID
[byte[]]$sid = [System.Convert]::FromBase64String("AQUAAAAAAAUVAAAAuwkCIyAUg1vk+E/VWQQAAA==")
$si = New-Object Security.Principal.SecurityIdentifier($sid,0)
$si.ToString()
#Convert from SID to Base64 (Needed for squid)
$sidconvert = New-Object Security.Principal.SecurityIdentifier("S-1-5-21-587336123-1535317024-3578788068-1112")
$sid_out = New-Object 'byte[]' $sidconvert.BinaryLength
$sidconvert.GetBinaryForm($sid_out,0)
[System.Convert]::ToBase64String($sid_out)