Script to list All Services and logon account information

Posted on 2008-11-18
Last Modified: 2012-06-27
I need a VB {or any type} of script to list the services running on a remote server.
In addition to their name I need the ability to list the owner of the service and if possible the ability to change either the name or password.

Listing the service name & owner is the first phase.
The others are a bonus.  
I swore I saw something out on the net just can't find it.

Thanks in advance..

Question by:MAJAEJ
    LVL 8

    Expert Comment

    depending on your os, windows xp, vista have a builtin utility tasklist

    at a command prompt type

    tasklist /? to get the usage.

    there are also other, one well know is sysinternals (now ms) pslist.exe

    tasklist /S \\remotepc

    Good luck!
    LVL 8

    Expert Comment

    as far as changing password you can use adsi scripting

    Set UserObj = GetObject("WinNT://YourDomain/UserID")
    UserObj.ChangePassword "oldpassword", "newpassword"
    Set UserObj = Nothing

    the environment variables should be sufficient as well for displaying account information

    from a command prompt or script you can echo out the variables


    for a full list run the "SET" command

    LVL 38

    Accepted Solution

    You can use the vbscript from this article to list all services and the accounts which they are running under:

    The easiest way to change a service username and password is with the sc config command, e.g.
    sc <\\servername> config <service> obj= <domain\account> password= <password>

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
    Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    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…

    745 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

    14 Experts available now in Live!

    Get 1:1 Help Now