Create a Shared mailbox in Exchange 2010

Use the following shell command to create a new shared mailbox:

New-Mailbox -Name <SharedName> -Alias <SharedName> -Database "Database Name" -UserPrincipalName <SharedName@domain.local> -Shared

Then set the Full Access Permission and Send As Permission from the EMC.



Message tracking

To retrieve log information regarding a message going through Exchange:

Get-MessageTrackingLog -MessageId <Message-ID> | fl *

See MS article:

Configure a users Out of Office/Auto Reply from PowerShell

Without having to login to their account/mailbox, use Exchange commandlets to get/set their Out of Office.

To view current Out of Office settings:

Get-MailboxAutoReplyConfiguration -Identity DOMAIN\Username

Link to Technet:


To set properties for a users Out of Office:

Set-MailboxAutoReplyConfiguration -Identity DOMAIN\Username -AutoReplyState enabled -InternalMessage "I am on holiday until 01/08/14.  Please call Joe on Ext 123 in my absence" -ExternalMessage "I am on holiday until 01/08/14.  Please call the sales department on 0800 xxxxxx in my absence"

Link to Technet:


Re-run the Get-MailboxAutoReplyConfiguration command to check the changes have been made correctly.

Mailbox Recovery

Create recovery database using recovered database files:

New-MailboxDatabase -Recvoery -Name "database name" -Server "server name" -EdbFilePath "pathtodatabase" -LogFolderPath "pathtologfiles"


Check database status (using local PowerShell):

eseutil /mh 'pathtoEDBfile'


Check logs status:

eseutil /ml 'pathtologfolder'


Guide to recovery:


Once recovery database is mounted; recover mailbox to current user:

Restore-Mailbox -Identity "Administrator" -RecoveryDatabase "database name" -RecoveryMailbox "username" -TargetFolder "Recovery"


This command is better one to use as it recovers the dumpster also:

New-MailboxRestoreRequest -SourceDatabase "database name" -SourceStoreMailbox "username" -TargetMailbox "username" -TargetRootFolder "Recovery"


Can then use New-MailboxExportRequest to export to PST.

Mailbox Permissions

Add permissions on mailbox for another user:

Add-MailboxFolderPermission -Identity DOMAIN\Username -User DOMAIN\PermittedUsername -AccessRights Reviewer
Add-MailboxFolderPermission -Identity DOMAIN\Username:\Inbox -User DOMAIN\PermittedUsername -AccessRights Reviewer


Remove permissions:

Remove-MailboxFolderPermission -Identity DOMAIN\Username -User DOMAIN\PermittedUsername
Remove-MailboxFolderPermission -Identity DOMAIN\Username:\Inbox -User DOMAIN\PermittedUsername


Guide to mailbox permissions:

Mailbox Statistics

List mailbox databases:



List mailbox sizes (has to be run on Local Exchange CLI else TotalItemSize does not work):

Get-MailboxStatistics -Database "Mailbox Database" | Select DisplayName, ItemCount, TotalItemSize, StorageLimitStatus | Sort-Object TotalItemSize -Descending | Export-CSV C:\MBSizes.csv