Hi all,
I have a ps script that i am attempting to use to automatically set appointments through outlook 2013 that is an exchange account. Everything works except i cant seem to figure out how to send an invitation to an email address, or a group of email address (this will be different as the PS script is embedded into an automation program to open up powershell and run the script using variables for the calendar information.) anyone have any idea how to send the appointment as a invitation? i was able to send it as a internet calendar but that is it.
Just so people are aware of where i am at now, the ps script is below. Using this script is all contingent on getting the ability to send email invitations per calendar meeting.
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::olFreeBusyOnly
$CalendarSharing.startDate = Get-Date
$CalendarSharing.endDate = (Get-Date).addDays(7)
$CalendarSharing.RestrictToWorkingHours = $true
$CalendarSharing.IncludeAttachments = $false
$CalendarSharing.IncludePrivateDetails = $false
$MailItem = $CalendarSharing.ForwardAsICal($olCalendarMailFormat::olCalendarMailFormatDailySchedule)
$MailItem.Recipients.Add("Example.Email@anyone.com")
$MailItem.Send()