Get-ItemAcl

Retrieves security access rules from an item.

Syntax

Get-ItemAcl -Identity <AccountIdentity> -Path <String>

Get-ItemAcl -Identity <AccountIdentity> -Id <String> [-Database <String>]

Get-ItemAcl -Identity <AccountIdentity> -Item <Item>

Get-ItemAcl -Filter <String> -Path <String>

Get-ItemAcl -Filter <String> -Id <String> [-Database <String>]

Get-ItemAcl -Filter <String> -Item <Item>

Get-ItemAcl -Item <Item>

Get-ItemAcl -Path <String>

Get-ItemAcl -Id <String>

Detailed Description

Retrieves security access rules from an item.

© 2010-2019 Adam Najmanowicz, Michael West. All rights reserved. Sitecore PowerShell Extensions

Parameters

-Identity <AccountIdentity>

User name including domain for which the access rule is being created. If no domain is specified - 'sitecore' will be used as the default domain.

Specifies the Sitecore user by providing one of the following values.

Local Name
    Example: adam
Fully Qualified Name
    Example: sitecore\adam

-Filter <String>

Specifies a simple pattern to match Sitecore roles & users.

Examples: The following examples show how to use the filter syntax.

To get security for all roles, use the asterisk wildcard: Get-ItemAcl -Filter *

To security got all roles in a domain use the following command: Get-ItemAcl -Filter "sitecore*"

-Item <Item>

The item from which the security rules should be taken.

-Path <String>

Path to the item from which the security rules should be taken.

-Id <String>

Id of the item from which the security rules should be taken.

-Database <String>

Database containing the item to be fetched with Id parameter containing the security rules that should be returned.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Sitecore.Data.Items.Item

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Sitecore.Security.AccessControl.AccessRule

Notes

Help Author: Adam Najmanowicz, Michael West

Examples

EXAMPLE 1

Take the security information from the Home item and apply it to the Settings item

$acl = Get-ItemAcl -Path master:\content\home
Set-ItemAcl -Path master:\content\Settings -AccessRules $acl -PassThru

EXAMPLE 2

Take the security information from the Home item and add it to the access rules on the Settings item

$acl = Get-ItemAcl -Path master:\content\home
Add-ItemAcl -Path master:\content\Settings -AccessRules $acl -PassThru

Last updated