Hi all,
I have a very strange problem. I need some information of the notes-users from Netinstall (like MS SMS). I find a possbility to make a query over LDAP from WSH-Script. I can read f.e. the follwing fields from the domino-directory:
-
cn
-
url
-
mail
-
sn
But i need the following fields too:
-
mailserver
-
maildomain
-
mailfile
This script works for the first fields, but not for all fields (mailserver, etc):
serverName = “neu-not01.ch-neu-hartmann.corp.intl”
baseStr = “”
filterStr = “(&(objectClass=dominoPerson) (sn=Kaifer) (givenname=Stefan))”
'Ir works:
fieldsStr=“cn,url”
'It not works!!!:
'fieldsStr=“maildomain,mailserver,mailfile”
Set ado = CreateObject(“ADODB.Connection”)
ado.Provider = “ADSDSOObject”
ado.Properties(“User ID”) = “CN=Admin Account,OU=IVF,O=PHAGHDH,C=DE”
ado.Properties(“Password”) = “password!”
ado.Properties(“Encrypt Password”) = False
ado.Open “LDAPNotes”
Set adoCmd = CreateObject(“ADODB.Command”)
adoCmd.ActiveConnection = ado
adoCmd.Properties(“Page Size”) = 500
adoCmd.Properties(“Cache Results”) = True
adoCmd.CommandText = “<LDAP://” & serverName & “>;” & filterStr & “;” & fieldsStr & “;subtree”
Set adoRS = adoCmd.Execute
While Not adoRS.EOF
For a = 0 To adoRS.Fields.Count - 1
WScript.Echo adoRS.Fields(a).Name
'For Each SubValue in adoRS.Fields(a).Value
'Wscript.Echo(SubValue)
'Next
Next ' ndx
adoRS.MoveNext
Wend
if I would get the fields “maildomain,mailserver,mailfile”^, then I’ll get a WSH-error.
If I try to browse the domino-directory with the tool “LDAP Browser” (http://www.softerra.com/download.htm), then I can see all fields (maildomain,mailserver,mailfile, etc. too).
Has somebody an idea, how can I get these 3 fields over LDAP in a WSH/VBS-Script?
Thanks
Stefan