Connecting to Exchange Online Using PowerShell

Ann Kim Exchange, Quick Tips 0 Comments

Exchange 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 blog posts to adjust and customize the settings.

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.

exchange powershell

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.”

exchange powershell

3. Click ‘Yes’ exchange powershell

exchange powershell

4. Afterwards, copy and paste the text below:

Set-ExecutionPolicy RemoteSigned

exchange powershell

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

exchange powershell

5. Type ‘Y’

exchange powershell

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.

exchange powershell

7. Afterwards, copy and paste the text below:

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

Import-PSSession $Session

exchange powershell exchange powershell

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")'

exchange powershell

Other Relevant Blog Posts:

Now that you’ve connected to Exchange Online using PowerShell, you can easily customize the settings by referring to our other blog posts below.

If you need more help, send us an email at!

exchange powershell


Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *