J
Joe
Guest
I found this batch file on a newsgroup a while back, I'm trying to get a
text file that shows all the users I have in my domain groups. It keeps on
giving me a message of something like "group not found" (I'm not near a dc
to give the exact error) I noted the line numbers in this string.
Any ideas how to make this work ?
Line 1@echo off
Line 2 if exist c:\Groups.txt del c:\Groups.txt
Line 3 for /F "tokens=*" %%* in ('net localgroup ^| find "*"') do call :Sub
%%*
Line 4 for /F "tokens=*" %%* in ('net groups /domain ^| find "*"') do call
:Sub %%*
Line 5 goto :eof
Line 6 :sub
Line 7 set name=%*
Line 8 net group "%name:~1%" | find /i /v "comment" | find /i /v "members" |
find /i /v "--------------" | find /i /v "completed successfully" >>
c:\Groups.txt
text file that shows all the users I have in my domain groups. It keeps on
giving me a message of something like "group not found" (I'm not near a dc
to give the exact error) I noted the line numbers in this string.
Any ideas how to make this work ?
Line 1@echo off
Line 2 if exist c:\Groups.txt del c:\Groups.txt
Line 3 for /F "tokens=*" %%* in ('net localgroup ^| find "*"') do call :Sub
%%*
Line 4 for /F "tokens=*" %%* in ('net groups /domain ^| find "*"') do call
:Sub %%*
Line 5 goto :eof
Line 6 :sub
Line 7 set name=%*
Line 8 net group "%name:~1%" | find /i /v "comment" | find /i /v "members" |
find /i /v "--------------" | find /i /v "completed successfully" >>
c:\Groups.txt