Search for and delete content within a mailbox using PowerShell
I was recently asked to delete a specific message from a user mailbox as the recall function did not work (the message had already been read). I was able to check if the message existed in the mailbox using the…
Determine the average mailbox size using PowerShell
I have been asked to provide a colleague with some statistics around our Exchange environment, including the average mailbox size. There is no way to determine this using the GUI so once again PowerShell comes to the rescue with…
Count the number of mailboxes using PowerShell
If you need a quick and easy way to count the number of mailboxes in your Exchange environment then you can use the Get-Mailbox cmdlet: (Get-Mailbox -ResultSize Unlimited).Count
Attach a disconnected online archive to a user mailbox
I have been migrating some users to a new Active Directory domain and part of this has involved converting linked mailboxes to user mailboxes within Exchange. Reconnecting a disconnected mailbox doesn’t include the archive, this needs to be done manually….
Change a mailbox type using PowerShell
Today I needed to convert an existing user mailbox into a room mailbox. I was able to do this quite easily using the Set-Mailbox cmdlet. Here is an example of how to do this: Set-Mailbox -Identity “boardroom” -Type Room Note:…
Import a PST file to a mailbox using PowerShell
Today I have been asked to import mail from a PST file into an existing mailbox in Exchange. Fortunately this is nice and easy using the New-MailboxImportRequest PowerShell cmdlet. Here is an example of how to use it: New-MailboxImportRequest -Mailbox dave@webbworld.local -FilePath…
Determine whether a user has an online archive using PowerShell
A user posted a question on Windows 2012 Forums asking if it is possible to determine whether or not a user has an online archive using PowerShell. This is indeed possible, and here is how: $Mailbox = Get-Mailbox user@yourdomain.com $Mailbox.ArchiveDatabase…
Delete a disconnected mailbox
Today I needed to remove a mailbox that has been disconnected, but this option isn’t available from the Exchange Management Console so I turned to PowerShell. First, I used the Get-MailboxStatistics cmdlet to generate a list of disabled mailboxes: Get-MailboxStatistics…
Determine if a mailbox is a linked mailbox using PowerShell
If you need to determine whether a mailbox is a linked mailbox using PowerShell you can achieve this with the Get-Mailbox cmdlet: $Mailbox = Get-Mailbox user@domain.com $Mailbox.RecipientTypeDetails