Forum Discussion
Ollie
Feb 05, 2021Brass Contributor
Script to list all OneDrive sites
Hi, 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, Ollie
AndySvints
Feb 05, 2021Iron Contributor
Hello Ollie,
One of the options would be to use SharePointPnPPowerShell module and Get-PnPTenantSite cmdlet:
Get-PnPTenantSite -IncludeOneDriveSites -Filter "Url -like '-my.sharepoint.com/personal/'"
Hope that helps.