Some features cannot be turned off and on via the GUI/Web Console.

For instance I discovered today that users sending email using a Shared Mailbox account will find the sent item will not appear in the Sent Items of the Shared Mailbox but their own account’s Sent Items. This doesn’t make a lot of sense to me.  Anyone else using the same Shared Mailbox would have no history of the sent item.  However, you can enable this function whereby the sent item does appear in the Sent Items of the Shared Mailbox, but only through a Command Line (EMS).

With Office 365 you don’t have an onsite Exchange server.  Therefore you don’t have the Exchange EMS available to you.

You can, however, use PowerShell on your Windows 7 (SP1) and up system to connect remotely to the EMS for your Office 365 Cloud Exchange.

  • Open PowerShell on the local PC
  • Run this command

    Set-ExecutionPolicy RemoteSigned

  • Now connect to Exchange Online

    $UserCredential = Get-Credential

  • You will be prompted with a Login Dialogue Box – use your Office 365 credentials to sign in
  • Now grab the shell extensions you need to command Exchange

    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

  • Start the session
    Import-PSSession $Session

Now execute the commands against the Exchange Online server.

In this instance I had to enable Shared Mailbox Sent Mail:

set-mailbox <mailbox name> -MessageCopyForSentAsEnabled $True

You can also enable the Send On Behalf Sent As:

set-mailbox <mailbox name> -MessageCopyForSendOnBehalfEnabled $True

When you’re done executing your commands against Exchange you need to close the session:

Remove-PSSession $Session