?
Solved

Exchange 2007 Managed Folder Mailbox Policy

Posted on 2009-12-23
8
Medium Priority
?
1,287 Views
Last Modified: 2012-05-08
In Exchange 2007 SP1, I have multiple Managed Folder Mailbox Policies.  I would like to be able to run an Exchange Shell command to get all the mailboxes with a certain policy i.e., get-mailbox | get-managedfoldermailboxpolicy "default policy" | ft .  However this does not work nor can I get any command to spit out the mailbox policy assoicated with a particular mailbox.

This can be done in the EMC GUI interface by using the filter.  Any idea how to do this with the shell i.e., even get a list of all the mailboxes with a policy.
0
Comment
Question by:tpaukovits
  • 4
  • 3
8 Comments
 
LVL 58

Accepted Solution

by:
tigermatt earned 1000 total points
ID: 26118544

Get-Mailbox -resultsize unlimited | where {$_.ManagedFolderMailboxPolicy -eq "Default Policy"}

should do the trick for you.

-Matt
0
 
LVL 12

Expert Comment

by:Saakar
ID: 26123501
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"
http://exchangeserverinfo.com/2009/08/14/how-to-cmdlets.aspx 
0
 
LVL 58

Expert Comment

by:tigermatt
ID: 26124697

Just as a point of note, the comment from the previous expert will set policies on a series of users but won't actually report who has which policy already applied.

Also, Exchange Management Shell will throw a warning each time you apply a managed folder policy, warning that older versions of Outlook may not be fully compatible with the policies applied. If setting managed folder policies en masse, you'd need to add the -ManagedFolderMailboxPolicyAllowed switch to the Set-Mailbox cmdlet to avoid this.

-Matt
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 

Author Comment

by:tpaukovits
ID: 26146923
Great.  so when I pipe this out (Get-Mailbox -resultsize unlimited | where {$_.ManagedFolderMailboxPolicy -eq "Default Policy"}
) to a txt file I see with the following columns...
Name                      Alias                ServerName       ProhibitSendQuota

Eventhough the results of this command only shows a specifc mailbox policy, how do I get a column called "ManagedFolderMailboxPolicy" to reflect the specific policy.  I assume I would use a select statement?  any help here
thanks a lot.  Great stuff so far....
0
 

Author Comment

by:tpaukovits
ID: 26146998
got it...Get-Mailbox | where {$_.ManagedFolderMailboxPolicy -eq "Defaul
t User Mailbox Policy"} | select displayname,database,managedfoldermailboxpolicy | ft > c:\test5

Thanks for your help.  Worked like a charm.

Troy
0
 

Author Closing Comment

by:tpaukovits
ID: 31669599
Great response with enough detail.
0
 
LVL 58

Expert Comment

by:tigermatt
ID: 26147010

A select statement would work, or you could use format-table (which can be shortened to simply 'ft').

For example:

Get-Mailbox -resultsize unlimited | Where {$_.ManagedFolderMailboxPolicy -eq "Default Policy"} | select name, ManagedFolderMailboxPolicy

or,

Get-Mailbox -resultsize unlimited | Where {$_.ManagedFolderMailboxPolicy -eq "Default Policy"} | ft name, ManagedFolderMailboxPolicy

Both those commands will produce exactly the same result; it's just down to personal preference whether you use ft (format-table) or select.

-Matt
0
 
LVL 58

Expert Comment

by:tigermatt
ID: 26147013
Got there before me! Glad you worked it out :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question