A Unified Communication Blog
Get Adobe Flash player

Here is a PowerShell script for adding a user to a distribution group in Exchange 2007.
The search criteria is users above 75 MB of Exchange usage is added to the Distribution Group.
The Script is a single liner (all command in one line):

Get-MailboxStatistics where-object {$_.TotalItemSize -ge 78643200 -and $_.ObjectClass -eq “Mailbox”} ForEach-Object -Process {Add-DistributionGroupMember -Identity “Enterprise Vault” -Member $_.LegacyDN}

The script can be very useful when using Enterprise Vault and Provisiong groups, where the account is being enabled for archiving when they reach a certain size in Exchange, without using quota.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Search

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 71 other subscribers

Follow me on Twitter