Send-MapiCalendar

Description

This cmdlet creates a calendar event and sends invites to one or more recipients.

Syntax
Note: Parameters in orange are optional.
Send-MapiCalendar
-StoreMapiObject<Mapi.NET.Store>
-SubjectString
-LocationString
-StartDateDateTime
-DurationSystem.Int32
-ReminderMinutesSystem.Int32
-BodyString
-RequiredAttendeesString[]
-OptionalAttendeesString[]
-ResourceAttendeesString[]
-AttachmentsString[]
-SendFromString
-BodyIsHtmlSwitchParameter
-DeleteAfterSuccessfulSendSwitchParameter
-BusyStatusPowerMapi.Commands.SendCaldendar.BusyStatus
-PrivateBoolean
-CalendarDatesAreUTCSwitchParameter
-DelayedSendTimeDateTime
-DelayedSendIsUTCSwitchParameter
-PriorityMapi.NET.Flags.PR_IMPORTANCE
Send-MapiCalendar
-SessionMapiObject<Mapi.NET.Session>
-SubjectString
-LocationString
-StartDateDateTime
-DurationSystem.Int32
-ReminderMinutesSystem.Int32
-BodyString
-RequiredAttendeesString[]
-OptionalAttendeesString[]
-ResourceAttendeesString[]
-AttachmentsString[]
-SendFromString
-BodyIsHtmlSwitchParameter
-DeleteAfterSuccessfulSendSwitchParameter
-BusyStatusPowerMapi.Commands.SendCaldendar.BusyStatus
-PrivateBoolean
-CalendarDatesAreUTCSwitchParameter
-DelayedSendTimeDateTime
-DelayedSendIsUTCSwitchParameter
-PriorityMapi.NET.Flags.PR_IMPORTANCE
Send-MapiCalendar
-StoreMapiObject<Mapi.NET.Store>
-SubjectString
-LocationString
-StartDateDateTime
-EndDateDateTime
-ReminderMinutesSystem.Int32
-BodyString
-RequiredAttendeesString[]
-OptionalAttendeesString[]
-ResourceAttendeesString[]
-AttachmentsString[]
-SendFromString
-BodyIsHtmlSwitchParameter
-DeleteAfterSuccessfulSendSwitchParameter
-BusyStatusPowerMapi.Commands.SendCaldendar.BusyStatus
-PrivateBoolean
-CalendarDatesAreUTCSwitchParameter
-DelayedSendTimeDateTime
-DelayedSendIsUTCSwitchParameter
-PriorityMapi.NET.Flags.PR_IMPORTANCE
Send-MapiCalendar
-SessionMapiObject<Mapi.NET.Session>
-SubjectString
-LocationString
-StartDateDateTime
-EndDateDateTime
-ReminderMinutesSystem.Int32
-BodyString
-RequiredAttendeesString[]
-OptionalAttendeesString[]
-ResourceAttendeesString[]
-AttachmentsString[]
-SendFromString
-BodyIsHtmlSwitchParameter
-DeleteAfterSuccessfulSendSwitchParameter
-BusyStatusPowerMapi.Commands.SendCaldendar.BusyStatus
-PrivateBoolean
-CalendarDatesAreUTCSwitchParameter
-DelayedSendTimeDateTime
-DelayedSendIsUTCSwitchParameter
-PriorityMapi.NET.Flags.PR_IMPORTANCE
Parameters
StoreA Mapi.NET.Store from which to create and send the calendar invite.
SessionA Mapi.NET.Session from which the default store is used to create and send the invite.
SubjectA text string that will be the subject of the new calendar item.
LocationA text string that will be the location of the new calendar item.
StartDateA DateTime value that is the start time of the calendar event. See remarks.
DurationAn integer value representing the total number of minutes for the event. This is mutually exclusive with EndDate.
EndDateA DateTime value that represents the time when the calendar event ends. This is mutually exclusive with Duration.
ReminderMinutesAn optional integer value representing the the number of minutes before StartDate to fire a reminder notification. If zero or omitted, no reminder is set.
BodyAn optional text string that is the body text of the calendar event.
RequiredAttendeesAn optional list of email addresses, each representing a required attendee of the meeting and to which invites will be sent.
OptionalAttendeesAn optional list of email addresses, each representing an optional attendee of the meeting and to which invites will be sent.
ResourceAttendeesAn optional list of email addresses, each representing an resource attendee, such as a room or piece of equipment, and to which the invite will be sent.
AttachmentsAn optional list of files to be attached to the calendar event. Each item in the list is a fully qualified path to a file in a file system.
SendFromAn optional email address that will be used as the sender of the calendar event. If this is different than the currently authenticated account, Send-As permission is required.
BodyIsHtmlA SwitchParameter which, if present, causes the cmdlet to treat the text of the Body parameter as HTML markup instead of plain text.
DeleteAfterSuccessfulSendA SwitchParameter which, if present, causes the calendar event to be removed from the sender's Sent Items folder after successfully sending the invite.
AddToCalendarAn SwitchParameter which, if present, causes a copy of the calendar event to be added to the default Calendar folder of the sender's mailbox.
BusyStatusOne of the PowerMapi.Commands.SendCalendar.BusyStatus values indicating the availability of the attendees of the event.
PrivateA SwitchParameter which, if present, marks the calendar item as a private event, which can prevent the details of the event from appearing in Free/Busy lookups (Microsoft Exchange specific feature).
CalendarDatesAreUTCA SwitchParameter which, if present, treats all date parameters as UTC values. When this switch is not present, date parameters are converted from local time to UTC.
DelayedSendTimeA optional DateTime value that represents the time at which to actually send the calendar event. Delayed send places the item in the sender's outbox until the DelayedSendTime occurs.
DelayedSendIsUTCA SwitchParameter which, if present, treats the DelayedSendTime parameter as a UTC value. If omitted, the DelayedSendTime is converted from local time to UTC.
PriorityAn optional parameter which is one of the values from Mapi.NET.Flags.PR_IMPORTANCE which indicates the importance of the event: low, normal, high.
Remarks

This cmdlet creates and sends a calendar event to one or more recipients.

Note that Exchange and most Microsoft stores use UTC date and time values when storing date values.  This is useful so that if a recipient receives correspondence and is in a different timezone than the sender, times can be converted to the recipient's local timezone from a known, common time.

This cmdlet, by default, will convert DateTime values appropriately to UTC values when necessary, unless the CalendarDatesAreUTC switch is used.  When reading dates from items, including calendar items, some values may be in UTC and other may be in local time.  Such depends upon the property being read.

By default this cmdlet does not add the new calendar event to the senders calendar.  Use the AddToCalendar switch to cause the new event to be added to the sender's calendar.

When sending a calendar event, it is common practice to place a copy of the meeting request in the sender's Sent Items folder.  If the DeleteAfterSuccessfulSend switch is used, the Sent Items copy is removed after the event is sent.

The Body parameter, by default, treats the text provided as plain text to be added to the body.  If the BodyIsHtml switch is used, the cmdlet treats the Body parameter's text as HTML markup.

Note that PowerMapi currently does not have support for creating recurring calendar items.  This feature may come at a later date, based on community demand and feedback.  

Creating an "All Day" event is simply done by setting a start date of midnight of the start day, and a duration of 1440 (24 x 60 = 1440 minutes).