Script to list all OneDrive sites

Contributor

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

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 '-my.sharepoint.com/personal/'"

 

Hope that helps.