'Foreach Recipient in Recipients' not work correctly in Powershell

The recipients of a mail are as follow.

Screenshot

I tried to use foreach to delete all of the existing recipients but it failed to delete all(but deleted some). Also the dummy Write-Host worked in similar way.

But if test it only with dummy Write-Host, its output times are exactly same as the number of recipients.

See below:

[DBG]: PS C:\Users\carrot\Desktop\Quotation\AutoSendTender>> foreach ($objRecipient in $objMailItem.Recipients){Write-Host $objRecipient.Name}
aaaa@yandex.com
cccc@yandex.com
bbbb@yandex.com
dddd@yandex.com

[DBG]: PS C:\Users\carrot\Desktop\Quotation\AutoSendTender>> foreach ($objRecipient in $objMailItem.Recipients){Write-Host $objRecipient.Name;$objRecipient.Delete()}
aaaa@yandex.com
bbbb@yandex.com

Why and how to fix? Thanks.

If you are using Outlook, the method is Remove, not Delete.

Richard, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.

When you crosspost the same question at the same time to different forums you should at least post links to the other forums along with your question to avoid people willing to you help making their work twice or more.

https://stackoverflow.com/questions/61461458/foreach-recipient-in-recipients-not-work-correctly-in-powershell

Thanks