# encoding: ascii
# api: powershell
# title: WellKnownSidType
# description: See http://msdn.microsoft.com/en-us/library/system.security.principal.wellknownsidtype.aspx
# version: 0.1
# author: greg zakharov
# license: CC0
# x-poshcode-id: 4559
# x-archived: 2013-11-01T01:03:47
# x-published: 2013-10-26T15:11:00
#
#
[Enum]::GetNames([Security.Principal.WellKnownSidType]) | % {
$itm = [Security.Principal.WellKnownSidType]::$_
try {
$sid = New-Object Security.Principal.SecurityIdentifier($itm, $null)
$sid.Translate([Security.Principal.NTAccount]).Value
}
catch {}
}