473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to get the value of msExchMailboxGuid from Actvie Directory

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
  2.  
  3. ldap="SELECT cn, mail From 'LDAP://OU=XXXXXXXX,DC=center,DC=intranet,DC=sinotrans'"
  4.  
  5. c = win32com.client.Dispatch('ADODB.Connection')
  6. c.Open('Provider=ADsDSOObject')
  7.  
  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()
  15.  
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
0 1836

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

Similar topics

1
by: Lise | last post by:
Hi all .. I have a directory with several subdirectories and a number of files in each. These files are accessed by going to a web page and clicking in a listbox and navigating to the desired...
0
by: Mark | last post by:
Hi, given an Active Directory account as well as a Exchange MailBox can anyone show me how I link the two together in C# code? I want to be able to (Given a persons Active Directory Username)...
0
by: Ireneus Broncel | last post by:
I have a class which reads Groups and Users from ActiveDirectory. The Problem is, that i have about 10000 rows as product. When I am trying to read the "memberOf" Objects out of this field i get...
6
by: dave | last post by:
I really have 2 questions regarding the following xml snippet. The xml is a directory representation. <?xml version="1.0" standalone="yes"?> <FileSystem> <Row> <ID>1</ID> <Name>Root</Name>...
0
by: ad | last post by:
am developing a websetup project. There is a Installation Address Dialog in the User Interface. User can input the virtual directory in this dialog. I want to user the value of virtual...
1
by: vhg119 | last post by:
Can someone please link me to some resource listing all the user attributes names? I'm writing some C# code using the System.DirectoryServices assembly. This particular function is suppose to...
2
by: CCLeasing | last post by:
If (Directory.Exists(@"c:\indigo\" + txtOfficial + @"\" + comOffice.Text + @"\" + numTerm.Value.ToString())) { storereport(); } else { Directory.CreateDirectory(@"c:\indigo\" + txtOfficial +...
0
by: krausssj | last post by:
Hi all, I'm new to VB and need to read the msExchMailboxGuid field from the user's object in Active Directory and make that into a GUID in the format of {DCF88AF9-3BD7-4A04-B00E-A4FB00B9F125}. ...
6
by: Luca | last post by:
Hi everyone, I'm super-newbie here... so thanx in advance for any help I shoud give a "value" to an DIV's ID that change following the name of the directory where the file is. For example the...
2
by: jo3c | last post by:
Hi.. Im trying to get some information out of a windows sever 2003 chinese active directory system so let's say encoding is probably big5 or utf-8 what im doing is simliar to ldapsearch in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.