VB Script 囉 AD 個 user list

請問有D VB script 可以囉到 AD 個 user list???
而如果個 user 有幾個 email address, 都會全部囉出黎~

我之前搵到呢一個, 不過只會囉第1個 email address....:

Dim dbTableName
Dim dbPath
Dim LastLogin

Set objRoot = GetObject("LDAP://RootDSE")
strDNC = objRoot.Get("DefaultNamingContext")
Set objGroup = GetObject("LDAP://" & strDNC)
dbPath = "c:\ad.mdb"
dbTableName = "AD Users"
Set conn = CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open dbPath
On Error Resume Next
SqlCommand = "CREATE TABLE [" & dbTableName & "] (SamAccountName Text(255), CN Text(255), FirstName Text(255), LastName Text(255)," & _
  "Initials Text(255), Descrip Text(255), Office Text(255), Telephone Text(255), Email Text(255), WebPage Text(255)," & _
  "Addr1 Text(255), City Text(255), State Text(255), ZipCode Text(255), Title Text(255), Department Text(255)," & _
  "Company Text(255), Manager Text(255), Profile Text(255), LoginScript Text(255), HomeDirectory Text(255)," & _
  "HomeDrive Text(255), Adspath Text(255), LastLogin Text(255), OU Text(255), Disabled Text(255))"
conn.Execute (SqlCommand)
On Error Goto 0

SqlCommand = "DELETE * FROM [" & dbTableName & "]"
conn.Execute (SqlCommand)
Call enummembers(Objgroup)
MsgBox "Done"
Sub enumMembers(objGroup)
  For Each objMember In objGroup
If ObjMember.Class = "user" Then
    set container = getObject(objMember.parent)
OU = FixValue(Mid(container.name,4), "OU")
SamAccountName = FixValue(ObjMember.samAccountName, "SamAccountName")
Cn = FixValue(ObjMember.CN, "CN")
Disabled = ObjMember.AccountDisabled
FirstName = FixValue(objMember.GivenName, "FirstName")
LastName = FixValue(objMember.sn, "LastName")
initials = FixValue(objMember.initials, "Innitial")
Descrip = FixValue(objMember.description, "Descript")
Office = FixValue(objMember.physicalDeliveryOfficeName, "Office")
Telephone = FixValue(objMember.telephonenumber, "Telephone")
Email = FixValue(objMember.mail, "Email")
WebPage = FixValue(objMember.wwwHomePage, "WebPage")
Addr1 = FixValue(objMember.streetAddress, "Addr1")
City = FixValue(objMember.l, "City")
State = FixValue(objMember.st, "State")
ZipCode = FixValue(objMember.postalCode, "ZipCode")
Title = FixValue(ObjMember.Title, "Title")
Department = FixValue(objMember.Department, "Department")
Company = FixValue(objMember.Company, "Company")
Manager = FixValue(ObjMember.Manager, "Manager")
Profile = FixValue(objMember.profilePath, "Profile")
LoginScript = FixValue(objMember.scriptpath, "LoginScript")
HomeDirectory = FixValue(ObjMember.HomeDirectory, "HomeDirectory")
HomeDrive = FixValue(ObjMember.homeDrive, "HomeDrive")
AdsPath = FixValue(Objmember.Adspath, "AdsPath")
On Error Resume Next
LastLogin = FixValue(ObjMember.LastLogin, "LastLogin")
On Error Goto 0
If IsDate(LastLogin) = True then
  LastLogin = FixValue(LastLogin, "LastLoginConverted")
  Else
  LastLogin = "1/1/2000"
  
End If
qryInsert = "INSERT INTO [" & dbTableName & "](SamAccountName, CN, FirstName, LastName, Initials, Descrip, Office, Telephone, Email, WebPage, Addr1, City, State, ZipCode, Title, Department, Company, Manager, Profile, LoginScript, HomeDirectory, HomeDrive, AdsPath, LastLogin, OU, Disabled) VALUES ('" & SamAccountName & "','" & CN & "','" & FirstName & "','" & LastName & "','" & initials & "','" & Descrip & "','" & Office & "','" & Telephone & "','" & Email & "','" & Webpage & "','" & Addr1 & "','" & City & "','" & State & "','" & ZipCode & "','" & Title & "','" & Department & "','" & Company & "','" & Manager & "','" & Profile & "','" & LoginScript & "','" & HomeDirectory & "','" & HomeDrive & "','" & AdsPath & "','" & LastLogin & "','" & OU & "','" & Disabled & "')"
conn.Execute (QryInsert)
SamAccountName = "-"
Cn = "-"
FirstName = "-"
LastName = "-"
initials = "-"
Descrip = "-"
Office = "-"
Telephone = "-"
Email = "-"
WebPage = "-"
Addr1 = "-"
City = "-"
State = "-"
ZipCode = "-"
Title = "-"
Department = "-"
Company = "-"
Manager = "-"
Profile = "-"
LoginScript = "-"
HomeDirectory = "-"
HomeDrive = "-"
LastLogin = FormatDateTime("1/1/2005")
OU = "-"

      End If
      If objMember.Class = "organizationalUnit" or OBjMember.Class = "container" Then
          enumMembers (objMember)
      End If
  Next
End Sub
Function FixValue(sValue, PropertyName)
if Err.Number <> 0 Then
WScript.Echo "Error Code: " & Err.Number & " in reading " & PropertyName & "property"
End iF
If VarType(sValue) = 10 or VarType(sValue) = 1 Then
FixValue = "-Null-"
End If
FixValue = Replace(sValue,"'","''")
End Function