Microsoft Bookings
1 TopicEasy HashTable Question
I'm tragically stuck on what I know is a simple query. For context, I'm trying to update a Bookings calendar service business hours through PowerShell. The cmdlet isUpdate-MgBookingBusinessService. Therelevant JSON that is returned from Get-MgBookingBusinessService is below. "schedulingPolicy": { "generalAvailability": { "availabilityType": "customWeeklyHours", "businessHours": [ { "day": "monday", "timeSlots": [ { "startTime": "10:30:00.0000000", "endTime": "18:30:00.0000000" } ] }, { "day": "tuesday", "timeSlots": [ { "startTime": "10:30:00.0000000", "endTime": "18:30:00.0000000" } ] }, { "day": "wednesday", "timeSlots": [ { "startTime": "10:30:00.0000000", "endTime": "18:30:00.0000000" } ] }, { "day": "thursday", "timeSlots": [ { "startTime": "10:30:00.0000000", "endTime": "18:30:00.0000000" } ] }, { "day": "friday", "timeSlots": [ { "startTime": "10:30:00.0000000", "endTime": "18:30:00.0000000" } ] }, { "day": "saturday", "timeSlots": [] }, { "day": "sunday", "timeSlots": [] } ] } } I know how to update the availabilityType: Update-MgBookingBusinessService -BookingBusinessId <calendar> -BookingServiceId <service> -SchedulingPolicy @{"GeneralAvailability" = @{"availabilityType"="customWeeklyHours"}} But the amount of nested arrays to update the startTime and endTime for timeSlots has left me braindead. I feel like I'm so close, but somehow I'm just not getting it, and I've given up. Could someone please light the way for me? Thank you!Solved393Views0likes4Comments