当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 如何在 Office 365 中授予对其他用户的 OneDrive for Business 网站的访问权限?

作者:精品下载站 日期:2024-12-14 14:33:48 浏览:15 分类:玩电脑

如何在 Office 365 中授予对其他用户的 OneDrive for Business 网站的访问权限?


要求:向其他用户授予 OneDrive for Business 访问权限。

默认情况下,当用户创建 SharePoint 我的网站或 OneDrive 网站集时,SharePoint 会向用户分配主网站集管理员或 OneDrive 所有者权限。在某些情况下,您可能需要访问其他用户的 OneDrive for Business 网站。例如,用户离开了公司,用户的经理想要获得访问权限、备份目的、合规性、委派、安全性等。本文将引导您了解如何向其他用户授予 OneDrive for Business 网站的访问权限。

以全局管理员身份访问任何用户的 OneDrive 网站

如果您拥有“全局管理员”权限,请按照以下步骤为租户中的任何用户访问 OneDrive:

  1. 登录 Microsoft 管理门户 https://admin.microsoft.com/,
  2. 展开用户 >> 活动用户 >> 搜索并查找获得 OneDrive 站点访问权限的用户。
  3. 单击用户名打开属性窗格 >> 单击“OneDrive”选项卡,然后单击“创建文件链接”链接。这将创建指向用户 OneDrive 网站的链接,并将您作为网站集管理员添加到该网站。

    [玩转系统] 如何在 Office 365 中授予对其他用户的 OneDrive for Business 网站的访问权限?

如果您只有“SharePoint 管理员”权限但没有全局管理员怎么办?

如何向 Office 365 中 OneDrive for Business 网站上的其他用户授予管理员访问权限?

如何向其他用户授予 OneDrive for Business 网站的访问权限?要访问用户的 OneDrive 网站,请按照以下步骤操作:

  1. 登录 SharePoint Online 管理中心。
  2. 单击“更多功能”,然后单击左侧导航中的“用户配置文件”链接。
  3. 单击“人员”组下的“管理用户配置文件”链接。

    [玩转系统] 如何在 Office 365 中授予对其他用户的 OneDrive for Business 网站的访问权限?

  4. 搜索并选择您想要访问的用户配置文件。在搜索结果中,单击上下文菜单中的菜单项“管理网站集所有者”。

    [玩转系统] 如何在 Office 365 中授予对其他用户的 OneDrive for Business 网站的访问权限?

  5. 默认情况下,OneDrive 网站集的所有者被列为主网站集管理员并在网站集管理员中列出。 (您只能有一个主要网站集管理员!)。在“网站集管理员”字段中将任何其他管理员添加到网站集。您可以更改主网站集管理员以及从 OneDrive for Business 网站中删除所有者。

    [玩转系统] 如何在 Office 365 中授予对其他用户的 OneDrive for Business 网站的访问权限?

  6. 单击“确定”以提交您的更改!

现在,您可以访问特定用户的所有文件和文件夹。您可以使用 PowerShell 脚本向 OneDrive for Business 网站添加管理员权限,而不是手动执行这些步骤来获取对 OneDrive 网站的访问权限。

PowerShell 将网站集管理员添加到 OneDrive for Business 网站集

如果您需要访问其他用户的 OneDrive for Business 网站,则需要更改网站集所有者或向网站集添加其他管理员。在 SharePoint Online Management Shell 上使用此 PowerShell 脚本将管理员添加到 OneDrive for Business。


#Set Runtime Parameters
$AdminSiteURL="https://crescent-admin.sharepoint.com"
$OneDriveSiteUrl="https://crescent-my.sharepoint.com/personal/biadmin_crescent_com"
$SiteCollAdmin="[email protected]"

#Get Credentials to connect to SharePoint Admin Center
$Cred = Get-Credential

#Connect to SharePoint Online Admin Center
Connect-SPOService -Url $AdminSiteURL -credential $Cred

#Add Site Collection Admin to the OneDrive
Set-SPOUser -Site $OneDriveSiteUrl -LoginName $SiteCollAdmin -IsSiteCollectionAdmin $True
Write-Host "Site Collection Admin Added Successfully!"

此 PowerShell 向其他用户授予所有者对 OneDrive for Business 的访问权限。

授予对所有 OneDrive for Business 网站集的管理员访问权限

