Error message when you try to pipe the result of a cmdlet into another cmdlet by using Remote PowerShell in Office 365 dedicated: "The input object cannot be bound to any parameters for the command"

Applies to: Microsoft Business Productivity Online DedicatedMicrosoft Business Productivity Online Suite Federal

Symptoms


When you run an Exchange Management Shell cmdlet or a Windows Remote PowerShell cmdlet by using Remote PowerShell in Microsoft Office 365 dedicated, you may experience one of the following symptoms.

Symptom 1

When you try to pipe the result of the cmdlet into another cmdlet by using Remote PowerShell, you may receive the following error message:
The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.

Symptom 2

When you try to run the cmdlet by using Remote PowerShell, the cmdlet does not function as expected. Additionally, you may receive the following error message:
The specified mailbox "001-SN1MMR1-001" doesn't exist.

Cause


This issue occurs because the function of some Exchange Management Shell cmdlets is different when you run the cmdlets by using Remote PowerShell.

Resolution


There are some differences between Remote PowerShell and Exchange Management Shell. Exchange Management Shell is one of the tools that are included in Microsoft Exchange to administer Exchange environments. Typically, Remote PowerShell is used to administer Office 365 dedicated environments and ITAR environments. You should understand the best ways to create complex cmdlets.

In some cases, you can use a pipeline in Windows PowerShell to pipe the result of a cmdlet into another cmdlet. For example: 
Get-Mailbox -resultsize 10 | Get-MailboxStatistics 
Note For more information about the pipeline in Windows PowerShell, visit the following Microsoft TechNet websites:
You cannot use the pipeline when you run some cmdlets by using Remote PowerShell. If you receive an error that indicates that the pipeline cannot be used or that the item cannot be found, you can first store the result of a cmdlet in a variable and then write a foreach loop to pipe the result of the cmdlet to another cmdlet. 

For example, you can first store the result of a cmdlet in a variable and then writing a foreach loop to obtain the mailbox statistics for each mailbox. The cmdlet can be formed as follows:
$mbx = Get-Mailbox -resultsize 10
Foreach ($m in $mbx) {Get-MailboxStatistics -identity $m.ToSring()}
Note In this example, foreach is an alias for the Foreach-Object cmdlet. For more information about the Foreach-Object cmdlet, visit the following Microsoft TechNet website: