none
DS Query RRS feed

  • Question

  • I am using the below command line script to export the AD users in to the text file.

    I have more than 15 Active directory groups in the group.txt file. The output.txt file is not showing result for all the 15 user groups. 

    It is not appending the users in the output.txt rather it is overwriting the output file. Is there any way to get the users from all the 15 AD groups?

    ---------------------------------------------------------------------------------------------------

    for /f %g in (C:\group.txt) do dsquery group -name %g| dsget group -members | dsget user -samid -fn -ln -empid -office -email -title -dept –company>c:\output.txt

    ---------------------------------------------------------------------------------------------------

    Tuesday, May 20, 2014 6:34 PM

All replies

  • Wrong forum. This is the forum for System Center Data Protection Manager. Not for AD.

    Thanks.

    This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, May 21, 2014 6:09 PM