Get Mailbox Sizes Exchange 2010 powershell.

I always struggle to find a straight forward command for getting Mailbox sizes in Exchange 2010. Although there is a lot of information out there, they all seem to over complicate things and don’t just give you what you require.

This is all you need:

Get-MailboxStatistics -Database “Mailbox Database*” | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV C:\MailBoxSizes.csv

This command will get the mailboxes sizes for all Databases beginning with Mailbox Database, Sort them according to size and export to a csv file.

Cannot browse with IE 32 bit but can browse with IE 64 bit

I picked up a strange issue with a Win 7 64bit laptop that could not browse at all. I checked all the network settings and was able to resolve DNS as well as ping websites. What was even stranger was that after installing Firefox I could not browse using that either.

After struggling for more than an hour I tried the 64 bit version of Internet Explorer and browsing was working.

After much research and trying every possible option like browser reset and even uninstalling IE 9. I found the following commands which solved the problem:

ipconfig /flushdns

ipconfig /registerdns

netsh winsock reset catalog

netsh int ip reset reset.log hit

I assume it was a Adobe Reader update that caused it as the client told me Adobe asked him to update and after that he computer just hanged. That is when the problem occurred.

RPC Server is unavailable when try to RDP to server

I once got the below message when trying to remote to a server after removing Active Directory from a server using dcpromo.

The reason I got the error message was because the server was configured to look at itself as a DNS server and because the DNS was also removed with the DCpromo command it could not find an Active Directory server for authentication.

The workaround I found was to add the following Dword to the registry:

In the folder:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server

Add the following key:

IgnoreRegUserConfigErrors =Dword:1

This will allow you to remotely log into the server. Just take note that it might take a while for the first logon to go through.


Export mailboxes to PST – Exchange 2007

Below are the steps for exporting all mailboxes to PST’s.

You can’t run the export from a 64bit OS.

Below describes the steps:

1. Find a server/PC with a 32bit OS.

2. Install the Exchange Management Tools (Exchange 2007 SP1 or later) – You can install this from the Exchange Media.

3. Install Outlook 2003 (SP2 or later).

4. From the Exchange Management Shell run the following command:

get-mailbox -server “Your server name” | export-mailbox -PSTfolderPath “Folder Path”

This will export all mailboxes to PST’s. It won’t remove any data from the mailboxes, it will just make a copy to the PST’s.

If if re-run the export it will merge the mails into the PST’s.

One problem I came across while trying to do the export was an error due to insufficient access rights on the mailboxes. Below is the error I received:

Error was found for ‘User’ because: Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error: MAPI or an inspecified service provider.

To resolve this run the following command:

Get-Mailbox -Server “Server name” | Add-MailboxPermission -user “User with which you run the Export command” -AccessRights FullAccess





Problem uninstalling ISA 2004

As you know when doing any sort of Server migration like Small Business server it is always best practice to remove the ISA Server as it can cause problems with moving mailboxes.

When trying to move the mailbox you might get the following error.

MapiExceptionNetworkError: Unable to make connection to the server.

To resolve this you need to uninstall ISA and then try the move again. Problem is sometimes when trying to uninstall ISA you will get the following error:

This patch package could not be opened. Verify that the patch package exists and that you can access it or contact the application vendor to verify that this is a valid Windows Installer Patch package.


I have found 2 different solutions to resolving this problem:

1. Run the Microsoft’s Fix problems with programs that can’t be installed or uninstalled which can be found here:

When running you will select ISA from the list and even thou the Tool says that it could not repair ISA you will still be able to completely uninstall it.

Unfortunately this tool sometimes give the following error message when trying to run it on a Small Business Server.

This troubleshooter does not apply to your system

We’re sorry, but this troubleshooter is not compatible with your current system’s configuration.

2. What I did to get around this problem was download and install ISA 2004 Service Pack 3 from the link below and re-apply it. After that I was able to uninstall ISA completely.

Link to ISA SP3:

Creating an Internal Relay for Printers in Exchange 2010

So you’ve installed your new Exchange 2010 server but now you have to change your printers to point to the new server otherwise the scan to email is going to stop working when you decommission the old server.

Here is the steps you need to follow;

This connector will be an Internal SMTP relay connector that does not require authentication for the specified IP addresses.


  1. Open you Exchange Management Console and go to: Server Configuration – Hub Transport
  2. Right Click and select – New Receive Connector
  3. Give your connector a name and select Custom under intended use.


  1. Under Local network settings leave  as default and click next

  1. This is the  part that caused my relay connector to never work. By default any IP address is allowed to relay. Remove this and only add the printers’ specific IP addresses. So it will be for example: If you add the entire subnet for example then the connector will not work as the default connector will then take precedence  which requires authentication.

  1. Click new and the connector will be created
  2. Then right-click on the newly created connector and select properties.
  3. Go to the Permission Groups tab and tick Anonymous users and Exchange servers

  1.  Go to the Authentication tab and tick the Externally Secured box.

  1. Then just change the printers to point to the IP address of the new server.
  2. One consideration if you have Anti-spam enabled on the exchange server then you just have to white list the printers so it doesn’t get blocked as spam.