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

Issues with Search Results in Update FolderItems.ps1 #43

Closed tousifsawant1 closed 7 months ago

tousifsawant1 commented 9 months ago

Hello David,

Hope you are doing good. I have below issues below.

When i run the below command

$items = .\Update-FolderItems.ps1 -Mailbox $Mailbox -FolderPath "WellKnownFolderName.MsgFolderRoot" -ProcessSubfolders -Office365 -OAuth -OAuthTenantId $tenantId -OAuthClientId $clientId -OAuthRedirectUri $redirectUrl -OAuthSecretKey $secretKey -SearchFilter "subject:Invoice" -ListMatches

Issue 1 : When i check $items | fl it only shows the subject of the emails and other fields are empty, like timedaterecieved, sender, recipient.

Issue 2: When i am satisfied with the search results in -listmatches , how can pass the values of $items with -delete -harddelete without running the entire command which will perform the search again.

Thank you in Advance

David-Barrett-MS commented 7 months ago

Closing issue as handled outside Github.