Skip to main content

Posts

Export calendar Items to a CSV file using EWS and Powershell

Somebody asked about this last week and while I have a lot of EWS scripts that do access the Calendar I didn't have a simple example that just exported a list of the Calendar events with relevant information to a CSV file so here it is. I've talked on this one before in this howto  but when you query the calendar folder using EWS you need to use a CalendarView which will expand any recurring appointments in a calendar. There are some limits when you use a calendarview in that you can only return a maximum of 2 years of appointments at a time and paging will limit the max number of items to 1000 per call. So if you have a calendar with a very large number of appointments you need to break your query into small date time blocks. In this example script I'm just grabbing the next 7 days of appointments if you want to query a longer period you need to adjust the following lines (keeping in mind what I just mentioned) #Define Date to Query $StartDate = (Get-Dat...

Tracking and reporting on the Clutter Folder Item statistics using EWS in Exchange Online

If you haven't missed it Clutter is a new feature in Exchange Online that is trying to help deal with the deluge of email that most people receive each day using machine learning. Clutter has been live for a little while now and processing away in the background (if you have enabled it) so I decided to put together a script that will report on what Clutter has been up to using EWS. So the following script produces a report that is emailed to the owner of the Mailbox the script is run against. The report itself looks likes the following (I've been trying out some new HTML code that's optimized for mobile devices) So the script first enumerates all the Items in the clutter folder and then does some aggregation to work out how many messages in the clutter folder where received in the last 7 days, pervious week and month. It also calculates the total number of attachments ,senders and senders that are in the GAL. To work out if a Sender is in the Global Address List th...
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.