Set-Mailbox - Which parameter accepts pipeline input? Ambiguous Name for Particular Mailbox

Good Morning 

I have a slight issue with the following command:

Get-Mailbox | Set-Mailbox -AuditEnabled $True

When this command is run I get one particular mailbox that cannot set the value because it cannot distinguish between another mailbox in our environment - ambiguous name.  How can I find out what parameter the 'Set-Mailbox' cmdlet is using to accept pipeline input?

If I run this command against the 'problem' mailbox (without piping) it works:

Set-Mailbox -Identity -AuditEnabled $True

Some help would be greatly appreciated.

Thanks very much,

  • As documented in on TechNet, on the MS DOcs site and in PoSH built-in help files. PoSH matches on the pipeline by parameter then by value.




    One you are sending in a collection.

    Two you are sending a specific UPN.

    For what you are doing, and how you are trying to use the cmdlets. It is best you target what you are after using a loop, combining the two approaches you have here.

        Get-Mailbox | % {Set-Mailbox -Identity $_.UserPrincipalName -AuditEnabled $True}

Reply Children
No Data