Skip to content

Commit 1f8eb4c

Browse files
committed
Added support to Format-NtSecurityDescriptor for access check results.
1 parent 2b786cf commit 1f8eb4c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

NtObjectManager/NtObjectManager.psm1

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,6 +1835,8 @@ function Format-NtSecurityDescriptor {
18351835
[NtApiDotNet.NtObject]$Object,
18361836
[Parameter(Position = 0, ParameterSetName = "FromSecurityDescriptor", Mandatory = $true, ValueFromPipeline)]
18371837
[NtApiDotNet.SecurityDescriptor]$SecurityDescriptor,
1838+
[Parameter(Position = 0, ParameterSetName = "FromAccessCheck", Mandatory = $true, ValueFromPipeline)]
1839+
[NtObjectManager.AccessCheckResult]$AccessCheckResult,
18381840
[Parameter(Position = 0, ParameterSetName = "FromAcl", Mandatory = $true)]
18391841
[AllowEmptyCollection()]
18401842
[NtApiDotNet.Acl]$Acl,
@@ -1887,6 +1889,12 @@ function Format-NtSecurityDescriptor {
18871889
}
18881890
($fake_sd, $Type, "UNKNOWN")
18891891
}
1892+
"FromAccessCheck" {
1893+
$Check_sd = New-NtSecurityDescriptor $AccessCheckResult.SecurityDescriptor
1894+
$Type = Get-NtType $AccessCheckResult.TypeName
1895+
$Name = $AccessCheckResult.Name
1896+
($Check_sd, $Type, $Name)
1897+
}
18901898
}
18911899

18921900
if ($ToSddl) {

0 commit comments

Comments
 (0)