Problem:
You’re running SharePoint Online Management Shell and the Connect-SPOService command doesn’t work.
Resolution:
- Load up the SharePoint Online Management Shell as administrator
- Run
Install-Module SharePointPnPPowerShellOnline
and hit Y to all the questions