473,659 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Create exchange mailbox with non admin rights

1 New Member
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:
Expand|Select|Wrap|Line Numbers
  1. <% 
  2. strOU ="LDAP:// ou=IT,dc=MyDomain,dc=com "
  3. Set objNamespace = GetObject("LDAP: ")
  4. Set objOU= objNamespace.OpenDSObject(strOU,"administrator", "Password",1)
  5. Set objUser = objOU.Create("User" , "cn=MyName" )
  6. objUser.sAMAccountName = "myusername"
  7. objUser.givenName = "FirstName”
  8. objUser.sn = "Lastname”
  9. objuser.displayname="My DisplayName”
  10. objuser.UserPrincipalName="myusername@MyDomain.com"
  11.  
  12. strUSR ="LDAP:// ou=IT,dc=MyDomain,dc=com "
  13. Set objUSR=GetObject(strUSR)
  14. strServer = "Servername" 
  15. strExchangeOrg = "First Organization" 
  16. strDomain = "dc=MyDomain,dc=com " 
  17. strAdminGroup = "First Administrative Group"
  18. strStorageGroup = "First Storage Group"
  19. strStoreName = "Mailbox Store (" & strServer & ")"
  20. strMailbox = strMailbox & "CN=" & strStoreName
  21. strMailbox = strMailbox & ",CN=" & strStorageGroup
  22. strMailbox = strMailbox & ",CN=InformationStore"
  23. strMailbox = strMailbox & ",CN=" & strServer
  24. strMailbox = strMailbox & ",CN=Servers"
  25. strMailbox = strMailbox & ",CN=" & strAdminGroup
  26. strMailbox = strMailbox & ",CN=Administrative Groups"
  27. strMailbox = strMailbox & ",CN=" & strExchangeOrg
  28. strMailbox = strMailbox & ",CN=Microsoft Exchange"
  29. strMailbox = strMailbox & ",CN=Services"
  30. strMailbox = strMailbox & ",CN=Configuration"
  31. strMailbox = strMailbox & "," & strDomain
  32. objUSR.CreateMailbox strMailbox
  33. objUSR.SetInfo
  34. %>
I need your help. Thank you!
Apr 19 '11 #1
0 1185

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4630
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...
0
1152
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...
0
1920
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):
2
4744
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();
1
1252
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 =...
3
1721
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
0
1571
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.
0
1729
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....
4
6642
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:
0
8341
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,...
0
8851
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...
0
8751
jinu1996
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...
1
8539
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,...
1
6181
isladogs
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...
0
4342
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2759
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
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1739
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.