Copy emails to sent items Powershell

Check if sent items are already being copied

Get-Mailbox -Identity "[email protected]" | Format-Table Name,MessageCopyForSentAsEnabled,MessageCopyForSendOnBehalfEnabled

Copy sent as items to sent folder for a single mailbox

Set-Mailbox -Identity "[email protected]" -MessageCopyForSentAsEnabled $true

Copy sent on behalf items to sent folder for a single mailbox

Set-Mailbox -Identity "[email protected]" -MessageCopyForSendOnBehalfEnabled $true

Copy sent as and sent on behalf items to sent folder for a single mailbox

Set-Mailbox -Identity "[email protected]" -MessageCopyForSendOnBehalfEnabled $true -MessageCopyForSentAsEnabled $true

Copy sent as items to sent folder for all mailboxs

Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails "SharedMailbox" | Where-Object {$_.MessageCopyForSentAsEnabled -eq $false} | Set-mailbox -MessageCopyForSentAsEnabled $true

Copy sent on behalf items to sent folder for all mailboxs

Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails "SharedMailbox" | Where-Object {$_.MessageCopyForSendOnBehalfEnabled -eq $false} | Set-mailbox -MessageCopyForSendOnBehalfEnabled $true

Copy sent as and sent on behalf items to sent folder for all mailboxs

Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails "SharedMailbox" | Set-Mailbox -MessageCopyForSentAsEnabled $true -MessageCopyForSendOnBehalfEnabled $true

Leave a Reply