Login | |
|
 |
Help Querying AD - 10/15/2007 9:28:11 PM
|
|
 |
|
| |
4scriptmoni
Posts: 200
Score: 0
Joined: 5/3/2007
Status: offline
|
I am having a difficult time to get an attribute, I am writing a new script that will get a User Mailbox Information from its UPN. Unfortunally from WMI "\ROOT\MicrosoftExchangeV2" there is NO reference to UPN or email. The only match i found is the: msExchMailboxGuid So I need to get msExchMailboxGuid from AD and the other part i already can do. Anyways Here is my QUERY: username = ifile.readline strQuery = "<GC://DMC01 CN=Local,DC=dmc01.dsl,DC=net>;(&((objectClass=User)(mail=" & "'" & username & "'" & "));"_ & "msExchMailboxGuid,mail;subtree" I tryed also strFilter = "(&(objectCategory=user))(mail=" & "'" & username & "'" & "))" 'strQuery = "<LDAP://OU="& strOU &",DC=dsl,DC=net>;" & strFilter &_ ' ";msExchMailboxGuid,mail;subtree" objCommand.CommandText = strQuery objCommand.Properties("Page Size") = 500000 objCommand.Properties("Timeout") = 100 objCommand.Properties("Cache Results") = False I get no response no errors but nothing happens... anyone can help?
_____________________________
Enterprise Microsoft Scripts Exchange, Login/Logout Monitor,TS, Monitoring, Security, AD, etc... http://www.felipeferreira.net
|
|
| |
|
|
|
|
|