通过 PowerShell 自动化 "Send me a copy of email I send to a group"

Automate "Send me a copy of email I send to a group" via PowerShell

参考MS文章: https://support.microsoft.com/en-us/office/i-m-not-receiving-a-copy-of-messages-i-send-to-a-group-in-my-inbox-07567cda-f5ce-4e52-b278-4c63dfdd6617

我正在寻找任何可能性来全局更新在上面引用的 link 中找到的设置。

我查看了每个管理门户和潜在的 PS 参考文献,但没有成功。

我发现这是一个邮箱消息配置项。我这里用的是ExchangeOnlineManagement模块,其他版本应该是一样的:

Connect-ExchangeOnline

# To see the current setting:
Get-Mailbox user@domain.com | 
  Get-MailboxMessageConfiguration | 
  Select EchoGroupMessageBackToSubscribedSender
# True|False

# To set for multiple users, get the list of mailbox objects
$mailboxes = Get-Mailbox  ## Filter as needed, and check your -ResultSize too
# The Set command will take the whole list as input
$mailboxes | Where { -Not EchoGroupMessageBackToSubscribedSender } |
  Set-MailboxMessageConfiguration -EchoGroupMessageBackToSubscribedSender $true