Forum Discussion

Salamat_Shah's avatar
Nov 09, 2024

Hybrid Exchange email removal

As we know, a script can be used to remove specific emails from a user’s mailbox. However, if the email subject contains multiple emails and we need to remove a specific one without knowing the content, how can we accurately achieve this? Especially in the hybrid exchange when we have mailboxes on premises

2 Replies

  • randieriko's avatar
    randieriko
    Copper Contributor

    you can use search mailbox then use where-object pipelining that use -like operator.

    • Salamat_Shah's avatar
      Salamat_Shah
      MCT

      Rendiriko, for standard searches, the 'like' operator works fine. However, is there an authentic shell command that can help streamline the process and save time and effort?

Resources