Hi everyone,
can anyone point me to any tools (GUI or CL) that will produce
- a list of groups
- What directories those groups have been applied to
Does such a tool exist?
tia
Craig
Oops
Changing formats between various NT-based operating systems and service
packs,
so use:
@echo off
if /i {%1}=={L} goto OK
if /i {%1}=={D} goto OK
if /i {%1}=={B} goto OK
@echo Syntax: groups [L/D/B]&goto :EOF
:OK
setlocal
set type=%1
if /i "%type%" EQU "D" call :getd
if /i "%type%" EQU "B" call :getd
if /i "%type%" EQU "B" call :getl
if /i "%type%" EQU "L" call :getl
endlocal
goto :EOF
:getd
for /f "Tokens=* Delims=*" %%g in ('net group /domain ^|findstr /l
/c:"*"') do (
call :fix D "%%g"
)
goto :EOF
:getl
for /f "Tokens=* Delims=*" %%g in ('net localgroup ^|findstr /l /c:"*"')
do (
call :fix L "%%g"
)
goto :EOF
:fix
set ld=%1
set grp=%2
set grp=%grp:"=%
for /f "Tokens=1-3 Delims=*" %%a in ('@echo %grp%') do (
call :fix1 "%%a" "%%b" "%%c%
)
goto :EOF
:fix1
set grp=%1
set grp=%grp: "=%
set grp=%grp:"=%
if "%grp%" NEQ "" @echo %ld% %grp%
set grp=%2
set grp=%grp: "=%
set grp=%grp:"=%
if "%grp%" NEQ "" @echo %ld% %grp%
set grp=%3
set grp=%grp: "=%
set grp=%grp:"=%
if "%grp%" NEQ "" @echo %ld% %grp%
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com