Skip to content

Commit 50d63ac

Browse files
committed
update docs... still needs work
1 parent 9acf07b commit 50d63ac

File tree

1 file changed

+46
-38
lines changed

1 file changed

+46
-38
lines changed

docs/en-US/Get-ADEffectiveAccess.md

Lines changed: 46 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ schema: 2.0.0
99

1010
## SYNOPSIS
1111

12-
{{ Fill in the Synopsis }}
12+
Retrieves effective access and audit rules for Active Directory objects, translating `ObjectType` and `InheritedObjectType` GUIDs into human-readable names.
1313

1414
## SYNTAX
1515

@@ -45,7 +45,9 @@ Get-ADEffectiveAccess
4545

4646
## DESCRIPTION
4747

48-
{{ Fill in the Description }}
48+
An enhanced alternative to `Get-Acl` for Active Directory, this cmdlet retrieves access control lists (ACLs) for AD objects, returning effective access and audit rules. It translates `ObjectType` and `InheritedObjectType` GUIDs into human-readable names using a per-session, per-domain map for improved performance and readability.
49+
50+
Unlike `Get-Acl`, there is no dependency on the Active Directory module and includes built-in LDAP search functionality to locate objects.
4951

5052
## EXAMPLES
5153

@@ -61,7 +63,11 @@ PS C:\> {{ Add example code here }}
6163

6264
### -Audit
6365

64-
Use this switch to include audit rules for the security descriptor from the system access control list (SACL).
66+
Use this switch to include audit rules from the System Access Control List (SACL).
67+
68+
> [!NOTE]
69+
>
70+
> Usage of this switch may impact performance in large directories.
6571
6672
```yaml
6773
Type: SwitchParameter
@@ -77,9 +83,7 @@ Accept wildcard characters: False
7783
7884
### -Credential
7985
80-
Specifies a user account that has permission to perform this action. The default is the current user.
81-
82-
Type a user name, such as `User01` or `myDomain\User01`, or enter a [`PSCredential`](https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.pscredential) object generated by the [`Get-Credential` cmdlet](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential). If you type a user name, you're prompted to enter the password.
86+
Specifies a user account with permission to perform this action. Default is the current user. Accepts a username (e.g., `User01`, `myDomain\User01`) or a [`PSCredential`](https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.pscredential) object from [`Get-Credential`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential). Prompts for a password if a username is provided.
8387

8488
```yaml
8589
Type: PSCredential
@@ -95,9 +99,7 @@ Accept wildcard characters: False
9599

96100
### -IncludeDeletedObjects
97101

