Revoke-SPObjectSecurity

从 SPObjectSecurity 对象中删除安全主体。

语法

Revoke-SPObjectSecurity
      [-Identity] <SPObjectSecurity>
      [-Principal] <SPClaim>
      [[-Rights] <String[]>]
      [-AssignmentCollection <SPAssignmentCollection>]
      [<CommonParameters>]
Revoke-SPObjectSecurity
      [-Identity] <SPObjectSecurity>
      [-All]
      [-AssignmentCollection <SPAssignmentCollection>]
      [<CommonParameters>]

说明

This cmdlet contains more than one parameter set. You may only use parameters from one parameter set and you may not combine parameters from different parameter sets. For more information about how to use parameter sets, see Cmdlet parameter sets.

Revoke-SPObjectSecurity 从 SPObjectSecurity 对象中删除安全主体(如用户)的 cmdlet。 SPObjectSecurity 对象是用于表示 SharePoint 管理对象(特别是服务应用程序)的安全访问控制列表 (ACL) 的常见对象。

有关 SharePoint 产品Windows PowerShell的权限和最新信息,请参阅 (https://go.microsoft.com/fwlink/p/?LinkId=251831)的https://go.microsoft.com/fwlink/p/?LinkId=251831联机文档。

示例

------------------示例------------------

$security = Get-SPServiceApplicationSecurity $serviceApp -Admin
Revoke-SPObjectSecurity $security "domain\user"
Set-SPServiceApplicationSecurity $serviceApp -Admin $security

本示例检索与服务应用程序上的管理员 ACL 对应的 SPObjectSecurity 对象,并从该 ACL 中删除用户。 删除的用户是服务应用程序 $serviceApp 的管理员。

参数

-All

指定将从指定 SPObjectSecurity 对象删除所有安全主体。

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Identity

指定将从其中删除安全主体的 SPObjectSecurity 对象。 可以使用 Get-SPServiceApplicationSecurity 该 cmdlet 获取 SPObjectSecurity 对象。

Type:SPObjectSecurity
Position:1
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Principal

指定要删除其权限的主体。

键入的值必须是有效的主体名称;例如,Full Control。

Type:SPClaim
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-Rights

指定要取消的主体权限。

键入的值必须是表示要取消的主体权限的有效字符串数组。

Type:String[]
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition

-工作分配

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
Applies to:SharePoint Server Subscription Edition