I am new to vb and trying to use a script I found at here:
The script is this one and I am trying to export dl members, but I don't know what I need to enter in the script to get it working, right now I get a "DN Syntax error line 2 char 1"
This should give you what you're looking for...
Any help is appreciated, looking to get specific info on what fields need what and how to enter list that are like: #Test distribution list Two and in an OU under another, so like OU is Test and the OU that holds the dl is under test titled DL
Dim objGroup, objExcel, iRow, strUser
Set objGroup = GetObject("LDAP://CN=myDistList,ou=Messaging,dc=myDomain,dc=com")
Set objExcel = CreateObject("Excel.Application")
.SheetsInNewWorkbook = 1
.Visible = True
.Worksheets.Item(1).Name = mid(objGroup.Name, instr(1,objGroup.Name,"=") + 1 ) 'set Worksheet name to that of the DL
For Each strUser in objGroup.Member
Set objUser = GetObject("LDAP://" & strUser)
.Cells(iRow,1) = objUser.CN
irow=irow + 1
Set objExcel = Nothing
Set objGroup = Nothing