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