You can no longer use the -Office switch in combination with the New-Mailbox and the Set-Mailbox cmdlets in Microsoft Exchange Server 2016.
Additionally, you will receive an error message in PowerShell that's similar to the following:
Additionally, you will receive an error message in PowerShell that's similar to the following:
Set-Mailbox <Mailbox> -Office "Test"
Cannot convert 'System.String' to the type 'System.Management.Automation.SwitchParameter' required by parameter 'OfficeGraph'.
At C:\Users\totoni\AppData\Local\Temp\tmp_0ajtxi22.ylz\tmp_0ajtxi22.ylz.psm1:54428 char:9
+ $steppablePipeline.End()
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Exchange.Management.RecipientTasks.SetMailbox
Cannot convert 'System.String' to the type 'System.Management.Automation.SwitchParameter' required by parameter 'OfficeGraph'.
At C:\Users\totoni\AppData\Local\Temp\tmp_0ajtxi22.ylz\tmp_0ajtxi22.ylz.psm1:54428 char:9
+ $steppablePipeline.End()
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgument,Microsoft.Exchange.Management.RecipientTasks.SetMailbox
Set-Mailbox <Mailbox> -OfficeGraph -Office "Test"
Cannot bind parameter because parameter 'Office' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter value1,value2,value3".
At C:\Users\totoni\AppData\Local\Temp\tmp_0ajtxi22.ylz\tmp_0ajtxi22.ylz.psm1:54428 char:9
+ $steppablePipeline.End()
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : ParameterAlreadyBound,Microsoft.Exchange.Management.RecipientTasks.SetMailbox
Cannot bind parameter because parameter 'Office' is specified more than once. To provide multiple values to parameters that can accept multiple values, use the array syntax. For example, "-parameter value1,value2,value3".
At C:\Users\totoni\AppData\Local\Temp\tmp_0ajtxi22.ylz\tmp_0ajtxi22.ylz.psm1:54428 char:9
+ $steppablePipeline.End()
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Set-Mailbox], ParameterBindingException
+ FullyQualifiedErrorId : ParameterAlreadyBound,Microsoft.Exchange.Management.RecipientTasks.SetMailbox