Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email
Reading Time: 2 minutes

Recently, Microsoft updated the container image they use for the Azure PowerShell Cloud Shell to include the ability to manage Office 365. In this quick guide, I am going to show you how to connect to Office 365 from the Azure Cloud Shell and show you a How to confirm you are connected. So lets get to it.

The Cloud Shell

Open the Azure Cloud Shell by either clicking the button in the Azure Portal or going to https://shell.azure.com/powershell and select your subscription directory. If you are going from the Portal make sure you are in the PowerShell shell.

Now, you might think you can just start using commands like get-mailbox, but you cant. You will need to connect up to office 365 first. To do this type the following

After some time, it needs to download some files you will then be connected. You can ignore the warning.

Lets test!

So we can get a list of mailboxes by typing:

Awesome we are connected.

So now you can use all of the Exchange Online PowerShell commands via the Azure Cloud Shell. You can find all of the commands at https://docs.microsoft.com/en-us/powershell/module/exchange/?view=exchange-ps

One thing to note, is that you are unable to use the MSOnline commands. Hopefully this will come soon.

I hope you found this quick how to helpful. If you have any questions please reach out.

Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

Pixel Robots.

I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.

0 Comments

Leave a Reply

Avatar placeholder

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