Set Onedrive Quota from file or AD Group

Lets do a magic this time with Onedrive quota.


We have updated the default quota for all E3 Onedrive sites up to max limit that Microsoft allows that is 5 TB.

We thought that onedrive for all users will update with new quota automatically but it was not the case, on the contrary in our small tenant it happened automatically.

So here is the Powershell magic we have created for updating our 35000 users onedrive as 5TB quota.

All our E3 users are licensed based on one AD group so we created the script based on group but for broader use I have expanded it with option of text file as well.

Download the Script from below link:

Set Onedrive Quota from file or AD Group


  • Active directory Module 
  • Sharepoint PNP module (Install-Module SharePointPnPPowerShellOnline)
  • Sharepoint Online Management Shell 

When you will run this script it will ask you for below parameters:

If you will answer No for run from file option then you need to enter name of text file like onedrive.txt  which is inside the script folder and have one drive urls.


Just press enter and Script will start processing the Onedrive sites to set the appropriate Quotas.

Thanks for reading and downloading..

Tech Wizard



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s