Testing for Local Administrator Privilege with PowerShell

When writing PowerShell scripts it is sometimes necessary to know whether the user account running the script has local administrator privileges.  A piece of code often used for this is: However, this code only returns true when run in an elevated context, so it is not really a test of whether the user has local administrator … Continue reading Testing for Local Administrator Privilege with PowerShell