I want to get the appointments for today and tomorrow of 3 different persons that are on my address book. These persons have the calendar shared on outlook.
How can I get this info with powershell? I don't mind getting the data from a local outlook instance but would prefer something connected directly to the server.
You can start with this (local outlook instance), you may need to further filter the result based on some properties to find your friends information:
$olFolderCalendar = 9
$ol = New-Object -ComObject Outlook.Application
$ns = $ol.GetNamespace('MAPI')
$Start = (Get-Date).AddDays(-1).ToShortDateString()
$End = (Get-Date).ToShortDateString()
$Filter = "[MessageClass]='IPM.Appointment' AND [Start] > '$Start' AND [End] < '$End'"
$ns.GetDefaultFolder($olFolderCalendar).Items.Restrict($Filter)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With