Forum Discussion
Jul 31, 2017
Array not supported?
Will this say that Array is not supported by set-CsRGSHolidayset?
Mike Shivtorov
Aug 12, 2017Copper Contributor
The error message says that it can't convert your untyped (object[]) array to the required type.
Try to specify the type for array elements:
[Microsoft.Rtc.Rgs.Management.WritableSettings.Holiday[]]$HolSetArray = @();
$HolSetArray += New-CsRgsHoliday -StartDate "2017-01-01T00:00:00" -EndDate "2017-01-01T23:59:59" -Name "New Year's Day"
$HolSetArray += New-CsRgsHoliday -StartDate "2017-12-26T00:00:00" -EndDate "2017-12-26T23:59:59" -Name "Christmas Day"
Aug 12, 2017
Sorry for not getting back to this post. I ended up doing it like this: