IWFAdminService svc = GetAdminService();
string activeDirectoryLdapPath = ...// for example, LDAP://ou=Sales,dc=Frabrikam,dc=com
string groupNameFilter = "A*";
groupNameFilter = string.Format("(name={0})", groupNameFilter);
try
{
KeyValue[] grps = svc.GetDomainGroups(activeDirectoryLdapPath, groupNameFilter);
foreach (KeyValue grp in grps)
{
Console.WriteLine("Group Name:{0}; Group Distinct Name:{1};", grp.Key, grp.Value);
}
}
catch (Exception ex)
{
Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
}