How to Remotely Get Members of Local Administrators Group
There are a several programs and scripts to get the members of local administrators group on a Windowx XP or Win2K Pro computers. Recently I wrote a batch file based on the command
psexec -n 5 \\<computer_name> net localgroup administrators
‘psexec’ is a command line utility that allows you to run processes on remote computers. The utility is part of command line toolkit provided by Microsoft and can be downloaded from http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx.
A variation to the above command is
psexec @filename.txt net localgroup administrators
This commands takes a file with a list of computer names as an input. Hopefully in another post I will write the reason why I chose to write a batch file with computer name instead of using a file with computer names.