0
votes

I am using PowerShell for managing my Office365 account. When I try to set parameters for existing mailbox, PowerShell ISE raises error. When I specify "RetentionComment", "LitigationHoldEnabled", "RetentionUrl" or "MaxSendSize" as Set-Mailbox function the following error occurs:

A positional parameter cannot be found that accepts argument '-maxsendsize'.
+ CategoryInfo : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Set-Mailbox`

These parameters documented in TechNet documentation library at http://technet.microsoft.com/en-en/library/bb123981(v=exchg.150).aspx

For example I use the following commands with parameters:

Set-Mailbox -Identity "my.mailbox" -MaxSendSize 12345
Set-Mailbox "my.mailbox" -RetentionComment "Hello World!"
Set-Mailbox -Identity "my.mailbox" -LitigationHoldEnabled:$False

Any idea? Please help!

2

2 Answers

0
votes

The MaxSendSize is only supported in Exchange 2013 or Exchange Online 2013. If your tenant has not been upgraded yet to wave 15 (the 2013 suite) you will not be able to use this command. Also, if you have ADFS set up you may also be unable to run this command because it must be set in AD and not in Exchange. Hope this helps.

-1
votes

For the -MaxSendSize 12345BI think you have to add a unit to the end so -MaxSendSize 12345B the available units are B/MB/GB/TB.

For -RetentionComment this comment can only be set if the RetentionHoldEnabled parameter is set to $true. So check that first.

For -LitigationHoldEnabled you don't need that : in there so -LitigationHoldEnabled $false