Exchange 2010 PowerScript Issue - Recipient Limit

Posted on 2011-10-27
Last Modified: 2012-05-12
So I've created a simple powershell scrip that is supposed to set my Exchange 2010 users max allowed recipients for sending mail.  Essentially I have two groups, first, my normal users, who should only be able to send to 30 people max.  Second, I have my exec/hr group, that needs pretty much unrestricted sending.  So with a little assistance (or complete assistance, I'm still learning all the  Exchange Powershell cmdlets) I cam up with:

$users= get-mailbox -resultsize unlimited
$users | % { set-mailbox $_ -RecipientLimits 30}
$mailgroup = Get-DistributionGroupMember Mailgroup
$mailgroup | % {  set-mailbox $_ -RecipientLimits 500}

This works up until the last command, where it kicks back an error for each of my users in the defined group.  I even attempted to just recall the  "$users | % { set-mailbox $_ -RecipientLimits 30}" and replace the "$users" with "mailgroup" and 30 with 500 (also, not replacing the 30).  Get the same error.

Error is:
Cannot process argument transformation on parameter 'Identity'. Cannot convert the " Users 130/Larry
Enterline" value of type "Microsoft.Exchange.Data.Directory.Management.ReducedRecipient" to type "Microsoft.Exchange.Co
    + CategoryInfo          : InvalidData: (:) [Set-Mailbox], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-Mailbox

Question by:JamesonJendreas
    LVL 12

    Expert Comment


    Try the following..

    $mailgroup = Get-DistributionGroupMember Mailgroup | get-distributiongroupmember
    $mailgroup | % {  set-mailbox $_ -RecipientLimits 500 }

    Open in new window

    LVL 12

    Expert Comment

    Typo error...
    $mailgroup = Get-DistributionGroupMember Mailgroup | get-mailbox
    $mailgroup | % {  set-mailbox $_ -RecipientLimits 500

    Open in new window

    LVL 37

    Accepted Solution


    Change the last line to this: $mailgroup | % {  set-mailbox $_.identity -RecipientLimits 500}

    You need to specify the identity parameter because the value types don't match.

    LVL 1

    Author Closing Comment

    .identity is required!


    Featured Post

    Why do Marketing keep bothering you?

    Is your marketing department constantly asking for new email signature updates? Are they requesting a different design for every department? Do they need yet another banner added? Don’t let it get you down! There is an easy way to manage all of these requests...

    Join & Write a Comment

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    In this video we show how to create a User Mailbox 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 Recipients >> Mailb…
    The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now