Revoke-SPObjectSecurity
**S’applique à :**SharePoint Server 2016
**Dernière rubrique modifiée :**2015-03-09
Removes a security principal from a SPObjectSecurity object.
Syntaxe
Revoke-SPObjectSecurity [-Identity] <SPObjectSecurity> [-Principal] <SPClaim> [[-Rights] <String[]>] [-AssignmentCollection <SPAssignmentCollection>]
Revoke-SPObjectSecurity [-Identity] <SPObjectSecurity> -All <SwitchParameter> [-AssignmentCollection <SPAssignmentCollection>]
Detailed Description
Cette cmdlet contient plus d’un jeu de paramètres. Vous ne pouvez utiliser les paramètres que d’un seul jeu et vous ne pouvez pas combiner les paramètres de différents jeux. Pour plus d’informations sur l’utilisation des jeux de paramètres, voir la rubrique relative aux jeux de paramètres de cmdlet.
The Revoke-SPObjectSecurity cmdlet to remove a security principal, such as a user, from a SPObjectSecurity object. An SPObjectSecurity object is a common object that is used to represent the security access control list (ACL) of SharePoint administrative objects, in particular service applications.
Pour connaître les autorisations et les informations les plus récentes concernant Windows PowerShell pour les produits SharePoint, voir la documentation en ligne à l’adresse Informations de référence sur Windows PowerShell pour SharePoint Server 2016.
Paramètres
Parameter | Required | Type | Description | ||
---|---|---|---|---|---|
Identity |
Required |
Microsoft.SharePoint.Administration.AccessControl.SPObjectSecurity |
Specifies the SPObjectSecurity object from which the security principal is removed. You can use the Get- SPServiceApplicationSecurity cmdlet to get a SPObjectSecurity object . |
||
Principal |
Required |
Microsoft.SharePoint.Administration.Claims.SPClaim |
Specifies the principal for whom the rights are removed. The type must a valid name a principal; for example, Full Control. |
||
Rights |
Optional |
System.String[] |
Specifies the rights of the principal to revoke. The type must a valid array of strings that represents the rights of the principal to revoke. |
||
All |
Required |
System.Management.Automation.SwitchParameter |
Specifies that all security principals are removed from the specified SPObjectSecurity object. |
||
AssignmentCollection |
Optional |
Microsoft.SharePoint.PowerShell.SPAssignmentCollection |
Gère les objets de manière à optimiser leur libération. L’utilisation d’objets, tels que SPWeb ou SPSite , peut consommer des quantités de mémoire élevées et le recours à ces objets dans des scripts Windows PowerShell implique une gestion appropriée de la mémoire. À l’aide de l’objet SPAssignment , vous pouvez affecter des objets à une variable et les libérer dès qu’ils ne sont plus nécessaires afin de libérer de la mémoire. Lorsque les objets SPWeb , SPSite ou SPSiteAdministration sont utilisés, ils sont automatiquement libérés si une collection d’attributions ou le paramètre Global ne sont pas utilisés.
|
Input Types
Return Types
Exemple
------------------EXAMPLE------------------
$security = Get-SPServiceApplicationSecurity $serviceApp -AdminRevoke-SPObjectSecurity $security "domain\user"Set-SPServiceApplicationSecurity $serviceApp -Admin $security
This example retrieves the SPObjectSecurity object corresponding to the administrator ACL on a service application, and removes a user from that ACL. The removed an administrator for the service application $serviceApp
.