To start, an admin must have PowerShell installed, either the command line, black screen version or an Integrated Scripting Environment (ISE). The user must have valid credentials and have an appropriate admin role (such as Global Admin).
As PowerShell for Office 365 has advanced, additional tools are available to minimize the past troubles of making a connection to your tenant. For this, you must download the Microsoft Online Services Sign-In Assistant (https://www.microsoft.com/en-us/Download/details.aspx). Download the files and install it on your PC.
The first time you connect to your Office 365 tenant, you'll want to set the
RemoteSigned. This is done by opening a PowerShell window with elevated rights (Run as administrator) and executing the following code:
Once prompted, press Y and hit Enter.