Created
October 12, 2021 00:11
-
-
Save natesubra/49c71cafba9d3b0517071b352de549ed to your computer and use it in GitHub Desktop.
Get SID Mappings Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$tableLayout = ( | |
@{Expression = { ((New-Object System.Security.Principal.SecurityIdentifier($_.Value)).Translate([System.Security.Principal.NTAccount])).Value }; Label = "Name"; Width = 40 }, | |
@{Expression = { $_.Value }; Label = "SID"; Width = 40 }, | |
@{Expression = { $_.Type }; Label = "Type" } | |
) | |
$Claims = ([Security.Principal.WindowsIdentity]::GetCurrent()).Claims | |
$Claims | Format-Table $tableLayout |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment