Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

powershell check if user is admin

$elevated = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #powershell #check #user #admin
ADD COMMENT
Topic
Name
9+6 =