有些用户的office365账号删除了,但是原来onedrive中的内容没有下载备份,这就需要采用特殊方法恢复。
1. 下载SharePoint Online Management Shell
https://www.microsoft.com/zh-cn/download/details.aspx?id=35588
2.检查安装是否成功
PS C:\Windows\system32> Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
Name Version
---- -------
Microsoft.Online.SharePoint.PowerShell 16.0.23019.0
3.链接到sharepoint
如果没有启动用MFA登录,用下面的命令连接即可
Connect-SPOService -Url https://companycomcn-admin.sharepoint.com/ -Credential admin@companycomcn.onmicrosoft.com
但是如果启用了MFA,上面的命令会出错,这个时候需要使用如下方式:
Connect-SPOService -Credential $creds -Url https://companycomcn-admin.sharepoint.com -ModernAuth $true -AuthenticationUrl https://login.microsoftonline.com/organizations
4.先检查确定账户是否可以还原
Get-SPODeletedSite -Identity https://companycomcn-my.sharepoint.com/personal/bili_zhu_companycom
5.如果显示可以还原,那就执行如下指令,完成后原来的共享链接就可以访问了。
Restore-SPODeletedSite -Identity https://companycomcn-my.sharepoint.com/personal/bili_zhu_companycom