Skip to main content
Horton Scientific

Microsoft migration script

Export SharePoint Site Inventory

```powershell

Export SharePoint Site Inventory

Use at your own risk. Test in a non-production tenant first and confirm permissions before running.

Connect-PnPOnline -Url https://contoso-admin.sharepoint.com -Interactive
$sites = Get-PnPTenantSite -Detailed
$sites | Select-Object Url, Title, Template, StorageUsageCurrent, Owner, LastContentModifiedDate | Export-Csv .\sharepoint-site-inventory.csv -NoTypeInformation

Use this as an early discovery step before SharePoint Online migration planning.

Let’s move your business forward

What can we help
you do next?