• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1297
  • Last Modified:

Exchange 2007 Managed Folder Mailbox Policy

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
tpaukovits
Asked:
tpaukovits
  • 4
  • 3
1 Solution
 
tigermattCommented:

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

should do the trick for you.

-Matt
0
 
SaakarCommented:
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
 
tigermattCommented:

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
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
tpaukovitsAuthor Commented:
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
 
tpaukovitsAuthor Commented:
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
 
tpaukovitsAuthor Commented:
Great response with enough detail.
0
 
tigermattCommented:

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
 
tigermattCommented:
Got there before me! Glad you worked it out :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now