Script to list all OneDrive sites

Brass Contributor



Is there a PowerShell script that i could run that would list all our organisations OneDrive sites and write them to a csv file?


Thank you,


1 Reply

Hello @Oliver McErlane,

One of the options would be to use SharePointPnPPowerShell module and Get-PnPTenantSite cmdlet:


Get-PnPTenantSite -IncludeOneDriveSites -Filter "Url -like ''"


Hope that helps.