Charles Brereton
Guest
|
Posted:
Tue Nov 29, 2005 5:58 pm Post subject:
Programmatic creation of an ADC Connection Agreement |
|
|
I'm trying to create an ADC CA programmatically rather than using the GUI,
because I need to have an automated setup in place when connecting my E2K3
server to the rest of the environment. System is W2K3 SP1 & E2K3 SP2
connecting to a Nt4 Ex55 SP4 environment. So...
Dim objRootDSE
Set objRootDSE = GetObject("LDAP://rootDSE")
Dim strCNC
strCNC = objRootDSE.Get("configurationNamingContext")
Dim objCAcontainer
Dim objCA
Set objCAcontainer = GetObject("LDAP://CN=Active Directory _
Connections,CN=Microsoft Exchange,CN=Services," & strCNC)
Set objCA = objCAcontainer.Create("msExchConnectionAgreement", "cn=ADC E55
to E2K3")
<so far so good>
objCA.Put "msExchServer1NetworkAddress", "SERVER01"
..... and so on, adding in as many of the attributes possible (as per MSDN).
Finally....
objCA.SetInfo
..... should create the CA and indeed you can see the new CA in ADSIEdit.
However it does not appear in the GUI. Some of the attributes -
activationSchedule, msExchHomeSyncService and msExchCASchemaPolicy also give
a 'constraint violation' error if I try to .Put them before doing .SetInfo.
If anyone has managed to do this successfully I would be grateful for any
hints.
thanks -
|
|