< Back
Test-Acl
Post
NAME Test-Acl
SYNOPSIS
Checks ACL Entries to Objects.
SYNTAX
Test-Acl [-Path] <Object> [-Principal] <Object> [-Rights] <Object> [-PropagationFlags {None | NoPropagateInherit |
InheritOnly}] [-InheritanceFlags {None | ContainerInherit | ObjectInherit}] [-Inherit <Boolean>] [-Allow] [-Deny]
[<CommonParameters>]
DESCRIPTION
Used to simplify checking ACL settings. Allows for more natural syntax
PARAMETERS
-Path <Object>
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
-Principal <Object>
The user/group principal to be used.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Rights <Object>
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:\\>Test-Acl -Path "c:\\temp" -Principal "UserName" -Rights "Read"
Update Folder ACL by username
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Test-Acl "HKCU:\\Test" $StrSID "ReadKey"
Update Registry ACL by username
RELATED LINKS
SYNOPSIS
Checks ACL Entries to Objects.
SYNTAX
Test-Acl [-Path] <Object> [-Principal] <Object> [-Rights] <Object> [-PropagationFlags {None | NoPropagateInherit |
InheritOnly}] [-InheritanceFlags {None | ContainerInherit | ObjectInherit}] [-Inherit <Boolean>] [-Allow] [-Deny]
[<CommonParameters>]
DESCRIPTION
Used to simplify checking ACL settings. Allows for more natural syntax
PARAMETERS
-Path <Object>
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
-Principal <Object>
The user/group principal to be used.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Rights <Object>
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:\\>Test-Acl -Path "c:\\temp" -Principal "UserName" -Rights "Read"
Update Folder ACL by username
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Test-Acl "HKCU:\\Test" $StrSID "ReadKey"
Update Registry ACL by username
RELATED LINKS