michelderooij / Remove-DuplicateItems

Script to remove duplicate items from Exchange mailboxes.
https://eightwone.com/2013/06/21/removing-duplicate-items-from-a-mailbox/
MIT License
49 stars 16 forks source link

Error with Body param #10

Open flexo44 opened 1 month ago

flexo44 commented 1 month ago

Hello,

I have issue with the script. You can see bellow my command :

Remove-DuplicateItems.ps1 -Server outlook.office365.com -Identity $Mail.Identity -CleanupMode MailboxArchive -DeleteMode MoveToDeletedItems -Type Mail -Mode Body -Force -Retain Oldest -Verbose -TenantId $tenantId -ClientId $clientId -Secret $Secret

and the command return :

VERBOSE: Using bboyer@soric-reunion.com for impersonation
VERBOSE: Using Exchange Web Services URL https://outlook.office365.com/EWS/Exchange.asmx
VERBOSE: Constructing folder matching rules
VERBOSE: Detected Exchange Server version 15.20.7784.17 (V2018_01_08, requested schema Exchange2016)
VERBOSE: Processing primary mailbox bboyer@soric-reunion.com
VERBOSE: Collecting folders to process..
VERBOSE: Adding folder \Abonnements RSS (priority 0)
.....
VERBOSE: Found 29 folders that match search criteria
VERBOSE: Processing folder \Abonnements RSS
WARNING: Error performing operation FindItems without Search options in Abonnements RSS. Error: Exception calling "FindItems" with "1" argument(s): "The property Body can't be used in FindItem requests." 

Ps : I want to use the body parameter because the full parameter does not find all duplicate emails

Can you help me ?

Thank for your feedback.

BastiPrivat commented 1 month ago

Hi, exact same behaviour on my side.