I can get some attributes of an user of Active Directory by python script as follows:
But if I add "msExchMailboxG uid" to the SQL query clause, the value of msExchMailboxGu id is always <memory at 0x02298350>.
It seems msExchMailboxGu id is not a string and how I print its value?
Any answer are appreciated!
Code:
import win32com.client
ldap="SELECT cn, mail From 'LDAP://OU=XXXXXXXX,DC=center,DC=intranet,DC=sinotrans'"
c = win32com.client.Dispatch('ADODB.Connection')
c.Open('Provider=ADsDSOObject')
rs,rc = c.Execute(ldap)
rs.MoveFirst()
while not rs.EOF:
for e in rs.fields:
print('{}: {}'.format(e.Name, e.Value))
print()
rs.MoveNext()
It seems msExchMailboxGu id is not a string and how I print its value?
Any answer are appreciated!