I want to let the user enter a active directory group, and I want to verify that the group they entered does exist. However I am not sure how to do this, I assume it is something simular to the below code:
ThanksCode:Dim de As DirectoryEntry = New DirectoryEntry(Me.strDomain) Dim deSearch As DirectorySearcher = New DirectorySearcher() deSearch.SearchRoot = de deSearch.Filter = "<enter group filter syntax>" & myGroupName & ")" Try Dim results As SearchResultCollection = deSearch.FindAll() If results.Count = 0 Then Return False Else Return True End If Catch ex As Exception MsgBox(ex.Message) End Try
Simon




Reply With Quote