< Back
Remove-Acl
Post
NAME Remove-Acl
SYNOPSIS
Removes ACL Entries to Objects.
SYNTAX
Remove-Acl [-Path <String[]>] [-Principal] <Object> [-Rights] <Array> [-PropagationFlags {None |
NoPropagateInherit | InheritOnly}] [-InheritanceFlags {None | ContainerInherit | ObjectInherit}] [-Inherit
<Boolean>] [-Allow] [-Deny] [<CommonParameters>]
Remove-Acl [-Path <String[]>] [-Rules] <AccessRule[]> [<CommonParameters>]
DESCRIPTION
Used to simplify ACL removing work. Allows for more natural syntax
PARAMETERS
-Path <String[]>
Changes the security descriptor of the specified item.
Enter the path to an item, such as a path to a file or registry key.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Rules <AccessRule[]>
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Principal <Object>
The user/group principal to be used.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Rights <Array>
The permission(s) the should be used.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PropagationFlags
Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are significant only
if inheritance flags are present.
Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false
-InheritanceFlags
Inheritance flags specify the semantics of inheritance for access control entries (ACEs).
Required? false
Position? named
Default value ContainerInherit, ObjectInherit
Accept pipeline input? false
Accept wildcard characters? false
-Inherit <Boolean>
Should the permission be viewed as inherited by child objects.
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-Allow [<SwitchParameter>]
Represents an Allow permission.
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-Deny [<SwitchParameter>]
Represents an Deny permission.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Add-Acl -Path "c:\\temp" -Principal "UserName" -Rights "Read"
Update Folder ACL by username
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Add-Acl "HKCU:\\Test" $StrSID "ReadKey"
Update Registry ACL by username
RELATED LINKS
SYNOPSIS
Removes ACL Entries to Objects.
SYNTAX
Remove-Acl [-Path <String[]>] [-Principal] <Object> [-Rights] <Array> [-PropagationFlags {None |
NoPropagateInherit | InheritOnly}] [-InheritanceFlags {None | ContainerInherit | ObjectInherit}] [-Inherit
<Boolean>] [-Allow] [-Deny] [<CommonParameters>]
Remove-Acl [-Path <String[]>] [-Rules] <AccessRule[]> [<CommonParameters>]
DESCRIPTION
Used to simplify ACL removing work. Allows for more natural syntax
PARAMETERS
-Path <String[]>
Changes the security descriptor of the specified item.
Enter the path to an item, such as a path to a file or registry key.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-Rules <AccessRule[]>
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Principal <Object>
The user/group principal to be used.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Rights <Array>
The permission(s) the should be used.
Required? true
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PropagationFlags
Specifies how Access Control Entries (ACEs) are propagated to child objects. These flags are significant only
if inheritance flags are present.
Required? false
Position? named
Default value None
Accept pipeline input? false
Accept wildcard characters? false
-InheritanceFlags
Inheritance flags specify the semantics of inheritance for access control entries (ACEs).
Required? false
Position? named
Default value ContainerInherit, ObjectInherit
Accept pipeline input? false
Accept wildcard characters? false
-Inherit <Boolean>
Should the permission be viewed as inherited by child objects.
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-Allow [<SwitchParameter>]
Represents an Allow permission.
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-Deny [<SwitchParameter>]
Represents an Deny permission.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Add-Acl -Path "c:\\temp" -Principal "UserName" -Rights "Read"
Update Folder ACL by username
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Add-Acl "HKCU:\\Test" $StrSID "ReadKey"
Update Registry ACL by username
RELATED LINKS