System.Security.Principal.WindowsIdentity
represents a Windows user (or more techically a Windows NT security token). System.Security.Principal.WindowsPrincipal
object from a WindowsIdentity
object: $curIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent() $principal = new-object System.Security.Principal.WindowsPrincipal $curIdentity $principal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::User) $principal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
AuthenticationType
indicates how a user was authenticated. .Claims
returns a list of System.Security.Claims.Claim
objects.