Hi All,
I currently have the following command set up as an argument used in a Scheduled Task:
-version 2.0 -ExecutionPolicy ByPass -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; get-mailbox | Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains @{Add='computer.com','test.com'}"
This command applies to all mailboxes on our estate. Is there a way to pipe out the settings of each mailbox using the get-mailboxjunkemailconfiguration after each mailbox is configured with the above addresses? I would like to update the existing argument and not create a separate script to manage this, if possible.
Thanks in advance.