Office 365 Send As

We've been using Microsoft Exchange 2007 and 2010 for many years now and I've always used the add-receipientpermission command to give the users the SendAs permission.

Today I had to do it for a company that is using Office 365.

After a google search I found out that I could load a session and connect to the server that's hosting the mailboxes:

First of all you have to create a variable for the credentials that you're going to use with the following command:
    $cred = get-credential

Then you have to create a session object for Microsoft Exchange using the following command:
    $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $cred -Authentication Basic -AllowRedirection

And import it using:
    Import-PSSession $Session

After that you're ready to configure the appropriate permissions:
    Add-RecipientPermission -Identity target@example.com -Trustee user@example.com -AccessRights SendAs
(add the SendAs permission for user user@example.com on target@example.com)

To verify that the permissions were set use:
    Get-RecipientPermission -Identity target@example.com | Select Trustee, AccessControlType, AccessRights

Popular posts from this blog

IIS Client Certificate Revocation Check Disable

How to Configure Message Forwarding on a Mailbox Level

Syslog Message Collection for OMS from sources that do not support the agent