Skip to content

Commit 4a303b3

Browse files
committed
Added MandatoryPolicy.
1 parent 5fd72a8 commit 4a303b3

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

NtObjectManager/NtObjectManager.psm1

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,8 @@ Show token default DACL.
15831583
Show the default DACL in full rather than a summary.
15841584
.PARAMETER Basic
15851585
Show basic token information, User, Group, Privilege and Integrity.
1586+
.PARAMETER MandatoryPolicy
1587+
Show mandatory integrity policy.
15861588
.OUTPUTS
15871589
System.String
15881590
.EXAMPLE
@@ -1640,7 +1642,9 @@ function Format-NtToken {
16401642
[parameter(ParameterSetName = "Complex")]
16411643
[switch]$DefaultDacl,
16421644
[parameter(ParameterSetName = "Complex")]
1643-
[switch]$FullDefaultDacl
1645+
[switch]$FullDefaultDacl,
1646+
[parameter(ParameterSetName = "Complex")]
1647+
[switch]$MandatoryPolicy
16441648
)
16451649

16461650
if ($All) {
@@ -1657,6 +1661,7 @@ function Format-NtToken {
16571661
$PrimaryGroup = $true
16581662
$DefaultDacl = $true
16591663
$DeviceGroup = $true
1664+
$MandatoryPolicy = $true
16601665
}
16611666
elseif ($Basic) {
16621667
$Group = $true
@@ -1729,6 +1734,12 @@ function Format-NtToken {
17291734
Format-ObjectTable $token.IntegrityLevel | Write-Output
17301735
}
17311736

1737+
if ($MandatoryPolicy) {
1738+
"MANDATORY POLICY"
1739+
"----------------"
1740+
Format-ObjectTable $token.MandatoryPolicy | Write-Output
1741+
}
1742+
17321743
if ($TrustLevel) {
17331744
$trust_level = $token.TrustLevel
17341745
if ($trust_level -ne $null) {
@@ -1822,6 +1833,8 @@ Show token default DACL.
18221833
Show the default DACL in full rather than a summary.
18231834
.PARAMETER Basic
18241835
Show basic token information, User, Group, Privilege and Integrity.
1836+
.PARAMETER MandatoryPolicy
1837+
Show mandatory integrity policy.
18251838
.OUTPUTS
18261839
Text data
18271840
.EXAMPLE
@@ -1869,7 +1882,9 @@ function Show-NtTokenEffective {
18691882
[parameter(ParameterSetName = "Complex")]
18701883
[switch]$DefaultDacl,
18711884
[parameter(ParameterSetName = "Complex")]
1872-
[switch]$FullDefaultDacl
1885+
[switch]$FullDefaultDacl,
1886+
[parameter(ParameterSetName = "Complex")]
1887+
[switch]$MandatoryPolicy
18731888
)
18741889

18751890
Use-NtObject($token = Get-NtToken -Effective) {
@@ -1894,6 +1909,7 @@ function Show-NtTokenEffective {
18941909
Token = $token
18951910
DefaultDacl = $DefaultDacl
18961911
FullDefaultDacl = $FullDefaultDacl
1912+
MandatoryPolicy = $MandatoryPolicy
18971913
}
18981914
Format-NtToken @args
18991915
}

0 commit comments

Comments
 (0)