Forum Discussion
Import Calendar Event CSV File via Powershell to Room Resource Calendar
Greetings all,
Here's what I am trying to do: We manage our room scheduling with our student management system. I can export room schedule information to a CSV file. I need to be able to import this CSV file to Exchange 365, into a Room Resource Mailbox. We have all of our rooms set up as Resources in Exchange 365, and we have a meeting room display system that shows room availability via displays outside each room. I would like to set up the CSV import via Powershell so my users can schedule rooms in one place and it automatically populate to the Room Resource Calendar.
Thanks for the help...
TLDR: Need to import CSV calendar events via PowerShell into a room resource calendar. What's the best way? 🙂
5 Replies
- LeonPavesicSilver Contributor
Hi Matt-Rolando,
to import a event to a Resource Mailbox (Room) form a CSV file with PowerShell, you can use this:# Connect to Exchange Online Connect-ExchangeOnline # CSV File - Path to your file $csvFilePath = "C:\Path\To\Your\File.csv" # Your Room Resource Mailbox $roomResource = "email address removed for privacy reasons" # Import Calendar Event from CSV $calendarEvents = Import-Csv $csvFilePath foreach ($event in $calendarEvents) { $subject = $event.Subject $start = Get-Date $event.StartTime -Format "yyyy-MM-ddTHH:mm:ss" $end = Get-Date $event.EndTime -Format "yyyy-MM-ddTHH:mm:ss" # Create and Import Calendar Event New-ExoMailboxCalendarEvent -Mailbox $roomResource -Subject $subject -Start $start -End $end -Location $event.Location -Details $event.Description } # Disconnect from Exchange Online Disconnect-ExchangeOnline -Confirm:$false
- Matt-RolandoCopper Contributor
Thanks for the code Leon. I had run across this Exchange Online Module before, and it doesn't work. The New-EXOMailboxCalendarEvent is not recognized. I have installed the Exchange Online Management modules, and this function is not listed. I can not even find a reference to how it is implemented. Everything I have found to try and accomplish this function has not worked. I am beginning to think it is not possible.
Matt
- IanG5621Copper ContributorHi Matt,
I have a similar use case. Did you ever find a solution to this?
I have a few teams rooms calendars for classrooms. I am looking for a way to bulk load events to the room calendar for the semester but still keep the ability for others to book the room around the scheduled classes.
Thanks
Ian...