Open PowerShell as Administrator
Login with an account that has Administrative access to your Office365 tenant.
Once connected, you may need to press then type the following command to confirm that you are connected to exchange online.
Run a command to test it out something like the command below
#This command will get a list of all mailboxes in the tenant
Once you are done, you can disconnect from the Session