Set up internet calendar subscription (ics URL) on Exchange account via EWS or powershell.

Copper Contributor

The anterprise i am actually working has over 1k accounts on office 365, related to an Unitime appliance, which generates calendars for all of them.



I have created a script which adds a standard ICS file to an Exchange account via EWS 2.0. But the process is painfully slow (over 9hrs).


As i see (and already checked ok) at: . It seems the internet calendar subscription can be set using Extended propertires of an item.


Althrough, already blindly tried a manual set up, but the function: service.convertId seems to have real issues converting owaId to ewsId.


Just need some documentation.







5 Replies

PowerShell to the rescue:


Set-MailboxCalendarFolder mailbox:\Calendar -PublishEnabled $true


And to get the URL:


Get-MailboxCalendarFolder sharednew:\Calendar | select PublishedCalendarUrl,PublishedICalUrl


Thanks, but i am asking for the opposite.


From ICS file/Url ----> Exchange.


Your answer means to give mine to others, but i need to set a published (ouside office) ics file into users calendar folder (inside office). To set the subscription to a 3rd party ics url programatically.



I need to do it too. Did you find a solution ?



Do you think this will work to get the publish URL for an office 365 group calendar? Too swamped to test myself at the moment but with our MS Teams push we are failing because we cannot share the Teams calendar with our Teams guests.
Do you have an update for us?
Does a solution exist today?