Export Outlook calendar

July 28, 2014

So many calendars at so many places! Ligthning / Iceowl is perfect to integrate them all. But how to get the Outlook calendar from the office?

With a Powershell script and Box.com (or Dropbox or …)! Basic idea is from the Hey, Scripting Guy! Blog.

# http://blogs.technet.com/b/heyscriptingguy/archive/2009/12/17/hey-scripting-guy-december-17-2009.aspx

# Requires -version 2.0

Add-Type -AssemblyName microsoft.office.interop.outlook 
$olFolders = "Microsoft.Office.Interop.Outlook.OlDefaultFolders" -as [type]
$olCalendarDetail = "Microsoft.Office.Interop.Outlook.olCalendarDetail" -as [type]
#$olCalendarMailFormat = "Microsoft.Office.Interop.Outlook.olCalendarMailFormat" -as [type]

$outlook = New-Object -ComObject outlook.application
$namespace  = $Outlook.GetNameSpace("mapi")
$folder = $namespace.getDefaultFolder($olFolders::olFolderCalendar)
$CalendarSharing=$folder.GetCalendarExporter()
$CalendarSharing.CalendarDetail = $olCalendarDetail::olFreeBusyAndSubject
$CalendarSharing.startDate = (Get-Date).addDays(-60)
$CalendarSharing.endDate = (Get-Date).addDays(365)
$CalendarSharing.RestrictToWorkingHours = $false
$CalendarSharing.IncludeAttachments = $false
$CalendarSharing.IncludePrivateDetails = $true
#$MailItem = $CalendarSharing.ForwardAsICal($olCalendarMailFormat::olCalendarMailFormatDailySchedule)

#$MailItem.Recipients.Add("Scripter@Microsoft.Com")

#$MailItem.Send()

$CalendarSharing.SaveAsICal("C:\Users\username\Box` Sync\cal\cal.ics")

Let this run as a scheduled job.

Give Lightning / Iceowl access to the ics file in the Box.com account.

Ausweiskopien

Sind Ausweiskopien in Deutschland erlaubt oder nicht? Continue reading

Access Jedox H2 Console

Published on March 21, 2016