If you try the MSolService, you will receive an error that the command is not recognized. Once you have entered the details and pressed enter, you will be taken back to the command prompt as shown below: You will either get a box popup or it will be within the same window as shown below:Įnter in your details for your tenant and press enter, or you can use a variable like $cred = Get-Credential as we will use the variable in the next command. In the same PowerShell window, you can type the command below: Take note that the Azure Active Directory module only works up to PowerShell Version 6.
Once the install is complete, we are now ready to connect to our Microsoft Office 365 tenant.
This will download and install the packages like the previous one as shown below: You will receive the same kind of prompt as you did with the first command. You can use the following command and then press enter: Now we can move to the next command with is the AzureAD one. Type in “Y” and then press enter and it will start installing the package as shown below: To connect to your tenant, you can now launch PowerShell 7 elevated and run the following commands: If you need to import the SkypeOnlineConnector.psd1 module and receive an error, head over to the Microsoft site, download the latest version, and try again. You can now proceed with the new version and run PowerShell commands against your Microsoft Office 365 tenant.
Running PowerShell 7 commands against your Microsoft 365 tenant Version 5 has a light icon and V7 has a dark PowerShell icon. You will notice the difference between PowerShell 5 and 7 are the icons. When you launch PowerShell 7, you will see a window similar to the above showing you the version. Once the install is done, you can either select the box to Launch PowerShell or click Finish to complete your installation. The setup validates the install and then continues. Make your selection from the options above, and click Next.Ĭlick the install button to start the installation of PowerShell 7. Leave the default path to install PowerShell 7 or change it to where you want it to go, and then click Next.
Once the file has downloaded (in this example it is Version 7.1.3 but my screenshots are 7.1.0), the same rule applies - you will be presented with the setup, and here are the steps for each screenshot which is pretty straightforward: Open this up in a normal PowerShell window as shown below: Here is the command:ĭo not try to run this from a command prompt window, as you will receive an error that it does not know what “iex” is. You can also download it using the same command to install.
So how do you get PowerShell 7? If you have been playing around with PowerShell 7 since it was in Preview mode, you can upgrade to the latest version using the command line or open up your existing PowerShell 7 to this version or the latest version out. You obviously cannot run everything from PowerShell 7 - for example, Exchange on-premises cmdlets - but it is great to use Microsoft 365 commands. PowerShell 7, which has been out for a little over a year now, seems to be snappier and faster than the older versions. There is only so much you can do from the Microsoft 365 web interface - the rest you need to do from PowerShell 7. (Yes, there are companies still using Exchange 2007!) But the same limitation you have with on-premises Exchange Servers is also there with Microsoft Office 365. Many organizations have moved to the cloud, taking away most of the administration work you would have if you were running local Exchange Servers like Exchange 2016, Exchange 2019, or legacy Exchange like Exchange 2013, Exchange 2010, or even Exchange 2007.