I have asp code create AD user and then adding exchange mailbox running with user rights logon. Creating user was OK, but I can not create mailbox for that user with user rights. Here is the code: - <%
-
strOU ="LDAP:// ou=IT,dc=MyDomain,dc=com "
-
Set objNamespace = GetObject("LDAP: ")
-
Set objOU= objNamespace.OpenDSObject(strOU,"administrator", "Password",1)
-
Set objUser = objOU.Create("User" , "cn=MyName" )
-
objUser.sAMAccountName = "myusername"
-
objUser.givenName = "FirstName”
-
objUser.sn = "Lastname”
-
objuser.displayname="My DisplayName”
-
objuser.UserPrincipalName="myusername@MyDomain.com"
-
-
strUSR ="LDAP:// ou=IT,dc=MyDomain,dc=com "
-
Set objUSR=GetObject(strUSR)
-
strServer = "Servername"
-
strExchangeOrg = "First Organization"
-
strDomain = "dc=MyDomain,dc=com "
-
strAdminGroup = "First Administrative Group"
-
strStorageGroup = "First Storage Group"
-
strStoreName = "Mailbox Store (" & strServer & ")"
-
strMailbox = strMailbox & "CN=" & strStoreName
-
strMailbox = strMailbox & ",CN=" & strStorageGroup
-
strMailbox = strMailbox & ",CN=InformationStore"
-
strMailbox = strMailbox & ",CN=" & strServer
-
strMailbox = strMailbox & ",CN=Servers"
-
strMailbox = strMailbox & ",CN=" & strAdminGroup
-
strMailbox = strMailbox & ",CN=Administrative Groups"
-
strMailbox = strMailbox & ",CN=" & strExchangeOrg
-
strMailbox = strMailbox & ",CN=Microsoft Exchange"
-
strMailbox = strMailbox & ",CN=Services"
-
strMailbox = strMailbox & ",CN=Configuration"
-
strMailbox = strMailbox & "," & strDomain
-
objUSR.CreateMailbox strMailbox
-
objUSR.SetInfo
-
%>
I need your help. Thank you!
0 1185 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Lindstrom Greg - glinds |
last post by:
I have written a script to monitor my MS Exchange mailbox for certain
messages and post information to an MS SQL Server Database. Everything
works great except that each time I run the script I am prompted by Windows
to choose the profile of the mailbox via a dialog box. I'd like to run the
script every hour, so this is not good.
Is there any way to either specify the profile or accept the default?
Thanks for any help you can send my...
|
by: mky98767 |
last post by:
I'm trying to link an MS Outlook 2003 contacts table in an Exchange
mailbox to an MS Access 2003 table. I have 436 contact records in the
contacts folder but when I run the link table wizard using the Exchange
conduit the resulting table contains only 369 records, and many of them
are duplicates except for the business fax number.
I can't see any pattern to the omitted contact records. Is there
something I should be doing to get them all...
|
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):
|
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();
|
by: - Steve - |
last post by:
I can create a mailbox using ASP.NET if I authenticate the administrator
using IIS authentication. I've switched to forms based authentication,
authenticating against AD, and everything is working fine except for the
creation of mailboxes. I can create the user fine, but when I try to
mailbox enable the user it throws the message, "Catastrophic failure".
Here's the code I'm using
CDOEXM.IMailboxStore mailboxStore =...
| |
by: Yavuz Bogazci |
last post by:
hi,
i want to do the following:
i want to develop an asp.net application wich should collect mails from a
specified exchange mailbox. but i dont want to install microsoft outlook on
the webserver to use the outlook object model. wich other solution can i use?
is there any other way?
and the other thing is: how can i give the code any credentials for the
|
by: Suman |
last post by:
Hello Group,
I am relatively new to .NET. I am trying to create a user in AD and a
corresponding email account in the exchange server from an ASP.NET, C#
application.
-----------------------------
I have a problem wherein I am able to create a user but am
unable to create a mailbox for the user. I "WAS" using exchange 2000.
|
by: rage2001 |
last post by:
I have a script (ASP) written which creates an account in AD, creates a
folder on our file server and sets its permissions, and then creates a
mailbox on the exchange server and sets its permissions... This script use to
work fine, and it hasnt been used in 2 months (since we have had no new
students since the end of the term).
I have part of the script below. There is alot of code above this script
which gets executed perfectly....
|
by: KDawg44 |
last post by:
Hi,
I am frustrated with my users who send large files around the office
instead of using the network shares.
For instance, this is one of many emails I have sent around:
"If you take the this kit it looks like J sent it to D, D sent it to
you, then you sent it to me. The problem with that is just that now
there are copies of this file:
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |