Exchange Online – You can now also use Azure Cloud Shell to connect to Exchange Online with PowerShell

A new capability has been added to Azure Cloud Shell, you can now use it to also connect to Exchange Online with PowerShell.

To remind you as there are maybe few (lot?) of Exchange administrator who do not know what is Azure Cloud Shell, this is the ability to connect to cloud resources (in this case Azure and now Exchange Online) using a web browser. You can use PowerShell to manage cloud resources from anywhere without the need to install the corresponding PowerShell modules on your client (see http://bit.ly/2JDxKmb and http://bit.ly/2JDz4VV).

Now, you know how to use Azure Cloud Shell, let see how you can use it to connect to Exchange Online:

At first, there are few prerequisites:

  • An Azure administrator must have created the required resources (a storage account) for Azure Cloud Shell to work (see the above links)
  • Grant you access to the Azure subscription hosting this storage account (at least reader at the subscription level); otherwise you will ended with the ‘well-known’ (at least for Azure administrator) error message “No valid subscriptions found”

image

Please contact your Azure administrators to get them prepare Azure for you.

 

Now you can start

  • Logon to https://shell.azure.com/ and sign in with your Exchange Online administrator account (or Office 365 global admin)

image

  • Then select PowerShell as the environment to use

image

  • The first time you will be asked to create/choose a storage account; click on Show advanced settings and then choose exiting resource group, storage account and file share (details can be provided by your Azure administrator)

In case the drop down is not available for the existing file share, just copy/paste the one provided by your Azure administrator

imageimage

  • Then you can connect to Exchange Online PowerShell using the command

Connect-EXOPSSession

image

  • From there all Exchange cmdlets are available

image

Off course, if you have access, you can do the same directly from the Azure portal (https://portal.azure.com/)

 

If you don’t use the shell for about 20 min, you will be disconnected.

You can also upload your scripts using the Upload/Download files button

image

Leave a Comment

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


The reCAPTCHA verification period has expired. Please reload the page.