Search notes:

System.Security.Principal.WindowsIdentity (class)

System.Security.Principal.WindowsIdentity represents a Windows user (or more techically a Windows NT security token).

TODO

Create a 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)

See also

The (static) method GetCurrent() returns a WindowsIdentity object that represents the current user.
The property AuthenticationType indicates how a user was authenticated.
The property .Claims returns a list of System.Security.Claims.Claim objects.
group

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Microsof...', 1758206772, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Microsoft/dot-net/namespaces-classes/System/Security/Principal/WindowsIdentity/index(54): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78