Local Admin

(imported topic written by nberger91)

Anyone know the simplest way to determine whether the ‘currently logged on user’ is a ‘member of local group “Administrators”’ excluding the local Administrator account ?

-thanks !

(imported comment written by tig91)

I’m pretty sure this is one of those things that will kill your domain controllers. Also, I have no idea if this is a “good” way to do it.

q: elements of intersection of (set of ((following text of last "\" of it) of (members of local group "Administrators" as string)); set of ((names of it) of logged on user))
A: tig
I: plural string

q: number of (elements of intersection of (set of ((following text of last "\" of it) of (members of local group "Administrators" as string)); set of ((names of it) of logged on user))) > 0
A: True
I: singular boolean