type: Guide collections: BCM, Software title: Full OneDrive Export via Microsoft Purview (Admin Workflow) description: A step-by-step guide to exporting an entire user's OneDrive content using Microsoft Purview through an admin workflow on Windows, including prerequisites, PowerShell commands, and export tips. tags: [bcm, commands, windows]

Full OneDrive Export via Microsoft Purview (Admin Workflow)

Goal: Export the entire contents of a user's OneDrive (e.g., francis@birminghamcitymission.co.uk)Environment: Windows machine with PowerShell + SharePoint Online Management Shell


✅ Prerequisites


🛠 Install Required PowerShell Module

Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Force -AllowClobber

🔐 Connect to SharePoint Online Admin

Connect-SPOService -Url https://bcmission-admin.sharepoint.com

👑 Grant Yourself Site Collection Admin Rights on the User’s OneDrive

Set-SPOUser -Site https://bcmission-my.sharepoint.com/personal/francis_birminghamcitymission_co_uk `
    -LoginName youradmin@birminghamcitymission.co.uk -IsSiteCollectionAdmin $true

⏱ Wait \~5–10 minutes for permissions to propagate.


📦 Create a New Content Search in Microsoft Purview

  1. Go to: Microsoft Purview
  2. eDiscovery > Content Search > New Search
  3. Name: Full OneDrive Export - Francis
  4. Location: SharePoint sites → Choose sites
  5. Enter manually:
    https://bcmission-my.sharepoint.com/personal/francis_birminghamcitymission_co_uk
  6. Leave Conditions empty
  7. Submit the search

⏳ Wait for Search to Complete


📥 Export the Results

  1. Go to the Export tab of the search
  2. Click Export Results
  3. Choose:
  4. All items
  5. Include unindexed/encrypted
  6. Download and run the eDiscovery Export Tool
  7. Use the Export Key + Download URL

💡 Tips


📎 Reference Commands

# View all personal sites (OneDrives)
Get-SPOSite -IncludePersonalSite $true -Limit All | Where-Object { $_.Owner -like "*francis*" }
# Check if you’re site admin
Get-SPOUser -Site https://bcmission-my.sharepoint.com/personal/francis_birminghamcitymission_co_uk -LoginName youradmin@birminghamcitymission.co.uk

#bcm #work