Identifying “onmicrosoft” Email Users

If you use Office 365 and DirSync, a user’s primary email address can end up being if not setup correctly.  To identify all users setup this way, connect to Office 365 powershell and run this command:

Get-mailbox -ResultSize unlimited | Select-Object primarysmtpaddress | ? {$_ -clike “*onmicrosoft*”}


Office 365 Full Access Mailbox Permissions

If you administer an Office365/Exchange Online organization, you might have noticed you cannot modify Full Access/Send As permissions from the web console. You need to change these permissions through PowerShell; here are the required steps:

The first time you do this, make sure the following steps have been completed:

1. Right click and run PowerShell as Administrator(Start->Programs-> Accessories->Windows PowerShell->Windows PowerShell) on your local PC

2. Verify you are running PowerShell 2.0 – Enter $PSVersionTable in the prompt and hit enter

3. Allow execution of scripts by entering the following command: Set-ExecutionPolicy Unrestricted


Once those two steps have been completed, you can start from here:

1. Enter the following command and input your Exchange admin credentials when prompted:

$LiveCred = Get-Credential

2. Once completed, enter this command next:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection

3. Next, enter the following command to import server-side commands:

Import-PSSession $Session

4. To allow user BossOne to have full access to user WorkerOne, enter the following command:

Add-MailboxPermission -Identity “WorkerOne” -User BossOne -AccessRights FullAccess

5. Verify your work with:

Get-MailboxPermission Username

6. Once completed, discconect from the remote session with:

Remove-PSSession $Session

**If you also need to add “SendAs” permissions, the command is:

Add-RecipientPermission “mailboxuser” -AccessRights SendAs -Trustee “user”

Verification command is:

Get-RecipientPermission Username