Get a demo
Menu
Get a demo
connecting to exchange online using powershell

Connecting to Exchange Online using Powershell

Some settings in Exchange Online (Office 365), such as making room lists, are only available through PowerShell. Follow this step-by-step guide to connect to Exchange Online using Remote PowerShell. This will allow you to use all of the features in Exchange Online. In this guide, we will show you how to connect to Exchange Online using PowerShell and get a list of all your meeting room resources. Once you’ve connected, you can refer to our other guides to adjust and customize the settings.

Tips! You can also connect to exchange online with multi factor authentication (it's a bit easier!).

Step 1

First, you must ensure that you can run Powershell scripts without restrictions. Open an elevated PowerShell prompt: click Start > type “PowerShell” > hold down the Shift and Ctrl and press Enter.

Powershell

Step 2

Make sure that the “Administrator: Windows PowerShell” appears in the title bar. If “Windows PowerShell” appears in the title bar instead, right click on the PowerShell icon in the bottom bar and click on “Run as Administrator.”

Run powershell as administrator

Step 3

Click ‘Yes’

UAC

 

Step 4

Afterwards, copy and paste the text below:

Set-ExecutionPolicy RemoteSigned

Set policy

Quick tip: To copy and paste the commands, make sure that the ‘QuickEdit Mode’ is NOT checked under the Defaults AND Properties tab.

Powershell properties

Step 5

Type ‘Y’

Execution policy

Step 6

Copy and paste the text below:

$UserCredential = Get-Credential

You will receive a prompt that asks for the username and password. The account information that you provide must have administrative rights to the company’s Office 365 Support.

User credentials

Step 7

Afterwards, copy and paste the text below:

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

Import-PSSession $Session

Session

Session

Step 8

If all went well, you should be able to run Exchange PowerShell for your Office 365. Test the following command to get a list of all your meeting rooms resources:

Get-Mailbox -Filter '(RecipientTypeDetails -eq "RoomMailBox")'

Get-Mailbox

And you're done!