Setup mail forward, Grant Access to a mailbox, manage Send As and Send on Behalf permission in Office 365
You would need Windows Power Shell to execute commands on Microsoft Office 365. Here are the steps once you have Windows Power Shell installed on your computer:
Connect to the Office 365 Server
$LiveCred = Get-Credential
Setup Session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Set Execution policy to run cmdlets
Set-ExecutionPolicy Unrestricted
Import the cmdlets allowed in the session
Import-PSSession $Session
Set mail forwarding
Set-Mailbox -Identity "<MailboxID>" -ForwardingSmtpAddress "<Target SMTP Address>" -DeliverToMailboxAndForward:$true
Verify mail forward
Get-Mailbox -Identity <MailboxID> | Select ForwardingSmtpAddress
Other Commands:
Grant Admin Access to a mailbox:
Add-MailboxPermission <MailboxID> -User <AdminUserMailbox> -AccessRights FullAccess -InheritanceType All
Grant Send As permission on a mailbox:
Add-RecipientPermission <MailboxID> -AccessRights SendAs -Trustee <AdminUserMailbox>
Verify Send As Permission:
Get-RecipientPermission -Trustee <AdminUserMailbox>
Grand Send On Behalf Permission:
Set-Mailbox -Identity <MailboxID> -GrantSendOnBehalfTo <AdminUserMailbox>