Category Archives: oneline script

Command to Copy Member Of from one Group to another AD Group

Have googled this and didn’t found command/script to copy member of, however found many articles to copy members from a group, though of write a simplified command to achieve this, have already discussed how to copy group membership from one group to another group

Also Read: Display the list of members with nested groups

Source … [Continue reading]

Search for text in files

Search for text in files

How to Search for text in files? Some time we require to find a files that contain specific text, search files for text is necessary if you have a multiple files and you want to find text in files, let say you have various log files and you want to know which file having error, … [Continue reading]

To check the list of Users Group Membership

Check the list of Users Group Membership List

I have used “for” command to read the input file (list.txt) and execute the “net user” command for each user and store the result in output.txt file

For /f %a in (list.txt) do net user %a /dom >> output.txt

Note: run this command from where the input file (list.txt) there
Example: if … [Continue reading]