How To Get A List Of All Local Administrators

Least privilege access is a standard and basic security principle, but I found very important to verify that there are no exceptions or weaknesses in the systems with any unwanted user member of the local administrator group.

This script retrieves a list of all users that are member of the local administrator group.

It simple to use MMC and adding the snap-in of local user and groups for a remote or local machine (or run lusrmgr.msc). But I think this script can be extremely useful to run this check against a large number of workstations.

Note if you’re using Powershell 5.1 or later versions you can use this cmd-let : Get-LocalGroupMember 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.