PowerShell-EWS-Scripts icon indicating copy to clipboard operation
PowerShell-EWS-Scripts copied to clipboard

Calendar in a Public Folder

Open YoishoDev opened this issue 2 years ago • 1 comments

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

  •         $results = $Folder.FindItems($searchFilter, $view)
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound_

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

YoishoDev avatar Nov 29 '23 14:11 YoishoDev

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

David-Barrett-MS avatar Feb 08 '24 22:02 David-Barrett-MS