Skip to main content

Posts

Showing posts with the label calendar

Export calendar Items to a CSV file using Microsoft Graph and Powershell

For the last couple of years the most constantly popular post by number of views on this blog has been  Export calendar Items to a CSV file using EWS and Powershell closely followed by the contact exports scripts. It goes to show this is just a perennial issue that exists around Mail servers, I think the first VBS script I wrote to do this type of thing was late 90's against Exchange 5.5 using cdo 1.2. Now it's 2020 and if your running Office365 you should really be using the Microsoft Graph API to do this. So what I've done is create a PowerShell Module (and I made it a one file script for those that are more comfortable with that format) that's a port of the EWS script above that is so popular. This script uses the ADAL library for Modern Authentication (which if you grab the library from the PowerShell gallery will come down with the module). Most EWS properties map one to one with the Graph and the Graph actually provides better information on recurrences then...

Creating a year at a glance Calendar (in Excel) from aggregated Shared Calendars in Exchange Online within a Microsoft Teams Tab app using the Microsoft Graph

Calendaring formats in Messaging Clients tend to all follow much the same approach whether its Outlook, Outlook on the Web or Mobile, Gmail or Microsoft Teams .  Like email data, calendar data can be random and complex in its volume and type (recurring appointments etc) so a simple year at a glance calendar for someone designing a mass market client is hard to do well for all the data types and volumes that you could encounter, therefor its not something you see in mail clients by default (lets face it who wants to support that). In the absence of year at a glance calendars  I was surprised to see people using Excel to create yearly aggregated calendars in Microsoft Teams for events (for data that already existed in shared Calendars). But more surprisingly is that it actually kind of worked well when there wasn't a lot of data that needed to be shown. The one thing that sprang to my mind was if you could automate this it  would be really good for people who use the Bir...

Create a Microsoft Teams Group Calendar tab application using the Graph API and FullCalendar JavaScript library

Group calendars have always been one of the big asks for in any group collaboration programs back from Lotus Notes to Microsoft Exchange and now Microsoft Teams. There are a few ways of getting a Group calendar working in Teams, one is hosting the OWA web apps see or some other people advocate using a SharePoint calendar and hosting that similarly. Here is a different method you can use by taking advantage of being able to call the Graph API in a  Tab application. The getSchedule Graph action (still currently in beta) allows you to query up to 62 days of Freebusy information on up to 100 calendars in a single call this makes it a good option for this type of application. So as long as users can view each others calendars or have detailed freebusy permissions the action should return the le vel of detail required for a Group calendar.   The other thing you can do with the Graph API is get the users photo and build a nice legend for the Group calendar also. To make this visu...

Using the Office365/Exchange 2016 REST API Calendaring

When it comes to Messaging API's there no more complex thing then calendaring, not only because most vendors implement things a little differently but Exchange also has a little legacy feature drag because of its length of time in the market place and the difficulties in changing the technology and human interaction with it. The new REST API offers yet another window into calendaring on Office 365 and Exchange 2016 with a major security benefit over its predecessor which is the ability to be able to scope your application access so it can only access the Calendar folders in a Mailbox where previously apps may have needed to have Full Rights or impersonation rights on a Calendar. Also the new REST API allows you to interact with Group Calendars (or Teams Calendar) so leveraging the new REST API to value add to the adoption of these new features can be a worth your while. To Support Calendaring I've added 2 new cmdlets to the Exch-Rest module to handle creating Appointments and...

Showing the client that was used to create or update an Appointment in Exchange 2013/16 using EWS

Previously I posted an example on Mining the Client information on Sent Messages in EWS to report on what client is being used in this post . For Calendar appointments there is a simular but different property that gets set when you either create or update a Appointment eg (This property is set by the Exchange Store based on what client is being used)  I've put together a script that aggregates this property and produces a summary report like Its also produces an export report of all the appointments that looks like the following so you can see at the appointment level what client is being used. I've put this script up on GitHub here https://github.com/gscales/Powershell-Scripts/blob/master/ShowCalendarClients.ps1

Showing the Calendar Configuration of a Mailbox or Meeting Room using EWS

When you configure Calendar processing settings in Exchange either using the Exchange Administrator Centre via the Exchange Management Shell (Set-CalendarProcessing) many of these setting get held in a FAI (Folder Associated Item) in the Calendar Folder of the Mailbox in question. In EWS you can access these configuration objects using the UserConfiguration operation and classes. The Calendar settings are stored in the Roaming Dictionary format to store each of the different Key and Value pairs. For some of the settings like the bookin policy (In-policy meeting requests) and (Out-of-policy meeting requests) these are stored as an array of ExchangeDn's. I've put together a script cmdlet called Show-CalendarSettings that can dump out the Roaming dictionary setting for a Calendar Configuration object using EWS. And also for the BookIn and RequestIn policy it will loop through each of the ExchangeDn's in the array and try to resolve each of the entries vi...

Setting the Colour of a calendar using EWS and Powershell in Exchange

In Outlook and OWA when you are using the Multiple calendar view feature you can assign different colors to calendars within that view. (By default the calendar color is set to automatic which means a color is assigned at random) eg When you add a Shared Calendar to your Mailbox you create a Calendar WunderBar Navigational shortcut which are documented https://msdn.microsoft.com/en-us/library/ee202589(v=exchg.80).aspx  . The color that these shortcuts will be set to is set via the PidTagWlinkCalendarColor property https://msdn.microsoft.com/en-us/library/ee200641(v=exchg.80).aspx  . So if you want to set the color of one of these shortcuts with a script it does require a little bit of work. First to get the shortcut Items you need to first get the CommonViews folder and then enumerate the FAI Items collection where these shortcuts are stored. Now depending if you want to the Set the Default Folder Shortcut or a Shared Folder Shortcut (or the other calendars Shortcu...
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.