How to cmdlets

To Apply Managed Folder Mailbox policy to users in bulk, below are the various options:

 

 

For everyone on a server:

Get-mailbox -server <servername> | set-mailbox -ManagedFolderMailboxPolicy <policyName>

 

For everyone on a database:

Get-mailbox -database <DB Name> | set-mailbox -ManagedFolderMailboxPolicy <policyName>

 

For Everyone in an OU:

Get-mailbox -OrganizationalUnit <OU Name> | set-mailbox -ManagedFolderMailboxPolicy <policyName>

 


For everyone in a DG:

Get-distributionGroupMember <DG name> | set-mailbox -ManagedFolderMailboxPolicy <policyName>


 

For everyone with a particular custom attribute set:

Get-mailbox | where {$_.CustomAttribute1 -eq "<vip>"} | set-mailbox -ManagedFolderMailboxPolicy "Policy name"

 

In Exchange Server 2007 Service Pack 1 (SP1), you can use the Set-Mailbox cmdlet with the RemoveManagedFolderAndPolicy switch to remove all MRM policies and attributes from a mailbox. When you use this command, the following tasks are performed:

 

To exclude one user from the Mailbox Manager policy, run the following cmdlet:

Set-Mailbox -Identity User1 -RemoveManagedFolderAndPolicy

 

 

You can remove the managed folder mailbox policy from a mailbox without affecting its managed folders by using the following command:

Set-Mailbox -Identity User1 -ManagedFolderMailboxPolicy:$null.

 

To exclude specific set of users who belong to a Distribution group from the Mailbox Manager Policy, run the following cmdlet:

Get-distributionGroupMember <DG name> | Set-Mailbox -RemoveManagedFolderAndPolicy "policy name"

 

NOTE: The above cmdlet does not work if you give the "policy name". It is because every mailbox can have only one policy associated to the account. Simply use the following cmdlet:

 

Get-distributionGroupMember <DG name> | Set-Mailbox -RemoveManagedFolderAndPolicy

 

You can place mailboxes on retention hold to turn off messaging records management, such as when users are on vacation.

 

Putting Mailboxes on Retention Hold:

 

You can place mailboxes on retention hold to turn off messaging records management, such as when users are on vacation.

 

For single user:

Set-Mailbox -Identity User1 -RetentionHoldEnabled $true -StartDateForRetentionHold 11-31-2008 -EndDateForRetentionHold 12-31-2008

 

For multiple users:

Get-mailbox -server <servername> | Set-Mailbox -RetentionHoldEnabled $true -StartDateForRetentionHold 12-25-2008 -EndDateForRetentionHold 12-31-2008

 

In Exchange 2003, we had the option of sending notification emails. This is not there anymore in Exchange 2007 and the updates so far. However, we can turn on logging to view the results of the MRM policies:

 

Configuring the Location of the MRM Log Directory

By default, the MRM logs are stored in the <Exchange installation path>\Logging\Managed Folder Assistant directory. The directory must be local to the Exchange 2007 computer.

 

To set the location of the MRM log directory

Set-MailboxServer -Identity ExchangeServer1 -LogPathForManagedFolders "C:\MRM\Managed Folder Assistant"

 

To configure the maximum size of the MRM log directory

Set-MailboxServer -Identity ExchangeServer1 -LogDirectorySizeLimitForManagedFolders "1 GB"

 

What did you think of this article?




Trackbacks
  • No trackbacks exist for this post.
Comments
  • No comments exist for this post.
Leave a comment

Submitted comments are subject to moderation before being displayed.

 Name (required)

 Email (will not be published) (required)

Your comment is 0 characters limited to 3000 characters.