public static string[] GetUserGroups(string sServerName, string sUserName)
        {
            BaseDirectoryServices serverDS = GetServerDS(sServerName);

            List <string> userGroups = serverDS.GetUserMembership(sUserName);

            return(userGroups.ToArray());
        }
        public static string[] GetGroups(string sServerName)
        {
            BaseDirectoryServices serverDS = GetServerDS(sServerName);

            List <string> allGroups = serverDS.GetAllGroups(true);

            return(allGroups.ToArray());
        }
        public static string[] ValidateGroups(string sServerName, string[] groupNames)
        {
            BaseDirectoryServices serverDS = GetServerDS(sServerName);

            List <string> validGroups = serverDS.ValidateGroups(new List <string>(groupNames));

            return(validGroups.ToArray());
        }
        public static string[] ValidateUsers(string sServerName, string[] userNames)
        {
            BaseDirectoryServices serverDS = GetServerDS(sServerName);

            List <string> validUsers = serverDS.ValidateUsers(new List <string>(userNames));

            return(validUsers.ToArray());
        }