Public Shared Function GetSidFromAccountName(ByVal AccountName As String) As SecurityIdentifier Dim na As New NTAccount(AccountName) Return DirectCast(na.Translate(GetType(SecurityIdentifier)), SecurityIdentifier) End Function