Finding the local administrators on a system is a not infrequent action. There are a number of ways to do this.
The oldest method is to use the ADSI WinNT provider
$group =[ADSI]"WinNT://$($env:COMPUTERNAME)/Administrators, group" $members =… Read the full text.