Update site collection quotas in SharePoint Online with PowerShell

Many articles have been posted about how to do this onprem, but i was looking around last week and didn’t see anyone sharing the technique to do this in SharePoint Online.

Every site collection in  SharePoint Online can be configured with a quota, but how do you know which ones are running out of space.  This script will let you automatically resize any that are running out of space by finding all site collections that are using 75% of their quota and doubling the site of the current quota.  This may not be the right numbers for your environment but i hope this sample gets you on off and running quickly.


#you’ll need the msonline service module to connecto to spo
import-module MSOnline


#import common functions
. “C:\mypath\functions.ps1”
#### configuration information

$baseFilePath = “C:\mypath\”

$tenantName = “mytenant

$userName = “my upn goes here

# this uses a custom function in the functions.ps1 files
$msolcred = Get-StoredCredential -UserName $userName -BasePath $baseFilePath

# this uses a custom function in the functions.ps1 files
$adminSite = Get-AdminSiteUrl $tenantName
Connect-SPOService –Url $adminSite  -credential $msolcred

# this will get all sites and limit to only those that are 75% of the way to their quota
$sites = Microsoft.Online.SharePoint.PowerShell\Get-SPOSite  -Limit ALL -Detailed |Where {($_.StorageUsageCurrent / $_.StorageQuota) -gt .75} |  Select URL, StorageQuota, StorageUsageCurrent, StorageQuotaWarningLevel, StorageQuotaType, Status
foreach($site in $sites){

Write-Output (“Site: ” + $site.Url + ” Usage:” + $site.StorageUsageCurrent + ” Quota:” + $site.StorageQuota + ” Warning Level:” + $site.StorageQuotaWarningLevel)

        # this will set the quota to double it’s current size, feel free to tweak to your needs
Microsoft.Online.SharePoint.PowerShell\Set-SPOSite -Identity $site.Url -StorageQuota ($site.StorageQuota*2)




Function Get-StoredCredential
param( [string]$UserName, [string]$BasePath)


$File = $baseFilePath + “password.txt”
$FileContent = Get-Content $File
return New-Object -TypeName System.Management.Automation.PSCredential ` -ArgumentList $UserName, ($FileContent | ConvertTo-SecureString)
Function Get-AdminSiteUrl

return “https://” + $tenantName + “-admin.sharepoint.com”

Slides from SPTechCon Boston Sessions Now Available

Thanks to everyone who made SPTechCon this year so much fun!  Really well put together event and the feedback I’ve heard from people at the event was really incredible!


I wanted to share out a couple slide decks from my presentations:


“Your Intranet, Your Way” explores all the options available today to build a custom intranet on Office 365

Next Generation Collaboration with Team Sites, Groups, and Planner” explores what’s new in collaboartion and the business drivers behind the changes


I’d love your feedback on these sessions and hope to see you at the next show!





SharePoint Apps Apps Apps : SharePoint, Outlook Groups, and OneDrive

Folks who have seen me speak about Office 365 Groups know what a big fan I am of the new Microsoft cloud first, mobile first strategy.  For years, all my documents were locked up behind a VPN client that killed my battery life when run on my phone and a web user experiance that was conceived long before the the consumerization of IT.

Office 365 Groups and the Outlook Groups App for iOS changed all that.  Office 365 Groups are a brilliant example of what might happen if a security group, a distribution list, and a SharePoint team site got together.  My project teams were always in the loop when i emailed a customer because i simply added the group to the email and knew that everyone on the team today or in the future would be able to follow what was happening on the project.  Planner let me organize the tasks for my team, PowerBI let me share data that was relevant to the team, OneNote kept all my project notes easily accessible, and files as it was called gave me a document library on a private site collection to store my project artifacts.  However, the document library was branded as OneDrive and lacked a number of the enterprise features such as metadata and content types that make SharePoint great.  The SharePoint experiance also lacked any support for lists, or the ability to have more than one library.

On May 4th Microsoft shared a bit of the vision and roadmap for SharePoint including that every Office 365 Group would get a real team site and new team sites can be associated with an Office 365 Group.

It may not seem like a huge deal, but this really changes the game in a huge way as users of SharePoint sites can take advantage all the services across Office 365 and maintain a common definition of who that team is really composed of.  For example, I can share a file from my OneDrive with Group created for a specific project.  In addition to some great web based user interface and native support inside Outlook 2016, Groups have a native iOS application called Outlook Groups that provides me access to conversations, files, members, and my onenote.  With the release of the new SharePoint mobile app and the coming soon integration of team sites and office 365 groups I was excited to explore how groups are supported within the new SharePoint mobile app.



Let’s start with what’s I really love about the new SharePoint mobile app.

Persistent Login

For those who have been attempting to use SharePoint from the web, the persistent login is the first huge win.  Not entering my super secret password with all sorts of crazy characters on my phone is a big deal.

Relevant Suggestions on Sites

I spent this afternoon doing a session at SPTechCon on Office 365 Groups and Office Graph and I did a number of demo’s with a group named engineering.  I bounced back and forth between a few groups, but the majority of my demos were hosted inside Engineering.  When logging into the app whatever new signals Microsoft is watching in the Office Graph to determine relevant sites to present to me really worked well.  The engineering group is right there on the top.  Earlier in the day before doing the demos it wasn’t there but the search did exactly what you’d expect and found it easily.



Activity Feed

This is something I’ve missed since our buddies at NewsGator disapeared around the release of SharePoint 2013.  Not a ton of data for me, but love the concept of being able to see at a glance what’s popular and what’s fresh on a particular site.


Enterprise Search

Easily search for Sites, Files, People, and Recomendation from the Graph.

Some stuff I’d love to see evolve a bit


Integration between Activity and Conversations

Today Microsoft has not yet rolled out groups for each team site so this would be hard to do but I hope these two areas can evolve and maybe merge together at some point in the future.  Conversations in a way represent what’s happening on the team in terms of people communication about the project and activility captures the more interaction based history of what’s happening on a site.    I’d love to see these merge over time.

To make this a litle bit more challenging, clicking on conversations today opens the Outlook Groups App and shifts my context away from the SharePoint app.  Again, this is an area I’d love to see become a more integrated slick experiance.


IMG_7138 IMG_7139


For me this is a really big one.  Inside a group (or team site) there is no way to directly get to your files.  Instead you see a list of recent files, popular files, and a link to the OneDrive app if you’d like to be able to browse all your files.  Once you click the OneDrive link you’ll get the OneDrive application which will open, authenicate, and evenutally load up the files in your document library.


Really neat that i can see all my lists from a mobile device but when you click to edit an item, at this point you get a nice coming soon message.  I’m not sure if this is just a lower priority for the app or if this may somehow tie into powerapps, but either way clearly an area that is still going to need additional love.


At this end of the day, this is where the fact that the Outlook Groups app has existed for a year really shows.  In a single pane it’s dead simple to navigate between my conversation history, my calendar events, and my files and folders.  All without needing to launch other apps or wait for additional logins.  As the Files compoent inside Groups matures into a full team site I really hope this level of polish and integration comes into the SharePoint app as well.


Closing Thoughts

The future of SharePoint is really incredible right now.  We have a mobile SharePoint app that makes it dead simple to get to the sites we use everyday from a mobile device.  There is work to be done to realize the great potential of this new app, but we need to acknowlege that Microsoft is working fast and giving us access to see and help influence and shape the product earlier then ever before.  I look forward to many more great things shipping in the next few months and seeing the levels of polish and integration continue to improve.

If you’re a power user or someone who helps manage change in your organization I’d recomend grabbing a copy to play with and get a glance into the future.  If you prefer a more stable complete product, i’d stay with Outlook Groups for now but keep an eye on the SharePoint mobile app as it evolves.