Oprettelse af mailboxes
Jeg forsøger at oprette mailboxe vha. ASP sider med indlejret VBscript (samt ADSI og CDOEXM). JEg får imidlertidig hele tiden fejlen "one or more arguments are invalid på en linie der heddermailbox.createMailbox <strengen hvor Exch. DB'en er (HomeMDB)"
Jeg har været inde i ADSIedit og konstatere at stien til HomeMDB er korrekt så det er ikke her fejlen ligger. Muligvis det har noget med noget permission at gøre??
Opsætningen er en Windows 2000 server med en Exchange 2000 server
Håber der er nogen der kan hjælpe...
Scriptet er i grove træk
<%
'First of all, get authenticated on this server.
dim IADsPath
Dim pwd
Dim uid
Dim flags
IADsPath = "LDAP://Morgul.test.dk/OU=internal, DC=test,DC=dk"
uid = "TEST\Administrator"
pwd = "********"
flags = 0
dim IADsNameSpace
set IADsNameSpace = GetObject("LDAP:")
Dim oIADsObject
set oIADsObject = IADsNameSpace.OpenDSObject( IADsPath, uid, pwd, flags )
If err.number = 0 Then
Response.Write("Login Was Successful: " & uid)
Else
Response.Write("Login Failed: " & uid)
Response.Write(err.number)
Response.Write(err.description)
End If
' Here I am going to create a user account
Dim userObj
set userObj = oIADsObject.Create("User", "cn=Testing")
userObj.Put "samAccountName","tester"
userObj.Put "userPrincipalName", "Mr. Test"
userObj.Put "givenName", "Testperson"
userObj.Put "sn", "test"
userObj.Put "DisplayName", "test@test.dk"
userObj.Put "mail", "Testing@test.dk"
userObj.SetInfo
userObj.changePassword "", "test"
userObj.AccountDisabled = False
userObj.SetInfo
' Now to create a mailbox
Dim mailboxObj
set mailboxObj = userObj
Response.write("<font color='Blue'>" & mailboxObj.Class & "---</font>")
Response.write("<font color='Red'>" & mailboxObj.Name & "</font><br>")
mailboxObj.CreateMailbox "LDAP://Morgul.test.dk/CN=Mailbox Store (Morgul), CN=First Storage Group, CN=InformationStore, CN=Morgul, CN=Servers, CN=First Administrative Group, CN=Administrative Groups, CN=Morgul Online,CN=Microsoft Exchange, CN=Services, CN=Configuration, DC=test, DC=dk")
Dim contactObj
set contactObj = oIADsObject.Create("contact", "cn=testing")
contactObj.Put "givenName", "testing"
contactObj.Put "sn", "testing"
'contactObj.Email = "testing@testing.dk"
contactObj.SetInfo
contactObj.MailEnable "smtp:proeve@test.dk"
contactObj.SetInfo
'setting the forwarding mail
userObj.ForwardTo = "LDAP://morgul.doek.dk/CN=testing, OU=internal, DC=test,DC=dk"
userObj.SetInfo
set userObj = Nothing
set contactObj = Nothing
set mailboxObj = Nothing
set IADsNameSpace = Nothing
%>