I’ve read through multiple docs on powershell piplelines, but I’m stuck in a place where I need to use two pipelines with two variables for Exchange Online.
For example:
[pre]get-mailbox -ResultSize unlimited[/pre]
Will give me a bunch of mailboxes. One of the values returned is recipientTypeDetails, so:
Will give me a list of all roomMailboxes with the Name and Alias fields.
I need to pipe that in to a 3rd command in order to see the value of “automateprocessing” of all rooms.
[pre]Get-CalendarProcessing -identity MyRoomName | ft identity,automateprocessing [/pre] does that for me for a single room. I want to get the output of all rooms from the 2nd command in order to build that list.
you’re passing a scriptblock in for the identity flag.
so, this will work as would any of the other attributes that get-calenderprocessing accepts for identity:
[pre]
get-mailbox -ResultSize unlimited |where {$.recipientTypeDetails -eq “roomMailbox”} | Get-CalendarProcessing $.alias
[/pre]
as well, since identity on get-calendarprocessing accepts pipeline input, all you truly need is the following:
The Get-CalendarProcessing cmdlet doesn’t accept pipeline input in that way. You need to strip your objects down to just the Identity property, as the receiving command’s parameter only accepts input by value. In order to accept the scriptblock syntax, I believe it needs to accept pipeline input by property name (refer to the docs page or Get-Help to determine what kinds of input each parameter can accept.)