Solved

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

Posted on 2009-05-07
2
3,382 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 70

Accepted Solution

by:
Chris Dent earned 500 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now