Convert TechEd Europe 2013 schedule to PowerShell objects

After I filled out my session slots for TechEd Europe 2013, I thought I would have some fun with the schedule. At first I thought I would rip the details from the website, until I noticed the ‘Subscribe to your entire schedule’ button on the website.

Since Outlook calendar items are neatly structured I decided that was the easiest method of converting my schedule to PowerShell. I am using the Outlook.Application ComObject to collect the information from my Outlook calendar.

Here is the code I utilized for this purpose:

Add-type -Assembly "Microsoft.Office.Interop.Outlook" | Out-Null
$Outlook = New-Object -ComObject Outlook.Application
$Namespace = $Outlook.GetNameSpace("MAPI")
$InternetCalendars = $Namespace.folders |
   Where-Object {$_.FullFolderPath -eq '\\Internet Calendars'}
$TechNetFolder = $InternetCalendars.folders |
   Where-Object {$_.FullFolderPath -match 'Teched Europe 2013'}
$TechNetFolder.Items | Sort-Object -Property Start |
   Select-Object -Property Subject,Start,End,Duration,Location,Body

Now this provides me with a neatly organized collection objects that contain the Title, Start Time, End Time, Duration and a description of the session. To find out which other properties are available on the Calendar items the Get-Member Cmdlet can be used. For example:

$TechNetFolder.Items | Get-Member

All the properties and methods that are available on these objects are now available. This provides us with a way to organize our schedule for TechEd however we see fit. Let me know what you think or if you have a nice way of utilizing this.


Leave a Reply