David-Barrett-MS / PowerShell-EWS-Scripts

A collection of PowerShell scripts that use EWS to perform actions against Exchange mailboxes
MIT License
118 stars 13 forks source link

Calendar in a Public Folder #44

Open YoishoDev opened 9 months ago

YoishoDev commented 9 months ago

I find these scripts very useful. My task is to export appointments from a calendar of a public folder of a server on-premises. However, it's not clear to me how the parameters should be used.

I use -IgnoreSSLCertificate -PublicFolders -FolderPath $publicFolderPath -Credential $credential -EwsUrl $ewsUrl -StartsAfter $startsAfterDate -EndsBefore $endsBeforeDate -ExportCSV $csvFile -LogFile $logFile

The folder path is \ABCD\Intranet and Intranet is a calendar type folder. grafik

However, when called, the script always accesses my mailbox and as a result I get the following error message: _Fehler beim Aufrufen der Methode, da [System.String] keine Methode mit dem Namen "FindItems" enthält. In Z:\Gruppe Datenverarbeitung\IT-Dokumentationen\Webserver\Intranet-Kalender\Search-Appointments.ps1:1175 Zeichen:13

With the same parameters, but with -Mailbox, I get the desired result.

David-Barrett-MS commented 7 months ago

Will test this script with public folders when I get a chance.