由于没有直接的用户界面可将网站集管理员添加到 OneDrive for Business 网站,因此您可以使用以下 PowerShell 脚本批量添加其他管理员:


#Set Runtime Parameters
$AdminSiteURL="https://crescent-admin.sharepoint.com"
$SiteCollAdmin="[email protected]"

#Get Credentials to connect to the SharePoint Admin Center
$Cred = Get-Credential

#Connect to SharePoint Online Admin Center
Connect-SPOService -Url $AdminSiteURL -credential $Cred

#Get all OneDrive for Business Site collections
$OneDriveSites = Get-SPOSite -Template "SPSPERS" -Limit ALL -IncludePersonalSite $True
Write-Host -f Yellow "Total Number of OneDrive Sites Found: "$OneDriveSites.count

#Add Site Collection Admin to each OneDrive
Foreach($Site in $OneDriveSites)
{
    Write-Host -f Yellow "Adding Site Collection Admin to: "$Site.URL 
    Set-SPOUser -Site $Site.Url -LoginName $SiteCollAdmin -IsSiteCollectionAdmin $True
}
Write-Host "Site Collection Admin Added to All OneDrive Sites Successfully!" -f Green

此脚本将网站集管理员添加到所有 OneDrive for Business 网站集。通过将用户添加为网站所有者或网站集管理员,您将授予对该网站上所有文件和文件夹的完全访问权限。向特定用户是网站所有者的所有现有网站添加新管理员怎么样?


#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"
$OldAdminID = "[email protected]"
$NewAdminID = "[email protected]"

#Connect to SharePoint Admin Center
Connect-SPOService -url $TenantAdminURL

#Get All Sites where a particular user is owner
$Sites  =  Get-SPOSite -IncludePersonalSite $true -Limit All | Where {$_.Owner -eq $OldAdminID}

#Add NewAdmin as Site Collection Owner to all sites
$Sites | ForEach-Object { 
    Set-SPOUser -Site $_.Url -LoginName $NewAdminID -IsSiteCollectionAdmin $True
    Write-host "Added Site collection Admin to" $_.URL
}

PnP PowerShell 将网站集管理员添加到 OneDrive 网站

以下是使用 PowerShell 添加 OneDrive for Business 网站集管理员的方法:


#Set Runtime Parameters
$AdminSiteURL="https://crescent-admin.sharepoint.com"
$OneDriveSiteUrl="https://crescent-my.sharepoint.com/personal/sjackson_crescent_com"
$SiteCollAdmin="[email protected]"
 
#Connect to PnP Online
Connect-PnPOnline -Url $AdminSiteURL -Interactive

#Change OneDrive Ownership
Set-PnPTenantSite -Url $OneDriveSiteUrl -Owners $SiteCollAdmin

同样,您可以将网站集管理员添加到所有 OneDrive for Business 网站,如下所示:


#Set Parameters
$AdminSiteURL="https://crescent-admin.sharepoint.com"
$SiteCollAdmin="[email protected]"
 
#Connect to PnP Online to the Tenant Admin Site
Connect-PnPOnline -Url $AdminSiteURL -Interactive
 
#Get All OneDrive Sites
$OneDriveSites = Get-PnPTenantSite -IncludeOneDriveSites -Filter "Url -like '-my.sharepoint.com/personal/'"

#Loop through each site
ForEach($Site in $OneDriveSites)
{ 
    #Add Site collection Admin
    Set-PnPTenantSite -Url $Site.URL -Owners $SiteCollAdmin
    Write-Host -f Green "Added Site Collection Admin to: "$Site.URL
}
此 PowerShell 脚本仅将给定用户添加为其他网站集管理员。现有管理员将留下!

要删除 OneDrive 网站集管理员,请使用:如何从 OneDrive 删除网站集管理员?

经常问的问题:

如何访问已删除用户的 OneDrive for Business?

已删除用户的 OneDrive 网站将保留 30 天或 OneDrive 保留策略中配置的天数。您可以使用 PowerShell 中的 Restore-SPODeletedSite cmdlet 还原已删除的 OneDrive 站点。
详细信息:恢复 OneDrive for Business 网站

如何向组织外部授予对 OneDrive 的访问权限?

应在租户和站点级别启用外部用户访问,以提供对 OneDrive 文件和文件夹的访问。您可以使用 SharePoint 管理中心或 PowerShell 来实现相同的目的。
更多信息:OneDrive for Business 来宾访问

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