Office 365 and SharePoint Online is an ever growing and evolving cloud service from Microsoft and in the migration to wave 15 of the Office product, Microsoft have released a set of PowerShell commands to manage your SharePoint Admin console.
Its important to note that these PowerShell commands are not the normal PowerShell commands you get for on-premise SharePoint and they are here to manage creating and managing site collection as well as gather information about your tenancy.
You can download the powershell commands from here
Here are a few powershell commands that you might find useful.
Import SharePoint Online Module
Use this cmdlet to add the commands for SHarePoint Online management shell
Connection to SharePoint Online
We are first going to set the URL of the SharePoint Online Admin site and then log in.
Note we only have powershell for the admin portal so you have to connect to the –admin.sharepoint.com URL.
List all Site Collections
Get current storage of site collection
First we are going to get the Site Collection and request the information the current storage usage.
Average out Storage Quota to all Site Collections
This last command is a little bit more complicated.
We are going to get the storage quota for the tenancy and then divide that by the number of site collections we have an implement it to each site. This command can take a while to run as it will run on each site collection, confirm and then move onto the next one.
This will now set each site collection to the average of the tenancy storage quota. It will error if the average is over 100GB as this is the highest it can be.