Powershell set-notification. How stop receive mail notification?

Den K 20 Reputation points
2023-11-09T21:36:08.64+00:00
I run the command ( Set-Notification -NotificationEmails user@test.com -ProcessType CertExpiry). I receiving messages by email. This good. How can I stop sending me emails about expired certificates?
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,295 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,517 questions
0 comments No comments
{count} votes

Accepted answer
  1. Kael Yao-MSFT 37,646 Reputation points Microsoft Vendor
    2023-11-10T06:01:04.88+00:00

    Hi @Den K,

    Unfortunately to my knowledge there isn't any method documented to clear the notification.

    You can either remove the expired certificates or wait for the notification to be expired.

    Notifications remain in the arbitration mailbox until they are removed by the component that sent them, or until they expire (they should be removed by the Managed Folder Assistant after 30 days).

    Or you can use Search-Mailbox cmdlet in Exchange management shell to search the notification in arbitration mailbox and delete it from the mailbox.

    First get the search result in administrator mailbox's inbox folder:

    Get-Mailbox -arbitration | Search-Mailbox -TargetMailbox "administrator" -TargetFolder "inbox" -LogOnly -LogLevel Full
    

    If in the search result csv file you are seeing the result like:

    01

    run the following cmdlet to remove the notification:

    Get-Mailbox -arbitration | Search-Mailbox -deletecontent
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.