Windows User Gathering Data

Posted on 2006-03-29
Last Modified: 2012-06-22
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
Question by:vijyant
    LVL 13

    Expert Comment

    LVL 14

    Expert Comment

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

    LVL 13

    Expert Comment

    LVL 1

    Accepted Solution


    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


    Author Comment

    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


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
    Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now