98-
Use this switch to include deleted objects in your search. This switch is also required when getting the ACL for a deleted Identity.
99-
100-
For more details, see [`DirectorySearcher.Tombstone` Property](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher.tombstone#system-directoryservices-directorysearcher-tombstone).
102+
Includes deleted objects in the search. Required when retrieving ACLs for deleted objects. See [`DirectorySearcher.Tombstone`](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher.tombstone#system-directoryservices-directorysearcher-tombstone) for details.
101103

102104
```yaml
103105
Type: SwitchParameter
@@ -113,7 +115,7 @@ Accept wildcard characters: False
113115

114116
### -LdapFilter
115117

116-
Specifies an LDAP query string that is used to filter Active Directory objects you want to get the ACL from.
118+
Specifies an LDAP query to filter Active Directory objects (e.g., `(objectClass=user)`).
117119

118120
For more details, see the [__Remarks__ section from `DirectorySearcher.Filter`](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher.filter#remarks).
119121

@@ -131,11 +133,11 @@ Accept wildcard characters: False
131133

132134
### -SearchScope
133135

134-
Specifies the scope of an Active Directory search. The acceptable values for this parameter are:
136+
Specifies the Active Directory search scope:
135137

136-
- `Base` or `0` - Searches only the current path or object
137-
- `OneLevel` or `1` - Searches the immediate children of that path or object
138-
- `Subtree` or `2` - Searches the current path or object and all children of that path or object
138+
- `Base` (`0`): Searches only the current path.
139+
- `OneLevel` (`1`): Searches immediate children.
140+
- `Subtree` (`2`): Searches the current path and all children.
139141

140142
```yaml
141143
Type: SearchScope
@@ -152,23 +154,14 @@ Accept wildcard characters: False
152154

153155
### -Server
154156

155-
Specifies the AD DS instance to connect to by providing one of the following values for a corresponding domain name or directory server.
156-
157-
Domain name values:
157+
Specifies the AD DS instance to connect to. Accepts:
158158

159159
- Fully qualified domain name
160160
- NetBIOS name
161+
- Directory server name (with optional port, e.g. `myDC01:636`)
162+
- Global Catalog (e.g. `GC://myChildDomain`)
161163

162-
Directory server values:
163-
164-
- Fully qualified directory server name
165-
- NetBIOS name
166-
- Fully qualified directory server name and port
167-
168-
> [!TIP]
169-
>
170-
> - You can use `GC://` prefix to search in the Global Catalog, e.g.: `-Server GC://myChildDomain`.
171-
> - Including the port to use with your query is valid using the syntax `<HOST>:<PORT>`, e.g.: `-Server myDC01:636`.
164+
Defaults to the current domain if not specified.
172165

173166
```yaml
174167
Type: String
@@ -184,9 +177,7 @@ Accept wildcard characters: False
184177

185178
### -Top
186179

187-
The maximum number of objects you want to get the ACL from. The default value is `0`, meaning that the maximum number of object you will be getting the ACL from is determined by your LDAP filter or lack of it (all objects).
188-
189-
See also [`DirectorySearcher.SizeLimit` Property](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher.sizelimit#system-directoryservices-directorysearcher-sizelimit).
180+
Limits the number of objects to retrieve ACLs for. Default is `0` (no limit, determined by LDAP filter). See [`DirectorySearcher.SizeLimit`](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher.sizelimit#system-directoryservices-directorysearcher-sizelimit) for details.
190181

191182
```yaml
192183
Type: Int32
@@ -202,11 +193,11 @@ Accept wildcard characters: False
202193

203194
### -AuthenticationTypes
204195

205-
Specifies the authentication method to use. The default value is `Secure`.
196+
Specifies the authentication method. Default is `Secure`.
206197

207-
> [!NOTE]
198+
> [!TIP]
208199
>
209-
> [`AuthenticationTypes`](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.authenticationtypes) is a Flags Enum, meaning that you can combine values, for example `-AuthenticationTypes 'Secure, FastBind'` is valid.
200+
> [`AuthenticationTypes`](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.authenticationtypes) is a `Flags` Enum, you can combine values as needed, e.g.: `-AuthenticationTypes 'Secure, FastBind'`.
210201

211202
```yaml
212203
Type: AuthenticationTypes
@@ -222,7 +213,7 @@ Accept wildcard characters: False
222213

223214
### -Identity
224215

225-
Specifies an Active Directory object by providing one of the following property values. The identifier in parentheses is the LDAP display name for the attribute.
216+
Specifies an Active Directory object by:
226217

227218
- A DistinguishedName
228219
- A GUID (`objectGuid`)
@@ -231,7 +222,7 @@ Specifies an Active Directory object by providing one of the following property
231222

232223
> [!TIP]
233224
>
234-
> This parameter takes pipeline input. You can pipe the output from [ActiveDirectory cmdlets](https://learn.microsoft.com/en-us/powershell/module/activedirectory) to this parameter whenever the output has an `objectGuid` or a `DistinguishedName` property.
225+
> Accepts pipeline input from [ActiveDirectory cmdlets](https://learn.microsoft.com/en-us/powershell/module/activedirectory) with `objectGuid` or `DistinguishedName` properties.
235226

236227
```yaml
237228
Type: String
@@ -247,9 +238,9 @@ Accept wildcard characters: False
247238

248239
### -PageSize
249240

250-
Determines the maximum number of objects the server can return in a paged search. The default is `1000`.
241+
Sets the maximum number of objects returned per page in a paged search. Default is `1000`.
251242

252-
See also [`DirectorySearcher.PageSize` Property](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher.pagesize) for more details.
243+
See [`DirectorySearcher.PageSize`](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher.pagesize) for more details.
253244

254245
```yaml
255246
Type: Int32
@@ -265,7 +256,7 @@ Accept wildcard characters: False
265256

266257
### -SearchBase
267258

268-
Specifies the `DistinguishedName` of an Organization Unit or Container as the base for your search.
259+
Specifies the `DistinguishedName` of an Organizational Unit or Container as the search base. Defaults to the domain root if not specified.
269260

270261
```yaml
271262
Type: String
@@ -287,12 +278,29 @@ This cmdlet supports the common parameters. For more information, see [about_Com
287278

288279
### System.String
289280

281+
Accepts a string representing a `DistinguishedName`, `objectGuid`, `objectSid`, or `sAMAccountName` via pipeline for the [`-Identity` parameter](#-identity). You can also pipe objects from Active Directory cmdlets having `DistinguishedName` or `objectGuid` properties.
282+
290283
## OUTPUTS
291284

292285
### ADEffectiveAccess.EffectiveAccessRule
293286

287+
Represents effective access rules with resolved `ObjectType` and `InheritedObjectType` GUIDs.
288+
294289
### ADEffectiveAccess.EffectiveAuditRule
295290

291+
Represents effective audit rules with resolved `ObjectType` and `InheritedObjectType` GUIDs (when `-Audit` is specified).
292+
296293
## NOTES
297294

295+
- This cmdlet maintains a per-session, per-domain map to translate `ObjectType` and `InheritedObjectType` into human-readable names, improving usability and performance.
296+
- Querying audit rules (`-Audit`) or deleted objects (`-IncludeDeletedObjects`) may impact performance on large directories.
297+
- Ensure the account used has sufficient permissions to read security descriptors.
298+
298299
## RELATED LINKS
300+
301+
- [ActiveDirectoryAccessRule](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectoryaccessrule)
302+
- [ActiveDirectoryAuditRule](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.activedirectoryauditrule)
303+
- [Active Directory Module](https://learn.microsoft.com/en-us/powershell/module/activedirectory)
304+
- [Get-Credential](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential)
305+
- [DirectorySearcher](https://learn.microsoft.com/en-us/dotnet/api/system.directoryservices.directorysearcher)
306+
- [Get-ADEffectiveAccess on GitHub](https://github.com/santisq/ADEffectiveAccess)

0 commit comments

Comments
 (0)