locked
powershell for setting all user set-mailbox -maxreceivesize RRS feed

  • Question

  • hi,

    i can't get my exchange powershell script to change 'set-mailbox * -maxrecievesize 40Mb', please help.

    thanks.

    Thursday, March 8, 2012 5:48 PM

Answers

  • Get-Mailbox | Set-Mailbox -maxrecievesize 40Mb

    Sukh

    • Marked as answer by Ricarte V Thursday, March 8, 2012 6:06 PM
    Thursday, March 8, 2012 5:53 PM
  • Hi,

    Set-mailbox must be used for a mailbox. See the example:

    Get-User -identity "user name" | Set-Mailbox -MaxReceiveSize 41943040


    Regards from www.windowsadmin.info | www.blog.windowsadmin.info

    • Marked as answer by Ricarte V Thursday, March 8, 2012 6:06 PM
    Thursday, March 8, 2012 5:56 PM

All replies

  • Get-Mailbox | Set-Mailbox -maxrecievesize 40Mb

    Sukh

    • Marked as answer by Ricarte V Thursday, March 8, 2012 6:06 PM
    Thursday, March 8, 2012 5:53 PM
  • Hi,

    Set-mailbox must be used for a mailbox. See the example:

    Get-User -identity "user name" | Set-Mailbox -MaxReceiveSize 41943040


    Regards from www.windowsadmin.info | www.blog.windowsadmin.info

    • Marked as answer by Ricarte V Thursday, March 8, 2012 6:06 PM
    Thursday, March 8, 2012 5:56 PM
  • i got these

    [PS] C:\>Get-Mailbox | Set-Mailbox -maxrecievesize 40Mb
    A positional parameter cannot be found that accepts argument '41943040'.
        + CategoryInfo          : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException
        + FullyQualifiedErrorId : PositionalParameterNotFound,Set-Mailbox

    Invoke-Command : Cannot write input as there are no more running pipelines
    At C:\Users\administrator.xxxxxx\AppData\Roaming\Microsoft\Exchange\RemotePowerShell\xxxxxx003.chudleighs.com\xxxxxx003.xxxxx.com.psm1:48005 char:29
    +             $scriptCmd = { & <<<<  $script:InvokeCommand `
        + CategoryInfo          : InvalidOperation: (:) [Invoke-Command], PSInvalidOperationException
        + FullyQualifiedErrorId : NoMoreInputWrite,Microsoft.PowerShell.Commands.InvokeCommandCommand

    [PS] C:\>

    Thursday, March 8, 2012 6:00 PM
  • somehow it worked the second time, thanks and more power.
    Thursday, March 8, 2012 6:06 PM
  • In Exchange (2010) there are four different places where you can set delivery size restrictions.

    1. On the complete Exchange Organisation.
    Console: Global Settings -> Transport Settings
    Shell:
    Get-TransportConfig %organizationname% | Set-Transportconfig %organizationname% -MaxReceiveSize 50 MB
    Get-TransportConfig %organizationname% | Set-Transportconfig %organizationname% -MaxSendSize 50 MB

    (you can find your organisationname with this command: Get-OrganizationConfig | ft name)

    2a. On a specific Receive Connector.
    Console: Server Configuration -> Hub Transport -> Receive Connectors
    Shell: Get-ReceiveConnector %connectorname% | Set-ReceiveConnector %connectorname% -MaxMessageSize 25 MB

    2b. On a specific Send Connector.
    Console: Organization Configuration -> Hub Transport -> Send Connectors -> $connectorname% -> General 
    Shell: Get-SendConnector %connectorname% | Set-SendConnector %connectorname% -MaxMessageSize 25 MB

    3. On a specific User.
    Console: Open User Mailbox -> Mail Flow Settings -> Message Size Restrictions
    Shell: Get-Mailbox %emailaddress% | Set-Mailbox %emailaddress% -MaxReceiveSize 10 MB




    • Edited by efgslats Friday, August 22, 2014 1:48 PM
    Friday, August 22, 2014 1:04 PM