Small Tips and Tricks – PowerShell – Reading all onedrive urls, owners and storage quota

Hi All,
Greetings for the day!!! LIFE IS BEAUTIFUL 🙂
Today I got a request from my manager to have list of all onedrive urls and there storage quota details.
So the PowerShell in picture. Its very small PowerShell but seems to be very handy so sharing 🙂
Details :
- Connect to SharePoint Online Administration Center using Connect-SPOService
Connect-SPOService -Url $AdminSiteURL -credential (Get-Credential)
- On execution of this CMDLET prompt will appear for credentials
- Once we have entered credential successfully, we will execute fetch all onedrive URLs and storage details
- We will use Get-SPOSite CMDLET and filter on “-my.sharepoint.com/personal/“
Get-SPOSite -IncludePersonalSite $true -Limit all -Filter "Url -like '-my.sharepoint.com/personal/'" | Select URL, Owner, StorageQuota, StorageUsageCurrent | Export-Csv -Path "C:/OneDrive details/onedrivedetails.csv" -NoTypeInformation

Thanks for reading !!! Please feel free to discuss / suggestions / share thoughts !!!
HAVE A GREAT TIME AHEAD !!! LIFE IS BEAUTIFUL 🙂
You must log in to post a comment.