17 April 2009

List all User Accounts that belongs to the Local Group

The following script provides a list of all user accounts that belongs to the local group. Create a file, let say LocGrpMemb.bat and put into it the following:

@Echo off
For /F "Tokens=* Skip=6" %%a in ('NET LOCALGROUP %1 ^| FIND /I /V "The command completed successfully."') Do @echo %%a
Bookmark and Share ITStuff.ca

No comments:

Post a Comment