File tree Expand file tree Collapse file tree 4 files changed +19
-12
lines changed
Expand file tree Collapse file tree 4 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 33 RootModule = ' ADSec.psm1'
44
55 # Version number of this module.
6- ModuleVersion = ' 1.0.1 '
6+ ModuleVersion = ' 1.0.4 '
77
88 # ID used to uniquely identify this module
99 GUID = ' 1cfaca0a-3c7d-47dd-bb9f-9711310a0b9d'
2626 # Modules that must be imported into the global environment prior to importing
2727 # this module
2828 RequiredModules = @ (
29- @ { ModuleName = ' PSFramework' ; ModuleVersion = ' 1.0.35 ' }
29+ @ { ModuleName = ' PSFramework' ; ModuleVersion = ' 1.12.346 ' }
3030 )
3131
3232 # Assemblies that must be loaded prior to importing this module
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 1.0.4 (2025-01-22)
4+
5+ - Upd: Raised PSFramework Dependency Version to 1.12.346
6+ - Upd: Get-AdsAcl - Enabled retrieving ACL from deleted objects
7+ - Upd: Get-AdsAcl - Detect insufficient access rights to retrieve security information
8+
39## 1.0.1 (2022-04-04)
410
511- New: Configuration setting to disable connection verification
Original file line number Diff line number Diff line change 1313 ' Enable-AdsInheritance.Processing' = ' Starting process to enable inheritance on {0}' # $pathItem
1414 ' Enable-AdsInheritance.ReadAcl.Failed' = ' Failed to access acl on {0}' # $pathItem
1515 ' Enable-AdsInheritance.Updating.Acl' = ' Enabling inheritance' #
16+ ' Get-AdsAcl.NoSecurityProperty' = ' No security information found on {0}. Ensure you have sufficient access.' # $pathItem
1617 ' Get-AdsAcl.ObjectError' = ' Error accessing item: {0}' # $pathItem
1718 ' Get-AdsAcl.Processing' = ' Retrieving Acl from {0}' # $pathItem
1819 ' Get-AdsOrphanAce.Read.Failed' = ' Failed to access {0}' # $pathItem
Original file line number Diff line number Diff line change 1- function Get-AdsAcl
2- {
3- <#
1+ function Get-AdsAcl {
2+ <#
43 . SYNOPSIS
54 Reads the ACL from an AD object.
65
4443 $EnableException
4544 )
4645
47- begin
48- {
46+ begin {
4947 $adParameters = $PSBoundParameters | ConvertTo-PSFHashtable - Include Server, Credential
5048 Assert-ADConnection @adParameters - Cmdlet $PSCmdlet
5149 }
52- process
53- {
50+ process {
5451 if (Test-PSFFunctionInterrupt ) { return }
5552
56- foreach ($pathItem in $Path )
57- {
53+ foreach ($pathItem in $Path ) {
5854 if (-not $pathItem ) { continue }
5955 Write-PSFMessage - String ' Get-AdsAcl.Processing' - StringValues $pathItem
6056
61- try { $adObject = Get-ADObject @adParameters - Identity $pathItem - Properties ntSecurityDescriptor }
57+ try { $adObject = Get-ADObject @adParameters - Identity $pathItem - Properties ntSecurityDescriptor - IncludeDeletedObjects }
6258 catch { Stop-PSFFunction - String ' Get-AdsAcl.ObjectError' - StringValues $pathItem - Target $pathItem - EnableException $EnableException - Cmdlet $PSCmdlet - ErrorRecord $_ - Continue }
6359 $aclObject = $adObject.ntSecurityDescriptor
60+ if (-not $aclObject ) {
61+ Stop-PSFFunction - String ' Get-AdsAcl.NoSecurityProperty' - StringValues $pathItem - Target $pathItem - EnableException $EnableException - Cmdlet $PSCmdlet - Category PermissionDenied - Continue
62+ }
63+
6464 Add-Member - InputObject $aclObject - MemberType NoteProperty - Name DistinguishedName - Value $adObject.DistinguishedName - Force
6565 $aclObject
6666 }
You can’t perform that action at this time.
0 commit comments