User information

  • Thread starter Thread starter J
  • Start date Start date

J

Distinguished
Apr 2, 2004
373
0
18,780
Archived from groups: microsoft.public.win2000.advanced_server (More info?)

Does anyone know if there is a utility available which will give me a list
of users and what login scripts they have been assigned that I can print
off? A Goole search and Technet search seemed to draw a bit of a blank and
I don't relish the thought of using ADUC to look through nearly 500 user
properties!

TIA

J
 
Archived from groups: microsoft.public.win2000.advanced_server (More info?)

On Tue, 8 Jun 2004 09:08:41 +0100, "j" <j@j.net> wrote:

>Does anyone know if there is a utility available which will give me a list
>of users and what login scripts they have been assigned that I can print
>off? A Goole search and Technet search seemed to draw a bit of a blank and
>I don't relish the thought of using ADUC to look through nearly 500 user
>properties!
>
>TIA
>
>J
>

Yes.

Using getusers.bat from tip 7964 in the 'Tips & Tricks' at
http://www.jsiinc.com, run the following batch and pipe it to a file:

@echo off
setlocal
for /f "Tokens=*" %%u in ('getusers') do (
set user=%%u
call :script
)
endlocal
goto :EOF
:script
set nu=net user "%user%" /domain
for /f "Tokens=3" %%a in ('%nu%^|findstr /i /C:"Logon script"') do (
set ls=%%a
)
if "%ls%" EQU "" set ls=NONE
set work=%user% #
set user=%work:~0,25%
@echo %user% %ls%


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com