File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1243,6 +1243,9 @@ Display the primary tokens from accessible processes named notepad.exe.
12431243. EXAMPLE
12441244Show-NtToken -Name "notepad.exe" -MaxTokens 5
12451245Display up to 5 primary tokens from accessible processes named notepad.exe.
1246+ . EXAMPLE
1247+ Show-NtToken -All
1248+ Show a list of all accessible tokens to choose from.
12461249#>
12471250function Show-NtToken {
12481251 [CmdletBinding (DefaultParameterSetName = " FromPid" )]
@@ -1256,7 +1259,9 @@ function Show-NtToken {
12561259 [Parameter (Mandatory = $true , Position = 0 , ParameterSetName = " FromName" )]
12571260 [string ]$Name ,
12581261 [Parameter (Position = 0 , ParameterSetName = " FromName" )]
1259- [int ]$MaxTokens = 0
1262+ [int ]$MaxTokens = 0 ,
1263+ [Parameter (Position = 0 , ParameterSetName = " All" )]
1264+ [switch ]$All
12601265 )
12611266
12621267 PROCESS {
@@ -1292,6 +1297,9 @@ function Show-NtToken {
12921297 Start-NtTokenViewer $t
12931298 }
12941299 }
1300+ " All" {
1301+ Start-Process " $PSScriptRoot \TokenViewer.exe"
1302+ }
12951303 }
12961304 }
12971305}
You can’t perform that action at this time.
0 commit comments