Sunday 14 October 2012

Get-Mailbox Filtered via Group Membership

To display the mailboxes that are a member of a particular group


$gp = $(Get-Group "GroupName").Identity.DistinguishedName

Get-Mailbox -Filter{(memberofgroup -eq $gp)}

2 comments:

  1. Second part did not work for me. Wrong output. Using -ne came even closer... Using:

    Get-Mailbox -Filter "Memberofgroup -eq '$gp'"

    however was right on the spot.
    source http://social.technet.microsoft.com/Forums/exchange/en-US/8998f61e-6954-4b47-84e7-94413e361666/powershell-and-getmailbox-filter?forum=exchangesvradminlegacy

    ReplyDelete
  2. They probably changed it, I know New-MailboxMoveRequest changed between 2010 and 2010 SP1

    ReplyDelete