The answer depends on the type and parameter passing options for the parameters of
ResourceDelegates
of the function
Set-CalendarProcessing
, in particular, if the parameter passed from the pipeline and processed correctly. If I can assume that this parameter can accept a list of values, the call will look like
Set-CalendarProcessing –ResourceDelegates @(jonDoe@test.com,johnnydoe@test.com) -identity testroom@test.com –AutomateProcessing AutoUpdate
Another option may or may not be supported by this cmdlet, I just don't know. If this parameter supports a list and if it also has the attribute
[Parameter(ValueFromPipeline = $true)]
, you could use it like this:
jonDoe@test.com,johnnydoe@test.com | Set-CalendarProcessing -identity testroom@test.com –AutomateProcessing AutoUpdate
This is something I just don't know, you need to check it up. Did you write this function? This would be not so trivial. To support a list, the function has to use
begin {<# ... #>} process {<# ... #>} end {<# ... #>}
statement, or part of it; in this case, the body of
process
is executed as many times as the length of the list.
—SA