Connecting Powershell To Office 365

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys it's tom from liftoff today I'm going to show you the quick and easy way to set up PowerShell to connect to office 365 to start with you need to use internet explorer to download this special version of PowerShell we're gonna log in to admin microsoft comm as a global administrator and once the page loads you're gonna go to admin centers at the bottom left you might have to click show more and then exchange once the exchange admin Center loads you're gonna scroll down and click hybrid at the bottom left hand corner and then once the page loads even if you don't have a hybrid you're gonna choose the bottom configure button I'm just going to download and want to install something this is the exchange online module for PowerShell ok now I'm gonna close this and I'm gonna open another browser tab and go to PowerShell dot lift-off online.com as a reminder that's PowerShell dot liftoff online.com this is going to bring up microsoft's page for the online services sign-in assistant go ahead and download the version appropriate for your architecture most of the time at 64-bit pop up here i'm gonna go ahead and run it and just accept all the defaults ok now I'm gonna close Internet Explorer I'm gonna do one more thing here I'm going to open an elevated regular PowerShell that's it yes actually I'm going to do two things here so the first thing is set execution policy set execution policy remote signed this is going to allow your computer to run remote remotely signed code I'm gonna say yes and then I'm going to choose install - module space ms online note that this install - module requires that you're running Windows 10 Windows 2012 r2 or higher and it may require that you download and install the latest version of PowerShell I'm gonna answer affirmative lead any prompts here while it installs the Microsoft online powershell commandlets so i had to answer affirmatively twice and that should be it here now that's done I'm gonna go ahead and close this PowerShell and now if I look in my Start menu I have a new icon there's also one of my desktop if I was showing icons called Microsoft Exchange PowerShell I'm gonna go ahead and open that and this is it so to connect it tells you exactly what to do here I'm gonna copy this to my clipboard Connect X op session space - user principal name and here I'm going to type in my user principal name for a global administrator and hit enter now it's gonna prompt me to login if I have multi-factor authentication enabled it'll prompt me for that as well now it's gonna connect and it's going to download all of the exchange related powershell commandlets and connect to office 365 if you're in the GCC hi the command is slightly different and I'm gonna show you that at the end and also these commands will be listed in the description okay one more step here it's kind of annoying but there are certain commands that aren't available quite yet so I'm gonna show you if I type get - mailbox it's gonna list all of my mailboxes in the cloud okay I'm gonna bring this up a little bit but if I type get - MS o L user and I want to list all my users whether or not they have a mailbox it tells me that I must first call connect - MS o L service so basically if you're trying to do general office 365 can fans that aren't exchange specific you're gonna also need to run connect - MS o L service I'm going to do that now and unfortunately have to log back in here and again if you have multi-factor authentication it will prompt you for it now when I try get - MS o L user it works so I can do M Sol Microsoft online commands and I can do exchange commands and that's it and just for your reference here are the commands that you need to connect okay so the top one is the one I mentioned Connect - X op session no there's two double s's in the middle of that and then space - user principal name and then your user name and then to connect to Microsoft online it's connect - MS o L service if you're in the GCC hi it's a little more complex you need the connection URI and the azure ad authorization endpoint okay again this information will be listed in the description below the video thanks a lot
Info
Channel: LiftOff 365 U
Views: 12,975
Rating: undefined out of 5
Keywords:
Id: 2cbQJofGxvQ
Channel Id: undefined
Length: 5min 37sec (337 seconds)
Published: Thu Apr 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.