Exchange 2010 – Add Send As Permission for All Users/Future Users from a User Account

No need for a bunch of hoopla, here’s the short and sweet version.

Add Send As Permission for All Users from a User Account

Get-Mailbox -ResultSize Unlimited | Add-ADPermission -User "YourDomain\Username" -Extendedrights "Send As"

To add send as permissions for future users, we need to create a powershell script with the above line in it, make sure you have enabled the use of unsigned scripts by issuing the “Set-ExecutionPolicy remotesigned” command at an administrator ran PowerShell prompt, and create a task scheduler job to run our script with the administrator credentials saved in there.
Continue reading “Exchange 2010 – Add Send As Permission for All Users/Future Users from a User Account”

Exchange Server 2010 – Shrink Database Size – OR – Reclaim Lost Database Storage Space

As mentioned in a previous post, if you’re Email Server is running out of hard drive space and you’re in a world of hurt, there are several steps you must take to get that space back. Even if you have your user’s tidy up their mailbox and you force delete out their RecoveryItems folders, you will essentially be creating free whitespace to store more messages but the size of your database will never shrink below it’s current state. To actually shrink size of the database file, you will have to do the following:

  1. Have the end users get rid of all their unimportant emails and empty their Deleted Items folder.
  2. Purge all of the user’s RecoveryItems folders. To learn how, read this.
  3. Either create a new mailbox database, mount it, move all the mailboxes to it, then dismount and delete the old database

    — OR —
    Dismount the databases and run the defrag utility

Either way, both scenarios are extremely time consuming so get your blanket and sun tan lotion because you’re never getting off that beach, just the way you never got into the NHL, ya jackass!
Continue reading “Exchange Server 2010 – Shrink Database Size – OR – Reclaim Lost Database Storage Space”

Exchange Server 2010 – Purge the Deleted Items (RecoverableItems) Folder

Being the devoted Email Administrator that you are, you notice that the space for storing mailboxes on your Exchange Server is getting dangerously low, so you decide to take action. Logically, your first thought would be to have all your end users go through all the folders in their mailbox and get rid of any junk they don’t need and then empty their “Deleted Items” folder to regain the space back. After all, in most cases there really is no reason for users to keep every single email they’ve ever sent and received since the beginning of time (which a lot of them tend to do and I’ll never understand why).

Unfortunately, as you’ve probably already noticed, that is not the case. Simply having a user empty their “Deleted Items” folder has no effect on the database size whatsoever. This is partially due to the nifty feature that allows users to be able to recover deleted messages after they’ve already emptied their trash. By default, Exchange keeps deleted items for 14 days until they are purged, so now it is necessary to manually force the deletion of these items.
Continue reading “Exchange Server 2010 – Purge the Deleted Items (RecoverableItems) Folder”

Exchange Server 2010 – Get a List of Mailboxes by Size

In the Exchange Management Shell, to get a simple list of mailboxes sorted by size, in descending order:

Get-Mailbox | Get-MailboxStatistics | Sort-Object TotalItemSize -descending | ft DisplayName,TotalItemSize -autosize

Now let’s dig a little deeper and show each mailbox’s storage quota limit status and display the total count of email messages as well:

Get-Mailbox | Get-MailboxStatistics | Sort-Object TotalItemSize -descending | ft DisplayName,StorageLimitStatus,ItemCount,TotalItemSize -autosize

Continue reading “Exchange Server 2010 – Get a List of Mailboxes by Size”

Exchange Server 2010 – Export Message Tracking Log Results to CSV File

From inside of the Exchange Management Shell, here are a few examples of how to export the message tracking log results to a csv (comma separated value) file which is easily imported and manipulated in a spreadsheet application such as Microsoft Excel or Open Office Calc:

To display the date, time, recipients, and the message subject on all of the sent items from a mailbox between a given time period:
Continue reading “Exchange Server 2010 – Export Message Tracking Log Results to CSV File”

Exchange Server 2010 – Changing Message Tracking Log Retention Period

To ensure that the Message Tracking Log is enabled, inside the Exchange Management Console, navigate to the following area:

Server Configuration >
Hub Transport >
Right click on your Hub Transport entry >
Log Settings Tab >
Check the box labeled "Enable message tracking log" and directly underneath it, enter the path where your log files will reside.

Open the Exchange Management Shell console and determine your server’s identity and verfiy logging is enabled with either of these commands.
Continue reading “Exchange Server 2010 – Changing Message Tracking Log Retention Period”