Monday 18 November 2013

Command to list and save all users in the Windows Group



During Audit, Admin may need to document the list of users have been assigned on each windows group. Below command will store all the users on the mentioned group to specific file. It saves admin’s time and energy.

We can also automate this process by having through batch file so that the entire user list would be documented on one click. Additional scripts are required for this automation.

We can also use this automation for auditing purpose as well by sending Email whenever new users are assigned to specific group. Additional scripts are required for this automation.

Command

Below command list all the users on “Windows-System-Group”

Net localgroup "Windows-System-Group"

Below command stores all the users on “Windows-System-Group” to D:\Users.txt file.


Net localgroup "Windows-System-Group" >> D:\Users.txt

No comments:

Post a Comment