Thursday, 19 April 2012

Outlook unable to connect after migration to 2010

We had a possibly unique environment and an issue that came along with it.

Some of our users were required to have two email accounts (one was for secure email). The email accounts were created with the same alias as their normal account, and so the LegacyExchangeDN created at some point we believe was the same too.

When we migrated the secure email accounts to Exchange 2010 we discovered that some people could not open their email. Outlook threw an error. After some investigation we found that the people who could not access their secure email had an X500 address on their normal account, pointing to their LegacyExchangeDN on their secure email. This was obviously causing confusion somewhere down the line.

To resolve it, we changed the X500 address on the normal account to point to the LegacyExchangeDN on the normal account. Users could then access all of their accounts.

In order to do a comparison, we did a search for accounts with X500 addresses, using powershell, and put them into a SQL database. Then we did a search of the people's legacyExchangeDN and put them in a table and with a select statment, brought back all the X500 addresses that matched the wrong LegacyExchangeDNs

Tuesday, 13 March 2012

More Exchange Powershell Scripts

Our exchange 2010 environment was set up by an external company. Unfortunately for us, there was no technical hand over, so we had to go about figuring how it has been set up for ourselves.

Here are another couple of commands to give us information about Public Folders.

This produced a list of mailbox databases and their corresponding public folder database excluding the archive databases.

Get-MailboxDatabase | select name, Publicfolderdatabase | where {$_.name -notlike "*Arch*"}

Using Get-PublicFolderDatabase we were then able to see which servers hosted which public folder database.

Tuesday, 6 March 2012

PowerShell Scripts used in exchange Migration

We've been recently migrating users from an Exchange 2003 environment to Exchange 2010 SP2. We have been using powershell for the most of it along with Opalis. Here are some command's we found useful.

Resume any suspended move requests.
Get-MoveRequest -MoveStatus Suspended | Resume-MoveRequest -confirm:$false

Delete any completed move requests
Get-MoveRequest -MoveStatus Completed | Remove-MoveRequest -confirm:$false

Create a new move request (We used this for any mop ups we had to do due to incorrect email addresses fed into our Opalis workflow)
New-MoveRequest -Identity <username> -BadItemLimit 50 -Suspend:$true

If we didn't want a database to be included in the automatic distribution of mailboxes we ran this command
Set-MailboxDatabase DB01 -IssuspendedFromProvisioning $True

To get the status of our databases after a migration. We didn't want to include the archive databases so we filtered them out.
get-mailboxdatabase -status | select servername,name,databasesize | where {$_.name -notlike "*Arch*"}

And lastly to get the number of mailboxes per database we run the following script

(Get-MailboxDatabase) | where {$_.name -notlike "*Arch*"} | ForEach-Object {Write-Host $_.Name (Get-Mailbox -Database $_.Name).Count}