473,761 Members | 7,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Python, Exchange & CDOEXM to get/create/delete Storage Groups

I am trying to get a list of Storage Groups on an Exchange Server
(E2K) with an eye towards deleting/creating more. I am going off of
the Exchange SDK docs in msdn
(http://msdn.microsoft.com/library/en...and_stores.asp)
to do this.

I used makepy.py (on 'Microsoft CDO for Exchange Management Library')
to generate early binding and thought everything was going fine, but I
get the following...
import win32com.client

exch = win32com.client .Dispatch("CDOE XM.ExchangeServ er")
exch <COMObject CDOEXM.Exchange Server> exch.ExchangeVe rsion
u''
exch.StorageGro ups
()


First, it doesn't appear that early binding is working?? Second, both
calls come up empty?? I am obviously missing something but don't know
what that something is.

I look in the makepy.py generated module and see the following under
the IExchangeServer class - So I believe that I am creating/calling
everything correctly. Any ideas??

class IExchangeServer (DispatchBaseCl ass):
"""IExchangeSer ver Interface"""
CLSID = IID('{25150F47-5734-11D2-A593-00C04F990D8A}')
coclass_clsid = IID('{25150F27-5734-11D2-A593-00C04F990D8A}')

def GetInterface(se lf, Interface=defau ltNamedNotOptAr g):
"""Returns the specified interface on the object"""
ret = self._oleobj_.I nvokeTypes(85, LCID, 1, (9, 0), ((8, 1),),
Interface)
if ret is not None:
ret = Dispatch(ret, 'GetInterface', None, UnicodeToString =0)
return ret

_prop_map_get_ = {
# Method 'DataSource' returns object of type 'IDataSource2'
"DataSource ": (75, 2, (9, 0), (), "DataSource ",

'{25150F48-5734-11D2-A593-00C04F990D8A}') ,
"DaysBeforeLogF ileRemoval": (82, 2, (3, 0), (),
"DaysBeforeLogF ileRemoval",
None),
"DirectoryServe r": (84, 2, (8, 0), (), "DirectoryServe r", None),
"ExchangeVersio n": (78, 2, (8, 0), (), "ExchangeVersio n", None),
# Method 'Fields' returns object of type 'Fields'
"Fields": (76, 2, (9, 0), (), "Fields",
'{00000564-0000-0010-8000-00AA006D2EA4}') ,
"MessageTrackin gEnabled": (81, 2, (11, 0), (),
"MessageTrackin gEnabled",
None),
"Name": (77, 2, (8, 0), (), "Name", None),
"ServerType ": (83, 2, (3, 0), (), "ServerType ", None),
"StorageGroups" : (79, 2, (12, 0), (), "StorageGroups" , None),
"SubjectLogging Enabled": (80, 2, (11, 0), (),
"SubjectLogging Enabled",
None),
}
Jul 18 '05 #1
0 1531

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1522
by: Peter Otten | last post by:
QOTW: "It seems to me that in many respects Python is a programmer's programming language." - Arthur "My code did NOT have any leaks in it! :-D That's almost a miraculous occurrence when programming in C." - Kamilche Did you know the zip() trick? Christopher T King explains the effect of preceding a function argument with an asterisk to Garett. http://groups.google.com/groups?th=bab2fa27521fc8c5
0
1129
by: Dave Spina | last post by:
I have been working with the System.DirectoryServices namespace and the CDOEXM COM objects in a recent project. After probing the CDOEXM object set for a while I noticed that beyond the usual IMailboxStore interface there existed a MailboxClass class, which does have quite a few properties that would be wonderful to explore. I have tried casting, but that is illegal, and there is no mention of this class or its use anywhere that I have...
8
3994
by: doomx | last post by:
I'm using SQL scripts to create and alter tables in my DB I want to know if it's possible to fill the description(like in the Create table UI) using these scripts. EX: CREATE TABLE( Pk_myPrimaryKey INTEGER CONSTRAINT pk PRIMARY KEY DESCRIPTION 'This is the primary key of the table',
0
1925
by: Manuel Krummenacher | last post by:
Hello! I'm trying to develop an application to manage email-forwardings on an Exchange 2000 Server. Forwardings to external Addresses are requiring a contact with an Exchange account. I can create the contact in the Active Directory, but when I try to create an Exchange Account, I get this error (translated from German):
1
1497
by: Jeroen van Gent | last post by:
Hi, I am trying to create a function to create a GroupOfNames in exchange with C#. I have found multiple samples of this in VBScript and VB but nothing in C#. The biggest problem for me is the GetObject() function which is missing in C#. Next to that i don't know if i should use IADS, CDO, CDOEXM or ADO(.NET).
2
4750
by: Vincent Nguyen | last post by:
Hi, I have problem create exchange 2000 mailbox using CDOEXM in my Web Service application. The error I got was "Catastrophic failure". Here is the code that I have: DirectoryEntry user = new DirectoryEntry("LDAP://fmsamrmc001.amrmc.minicorp.intel.com/"+strDN); user.Properties.Value = "aaamailbox1"; user.CommitChanges();
0
1188
by: Flens | last post by:
Hi, I have code that worked until we upgraded from Exchange 2000 to Exchange 2003 and I now get a catastrophic failure at CreateMailbox (COMException (0x080004005)) I have updated the CDOEXM.dll (Version: 6.5.6944.0) as well. private void CreateMailbox(string homeMDB,DirectoryEntry CurrUser)
5
6776
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would cause. If I could create a large file that could be encrypted, and maybe add files to it by appending them and putting in some kind of delimiter between files, maybe a homemade version of truecrypt could be constructed. Any idea what it...
0
2424
by: arjen1984 | last post by:
I want to create a mailbox-enabled mailbox. First i have used the toturial from microsoft: http://support.microsoft.com/kb/313114 Then my homeMDB string was incorrect. I saw an article , link: http://forums.asp.net/thread/952974.aspx This guy has the same problem as me. I still have that problem. Mine server is a local server, so i have nog second domain name, i think. This i my code of my homeMDB: try { CDOEXM.IMailboxStore...
0
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5229
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3881
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.