Restoring M$ OneDrive for a deleted user

24th November 2026

Orphaned files are still retained for 93 days in a secondary Recycle Bin that is accessible only via PowerShell

If you don’t move these files they will be deleted again in 30 days

https://www.microsoft.com/en-us/download/details.aspx?id=35588
DL install SharePoint Online Management Shell
Run as administrator

Import-Module Microsoft.Online.Sharepoint.PowerShell -DisableNameChecking
Connect-SPOService -url “https://cf-admin.sharepoint.com“
(the -admin is important, don’t forget to add it)

PS C:\WINDOWS\system32> Get-SPODeletedSite -IncludeOnlyPersonalSite | Select-Object Url, DeletionTime, DaysRemaining

Url DeletionTime DaysRemaining


https://cf-my.sharepoint.com/personal/jen_cf_com 2026-11-23 4:04:04 AM 90
https://cf-my.sharepoint.com/personal/scott_cf_com 2026-11-23 4:04:02 AM 90
https://cf-my.sharepoint.com/personal/pam_cf_com 2026-11-23 4:04:01 AM 90
https://cf-my.sharepoint.com/personal/anna_cf_com 2026-11-23 4:03:59 AM 90
https://cf-my.sharepoint.com/personal/ana_cf_com 2026-11-04 3:50:15 AM 71

Restore-SPODeletedSite -Identity “https://cf-my.sharepoint.com/personal/anna_cf_com“
Wait 15min
Set-SPOUser -Site “https://cf-my.sharepoint.com/personal/anna_cf_com” -LoginName “msp@cf.onmicrosoft.com” -IsSiteCollectionAdmin $true

Restore-SPODeletedSite -Identity “https://cf-my.sharepoint.com/personal/scott_cf_com“
Wait 15min
Set-SPOUser -Site “https://cf-my.sharepoint.com/personal/scott_cf_com” -LoginName “msp@cf.onmicrosoft.com” -IsSiteCollectionAdmin $true

After waiting 20m you should be able to open the following in a browser

https://cf-my.sharepoint.com/personal/anna_cf_com

https://cf-my.sharepoint.com/personal/scott_cf_com

also

https://www.sharepointdiary.com/2018/12/install-update-uninstall-sharepoint-online-powershell-module.html