Submitted By: Kent Finkle

Creates a recurring task in Microsoft Outlook.

PowerShell
Edit|Remove
$comments = @'
Script name: Create-RecurrentTask.ps1
Created on: Wednesday, September 05, 2007
Author: Kent Finkle
Purpose: How can I use Windows Powershell to
Create a Recurrent Task in Microsoft Outlook?
'@
$olTaskItem = 3
$olRecursDaily = 0
$o = new-object -comobject outlook.application
$t = $o.CreateItem($olTaskItem)
$t.Subject = "Eat Donuts"
$t.StartDate = "9/6/2007 9:00 AM"
$t.DueDate = "9/6/2007 9:30 AM"
$pattern = $t.GetRecurrencePattern()
        
$pattern.RecurrenceType = $olRecursDaily
$pattern.PatternStartDate = "9/6/2007"
$pattern.NoEndDate = $True
$t.ReminderSet = $True
$t.ReminderTime = "9/6/2007 8:50 AM"
$t.save()