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

[玩转系统] OneDrive for Business:如何在租户级别隐藏同步按钮?

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

OneDrive for Business:如何在租户级别隐藏同步按钮?


要求:禁用 OneDrive for Business 中的“同步”按钮。

OneDrive for Business 是一个出色的基于云的协作平台,用于存储、管理和共享文件。但是,有时您可能需要禁用同步功能。也许您正在处理一个需要大量磁盘空间、带宽的项目,或者您在同步方面遇到问题。无论出于何种原因,让我向您展示如何在 OneDrive for Business 网站中禁用同步。

[玩转系统] OneDrive for Business:如何在租户级别隐藏同步按钮?

如何关闭 OneDrive for Business 的同步图标?

如何禁用 OneDrive for Business 网站上的同步按钮?请按照以下步骤隐藏 OneDrive for Business 网站的“同步”按钮:

  1. 通过 https://YourDomain-Admin.SharePoint.com 登录 SharePoint 管理中心
  2. 单击左侧导航下方的“设置”链接
  3. 在设置页面中,单击“OneDrive”应用程序旁边的“同步”。
  4. 在“同步”页面中,取消选中“在 OneDrive 网站上显示同步按钮”,然后单击“保存”按钮以提交更改。

    [玩转系统] OneDrive for Business:如何在租户级别隐藏同步按钮?

从 OneDrive for Business 库隐藏同步按钮需要一段时间。请记住,禁用同步不会删除存储在 OneDrive for Business 帐户中的任何文件或文件夹 - 它只是停止将它们与您的计算机同步。

使用 PowerShell 在 OneDrive for Business 中禁用同步

我们可以使用 PowerShell 在租户级别禁用 OneDrive for Business。


Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking

#Set Parameters
$TenantAdminURL= "https://crescent-admin.sharepoint.com"
 
#Setup Credentials to connect
$Cred = Get-Credential
 
Try {
    #Setup the context
    $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($TenantAdminURL)
    $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)
 
    #Get tenant object
    $Tenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
    $Ctx.Load($Tenant)
    $Ctx.ExecuteQuery()

    #Disable Sync button for OneDrive 
    $Tenant.HideSyncButtonOnODB = $True
    $Tenant.Update()
    $Ctx.ExecuteQuery()
}
Catch {
    write-host -f Red "Error Updating Tenant Settings!" $_.Exception.Message
}

这会隐藏所有 OneDrive for Business 网站的同步按钮,用户将无法访问其文件,除非通过 Web 浏览器登录 OneDrive 网站。请注意,这些更改不会立即生效!我一个案例花了6个小时!

您可以禁用 SharePoint Online 库或网站的同步功能:如何禁用 SharePoint Online 文档库中的“同步”?

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

取消回复欢迎 发表评论:

关灯