Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 从O365 OneDrive用户中删除广告安全组_Sharepoint_Office365_Onedrive_Azure Powershell - Fatal编程技术网

Sharepoint 从O365 OneDrive用户中删除广告安全组

Sharepoint 从O365 OneDrive用户中删除广告安全组,sharepoint,office365,onedrive,azure-powershell,Sharepoint,Office365,Onedrive,Azure Powershell,我们有一个问题,所有用户OneDrive都添加了几个广告安全组。我已经和MS谈过了,他们找不到这些团体来自何处,认为一定是通过powershell 该组是来自已同步到Azure AD的on-prem域控制器的安全组。有人知道我如何从一个驱动器的所有用户中删除它吗?有没有办法让我看到所有的团体?此外,我是一名全局管理员,但powershell抱怨如果我执行以下操作,我没有权限 PS C:\Users\me\blah> Get-SPOSiteGroup -Site https://xyz-m

我们有一个问题,所有用户OneDrive都添加了几个广告安全组。我已经和MS谈过了,他们找不到这些团体来自何处,认为一定是通过powershell

该组是来自已同步到Azure AD的on-prem域控制器的安全组。有人知道我如何从一个驱动器的所有用户中删除它吗?有没有办法让我看到所有的团体?此外,我是一名全局管理员,但powershell抱怨如果我执行以下操作,我没有权限


PS C:\Users\me\blah> Get-SPOSiteGroup -Site https://xyz-my.sharepoint.com/personal/users_site.com

Get-SPOSiteGroup : Access denied. You do not have permission to perform this action or access this resource.
At line:1 char:1
+ Get-SPOSiteGroup -Site https://tbwgroupplc-my.sharepoint.com/personal ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-SPOSiteGroup], ServerUnauthorizedAccessException
    + FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerUnauthorizedAccessException,Microsoft.Online.SharePoint.PowerShell.GetSPOSiteGroup


要运行该命令,您需要是网站集管理员。全局管理员不能自动访问所有站点和每个用户的OneDrive,但他们可以让自己访问任何站点或OneDrive

因此,您需要先运行以下命令才能访问OneDrive

Set-SPOUser -Site https://contoso-my.sharepoint.com/personal/users_site.com -LoginName admin@contoso.com -IsSiteCollectionAdmin $true
此外,在SharePoint站点中,广告组被视为普通用户,因此我认为您应该使用
get spooser
而不是
get spositegroup