Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can the "Database is mandatory for user mailbox" be resolved using PowerShell

Posted on 2009-05-07
2
Medium Priority
?
3,395 Views
Last Modified: 2012-05-06
Hello Experts,

Here is the issue Im encountering.  Im in the process of testing an Exchange migration from Exchange 2000 to Exchange 2007.  Ive successfully restored my AD into a lab environment and verified AD is working correctly.  Ive semi-successfully restored Exchange 2000 into the lab environment.  What has happened with the Exchange 2000 restore is approximately 200 of 1000 mailboxes restored correctly (they show up in the Exchange System Manager) and work perfectly in lab.  When I open AD Users and Computers on my lab Exchange 2000 server and access one of the users whose mailbox is among the 200 mailboxes showing up in Exchange 2000 System Manager and click on the Exchange General tab, I see the following information:
Mailbox Store:
Exchg2000/First Storage Group/Mailbox Store (Exchg2000)

Note: Exchg2000 is the name of the Exchange 2000 server

 When I access one of the users whose mailbox is not among one of the 200 mailboxes showing up in the Exchange 2000 System Manager and click on the Exchange General tab, I see the following information:
Home Server
Yavapai/Exchg2000/Exchg2000

Note:  Yavapai is the name of the Exchange organization
Note: Exchg2000 is the name of the Exchange 2000 server

I have introduced Exchange 2007 into the lab and it is coexisting with Exchange 2000.  When I open the Exchange 2007 Management Console à Recipient Configuration à Mailbox, I see all 1000 mailboxes.  If I try to move one of the 200 mailboxes that I can see in the Exchange 2000 System Manager, the move is successful (moves can be don via the EMC or the Exchange shell).  If I try moving one of the 800 mailboxes that did not show up in the Exchange 2000 System Manager, then I get an error stating:  Database is mandatory on user mailbox.

To correct this problem, I do the following:
1.      Access AD Users and Computers on the Exchange 2000 server.
2.      Right-click on a user account whose mailbox is not among the 2000 listed in the Exchange 2000 System Manager
3.      Select the Exchange Tasks
4.      Select the Remove Exchange Attributes option
5.      Click <Finish>
6.       Right-click on a user account whose mailbox is not among the 2000 listed in the Exchange 2000 System Manager
7.      Select the Exchange Tasks
8.      Select the Create Mailbox option
9.      Verify the server information is as follows:
Yavapai/Exchg2000/Exchg2000

10.      Verify the mailbox store information is as follows:
First Storage Group/Mailbox Store (Exchg2000)

11.      Click Finish

Once this has been done, the mailbox can be moved to Exchange 2007.

Here is my question, is there a way to use powershell to script this process?

Regards,
Nick
0
Comment
Question by:ndalmolin_13
2 Comments
 
LVL 71

Accepted Solution

by:
Chris Dent earned 2000 total points
ID: 24357733

Hey Nick,

Still after this one?

It's far easier using VbScript. Using PowerShell is possible, but you need to create a wrapper for CDOEXM (COM Interoperability) before it can be used. That alone isn't much fun, actually using it afterwards is worse.

If you were to stick with VbScript it should be possible to do something like this psuedo-code:

Get a List of users with no mailbox database set (is this the problem? If so an LDAP filter can be used to find them)
For Each User in the Domain
  Execute the MailDisable method on the user
  Set Info
  Execute the MailEnable method on the user (pointing it at the database in question)
  Set Info
Loop

Chris
0
 
LVL 1

Author Closing Comment

by:ndalmolin_13
ID: 31579129
Chris,
Thanks for the suggestion.  I had one of our VB guys look at your post and the issue and we got a VB script to work.

Nick
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With so many activities to perform, Exchange administrators are always busy in organizations. If everything, including Exchange Servers, Outlook clients, and Office 365 accounts work without any issues, they can sit and relax. But unfortunately, it…
How to effectively resolve the number one email related issue received by helpdesks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question