Spend a little time on my blog: http://blogs.brnets.com/michael ________________________________ From: Chintan [mailto:chintankathiriya@xxxxxxxxx] Sent: Fri 4/15/2005 7:47 PM To: [ExchangeList] Subject: [exchangelist] Regd:Mail quota retrieval http://www.MSExchange.org/ Can Any suggest me how i can retrieve mail-quota,mail-usage,email address for a particular user in ms exchange server. I have retrieved the email address of a particular user but dont have idea how to retrieve other info. here is my code to retrieve email of a particular user :: /*--------------------------------------------------------------*/ Option Explicit Dim strUsername,strUsernamea,strpassword,con,rs,Com,objADsPath,objDomain Set objDomain = GetObject ("GC://rootDSE") objADsPath = objDomain.Get("defaultNamingContext") Set objDomain = Nothing Set con = CreateObject("ADODB.Connection") con.provider ="ADsDSOObject" 'con.Properties("User ID") = "BURLINGTON\"+strUsername 'con.Properties("Password") = strpassword con.open "Active Directory Provider" Set Com = CreateObject("ADODB.Command") Set Com.ActiveConnection = con Com.CommandText ="select mail FROM 'LDAP://"+objADsPath+";' where sAMAccountName='vsavalia'" Set rs = Com.Execute msgbox rs("mail") rs.Close con.Close Set rs = Nothing Set con = Nothing /*---------------------------------------------------------------------*/ Thanks, chintan ------------------------------------------------------ List Archives: http://www.webelists.com/cgi/lyris.pl?enter=exchangelist Exchange Newsletters: http://www.msexchange.org/pages/newsletter.asp Exchange FAQ: http://www.msexchange.org/pages/larticle.asp?type=FAQ ------------------------------------------------------ Other Internet Software Marketing Sites: World of Windows Networking: http://www.windowsnetworking.com Leading Network Software Directory: http://www.serverfiles.com No.1 ISA Server Resource Site: http://www.isaserver.org Windows Security Resource Site: http://www.windowsecurity.com/ Network Security Library: http://www.secinf.net/ Windows 2000/NT Fax Solutions: http://www.ntfaxfaq.com ------------------------------------------------------ You are currently subscribed to this MSEXchange.org Discussion List as: michael@xxxxxxxxxx To unsubscribe visit http://www.webelists.com/cgi/lyris.pl?enter=exchangelist Report abuse to listadmin@xxxxxxxxxxxxxx