Submitted By: Kent Finkle

List all of the appointments in the Outlook Calendar.

PowerShell
Edit|Remove
$comments = @'
Script name: Get-Appointments.ps1
Created on: Saturday, August 04, 2007
Author: Kent Finkle
Purpose: How can I use Windows Powershell to
list all the appointments in the calendar?
'@
 
$olFolderCalendar = 9
 
$o = new-object -comobject outlook.application
 
$n = $o.GetNamespace("MAPI") 
 
$c = $n.GetDefaultFolder($olFolderCalendar) 
 
$items = $c.Items
 
foreach ($a in $items) { 
    Write-Host($a.Subject)
}