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
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Microsoft already provides a handy tool for this, whoami.exe:


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

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.