I've followed these steps on technet but had no success: https://technet.microsoft.com/en-us/library/fp161372.aspx
Connect-SPOService -Url "https://<mydomain>-admin.sharepoint.com" -Credential "<myname>@<mydomain>.com"
After performed the command, I entered the password and got this error.
Connect-SPOService : Could not connect to SharePoint Online.
This is the instruction I followed:
Set up the SharePoint Online Management Shell environment for SharePoint Online global administrators Perform the following:
- Install Windows PowerShell 3.0 from Windows Management Framework 3.0.
- Install the SharePoint Online Management Shell from the Microsoft Download Center.
- Click Start>All Programs>SharePoint Online Management Shell.
- Run Connect-SPOService. For example, Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential firstname.lastname@example.org, where:
- Url is the URL of the SharePoint Online Administration Center.
- Credential is the user name to which you want to grant access to the SharePoint Online Administration Center site.
- Try it out! For example, run Get-SPOSite to get a list of all sites.