breich

Listing Nested Members of a Group on the Command Line

Oct 24th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.69 KB | None | 0 0
  1. @ECHO OFF
  2. @REM **************************************************************************
  3. @REM * ingroup.bat                                                            *
  4. @REM *                                                                        *
  5. @REM * Displays a list of users who are members of a group including nested   *
  6. @REM * members (users who are members of groups that are members of the       *
  7. @REM * group specified at the command line).                                  *
  8. @REM *                                                                        *
  9. @REM * Usage  : ingroup <groupname>                                           *
  10. @REM *                                                                        *
  11. @REM * Author : Brian Reich <breich@reich-consulting.net>                     *
  12. @REM **************************************************************************
  13.  
  14. dsquery group -name %1 | dsget group -members -expand | dsget user -samid
Add Comment
Please, Sign In to add comment