Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you create Appointments (not meetings) in Outlook with Powershell?

I am trying to create Outlook Calendar appointments via a Powershell script. The below script works, it adds events to the calendar. But it adds an unsent Meeting Invitation to the calendar, not an Appointment. When I set the MeetingStatus to zero (or any other value besides 1) -- which is supposed to indicate a non-meeting event, aka an Appointment -- nothing gets added to the calendar.

$meeting = $ol.CreateItem('olAppointmentItem')
$meeting.Subject = 'New Years Day'
$meeting.Location = 'Office Closed'
$meeting.ReminderSet = $false
$meeting.MeetingStatus = 1
$meeting.Start = '1/1/2021 8:00:00 AM'
$meeting.Duration = 540
$meeting.BusyStatus = 3
$meeting.Categories = 'Holiday'
$meeting.Send()

Can someone please point out what I'm doing wrong?

Thank you

like image 560
Branden Frederick Avatar asked Oct 15 '25 04:10

Branden Frederick


1 Answers

A friend pointed out the solution, so I'll document it here for completeness:

I was using Send() but to save an appointment (MeetingStatus = 0) I need to instead use Save()

Made the change and it works like a charm.

like image 118
Branden Frederick Avatar answered Oct 17 '25 17:10

Branden Frederick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!