Small Tips and Tricks – PowerShell – Microsoft 365 : SharePoint Online – Getting site collection storage details

fig : Microsoft 365 - SharePoint online - PowerShell - Know the storage properties of site collection
fig : Microsoft 365 - SharePoint online - PowerShell - Know the storage properties of site collection

Hi All,

Greetings for the day!!!

In last following couple of articles we are discussing SharePoint storage

Today one more PowerShell script – getting site collection storage details using PowerShell

Background / Use Case

  • In our organization we need to make consistent allocation of the quota / storage / space for our SharePoint site collections
  • We also need to make storage configuration consistent across our organization. This means when new site created default consistent storage, consistent warning level, either to notify admin or not
  • This task came to me so the research and sharing. SHARING IS CARING 🙂

Storage properties of Site Collection

Following are the storage properties associated with Site Collection

  • StorageQuota – Total storage quota allocated to the Site Collection
    • StorageQuotaWarningLevel – What is the value set for warning level – so that Site owner / Administrator can notified and appropriate action can be taken.This will prevent from site getting locked.
    • StorageUsageCurrent – How much MB storage is used by current site collection

    All these properties return values in MB.

    Detailed steps

    • Connect to our Microsoft 365 tenant using – Connect-SPOService with our SharePoint admin site URL

    
    Connect-SPOService -Url <SharePoint admin site URL>
    
    Connect-SPOService -Url https://knowledgejunction1-admin.sharepoint.com
    

    • Once we are connected to Microsoft 365, next step is get our site collection details using – Get-SPOSite

    Get-SPOSite -Identity <SiteCollection URL>
    
    $site = Get-SPOSite -Identity https://knoweldgejunction1.sharepoint.com 

    • Onec we have Get-SPOSite CMDLET executed successfully, we are able to get the details using storage related properties

    $site.StorageQuota
    $site.StorageQuotaWarningLevel
    $site.StorageUsageCurrent

    fig : Microsoft 365 - SharePoint online - PowerShell - Know the storage properties of site collection
    fig : Microsoft 365 – SharePoint online – PowerShell – Know the storage properties of site collection

    Thanks for reading. HAVE A FANTASTIC TIME!!! ENJOY BEAUTIFULE LIFE 🙂

    Prasham Sabadra

    LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

    You may also like...

    1 Response

    1. August 20, 2023

      […] Small Tips and Tricks – PowerShell – Microsoft 365 : SharePoint Online – Getting site collection storage details – https://knowledge-junction.in/2023/02/16/small-tips-and-tricks-powershell-microsoft-365-sharepoint-o&#8230; […]

    Leave a Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Discover more from Microsoft 365

    Subscribe now to keep reading and get access to the full archive.

    Continue reading