Windows User Gathering Data

i want a script to run on windows 2000 server to gather all the information about the local user ex- user name , member of etc
vijyantAsked:
Who is Participating?
 
davidsummersCommented:
Well

NET is your freind here if you do not want to go into VB scripting.

NET USER %YOURUSERNAME% /DOMAIN will return this information

H:\>net user dave /domain
The request will be processed at a domain controller for domain Testdomain.COM.

User name                   Dave
Full Name                    David Summers
Comment                      This is my test account
User's comment
Country code                 000 (System Default)
Account active               Yes
Account expires              Never

Password last set            3/10/2006 1:29 PM
Password expires             5/9/2006 1:29 PM
Password changeable          3/17/2006 1:29 PM
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script                        logon.bat
User profile
Home directory               \\homeserver\dave$
Last logon                   3/30/2006 9:31 AM

Logon hours allowed          All

Local Group Memberships
Global Group memberships     *Domain Users         *App_Citrix
                             *App_Word          *Desktop_Users
                             *Cool_Users            *Domino Admin
                             *Dist_All

This can be piped out to a text file and incorporated into a logon script like this

echo................................... >> %username%.txt
echo %Date% >> %username%.txt
echo. >> username.txt
net user %username% /domain  >> %username%.txt
echo................................... >> %username%.txt

Running from a batch file. This will create a new text file named as the current username variable and then output the results of the net user command to the file.

I can come up with a lot of other methods and commands to capture other information if this information is not enough for you. Let me know







0
 
haim96Commented:
0
 
dlwyatt82Commented:
Microsoft already provides a handy tool for this, whoami.exe:  http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/whoami-o.asp

Just use WHOAMI /USER /GROUPS
0
 
vijyantAuthor Commented:
HI I had looked in microsoft script center but havent got script what exactly i want .

LEt me tell u what i want , i am accessing few windows servers through RDP , where i want to collect the local user information example how many local users are their , their names and all users are meber of ....

so that i can copy it to some .txt file to proceed ahead

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.