/// <summary>
 /// Executes the LDAP query.
 /// </summary>
 /// <param name="lDapQuery">The l dap query.</param>
 /// <returns></returns>
 public static SearchResultCollection ExecuteLDAPQuery(string lDapQuery)
 {
     try
     {
         DirectoryEntry root = DirectoryServicesUtils.newDirectoryEntry("LDAP://" + (DirectoryServicesUtils.GetRootDSEPart(lDapQuery) ?? SqlAzManStorage.RootDSEPath));
         root.RefreshCache();
         DirectorySearcher searcher = new DirectorySearcher(root, DirectoryServicesUtils.GetLDAPQueryPart(lDapQuery), new string[] { "objectSid" });
         return(searcher.FindAll());
     }
     catch
     {
         throw;
     }
 }