3

EWS または EWS マネージ API を使用して Exchange から共有予定表にアクセスするにはどうすればよいですか? そこからアイテムを読み取れるようにする必要があります。

4

1 に答える 1

4

たぶん、何かを始めますか?

# Your mailbox here
$mailboxName = "blah@blih.com"

Add-Type -Path "C:\Program Files\Microsoft\Exchange\Web Services\2.0\Microsoft.Exchange.WebServices.dll"  
$version = [Microsoft.Exchange.WebServices.Data.ExchangeVersion]::Exchange2010_SP2  
$service = new-object Microsoft.Exchange.WebServices.Data.ExchangeService($version)  
$service.UseDefaultCredentials = $true  
$service.AutodiscoverUrl($mailboxName)

$folderid = new-object Microsoft.Exchange.WebServices.Data.FolderId([Microsoft.Exchange.WebServices.Data.WellKnownFolderName]::Calendar, $mailboxName)
$calendarFolder = [Microsoft.Exchange.WebServices.Data.calendarFolder]::Bind($service, $folderid)
$calendarView = new-object Microsoft.Exchange.WebServices.Data.CalendarView([System.DateTime]::Now, [System.DateTime]::Now.AddDays(720))
$calendarView.MaxItemsReturned = 200;
$calendarView.PropertySet = new-object Microsoft.Exchange.WebServices.Data.PropertySet([Microsoft.Exchange.WebServices.Data.BasePropertySet]::FirstClassProperties)
$result = $calendarFolder.FindAppointments($calendarView)

$result | Format-Table
于 2013-02-18T12:50:34.923 に答える