By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,563 Members | 915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,563 IT Pros & Developers. It's quick & easy.

How to get the value of msExchMailboxGuid from Actvie Directory

P: 1
I can get some attributes of an user of Active Directory by python script as follows:
Expand|Select|Wrap|Line Numbers
  1. import win32com.client
  3. ldap="SELECT cn, mail From 'LDAP://OU=XXXXXXXX,DC=center,DC=intranet,DC=sinotrans'"
  5. c = win32com.client.Dispatch('ADODB.Connection')
  6. c.Open('Provider=ADsDSOObject')
  8. rs,rc = c.Execute(ldap)
  9. rs.MoveFirst()
  10. while not rs.EOF:
  11.     for e in rs.fields:
  12.         print('{}: {}'.format(e.Name, e.Value))
  13.     print()
  14.     rs.MoveNext()
But if I add "msExchMailboxGuid" to the SQL query clause, the value of msExchMailboxGuid is always <memory at 0x02298350>.
It seems msExchMailboxGuid is not a string and how I print its value?
Any answer are appreciated!
Jun 1 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.