Advertisement
Guest User

Untitled

a guest
Mar 15th, 2016
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $outlook = new-object -com Outlook.Application
  2. $calendar = $outlook.Session.GetDefaultFolder(9) # == olFolderCalendar
  3. $appt = $calendar.Items.Add(1) # == olAppointmentItem
  4. $appt.Start = [datetime]$AppointmentTime
  5. $appt.Subject = $subject
  6. $appt.Location = $location
  7. $appt.ReminderSet = $true
  8. $appt.ReminderMinutesBeforeStart =$ReminderMinutesBeforeStart
  9. $appt.RTFBody = [System.IO.File]::ReadAllBytes('c:\rtfbody.rtf')
  10. $appt.Save()
  11. $outlook.Quit()
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement