A week or so ago while migrating users to Exchange 2010 from Exchange 2003 I encountered issues with the Personal archive not being in the correct place. I’ve now written a script to proactively help with determining that the values in Exchange and AD are correct. Here is the script:
$rows = “User,” + “Archive Database,” + “msExchArchiveDatabaseLink”
Add-content c:\temp\ArchiveValues.csv $rows
$userlist = import-csv c:\temp\Users.csv
foreach ($line in $userlist){
$var1a = $line.user
$mb = get-mailbox $var1a
$var1b = $mb.archivedatabase.distinguishedname
$uo = get-qaduser $var1a -includeallproperties
$var1c = $uo.msExchArchiveDatabaseLink
$rowline = “$var1a,” + “$var1b,” + “$var1c”
Add-content c:\temp\ArchiveValues.csv $rowline
}
Basically what this script does is allows you to compare the Get-Mailbox command results for the ArchiveDatabase location versus the what is stored in the msExchArchiveDatabaseLink attribute that is store on the user object in AD. If these two are mismatched, then the archive will not open.
The script will generate a report that you could review at a later time.