PowerShell – Detect User in Local Admin Group
This will return the primary user of a computer, and detect if that user is in the local administrators group (very useful for InfoSec reporting). I’m using it with Intune. Works perfectly. This is a slightly modified version, as I’ve removed site data, but you’ll get the idea. NOTE: I made this for domain users, Read More …