Home > Utilities > Service and Scheduled Task User Manager

Service and Scheduled Task User Manager


Sometimes, SOX regulations, customer agreement or your boss, forces you to have the password periodically changed for all service accounts and/or accounts running scheduled tasks. So either you have a detailed list of who (the user account) runs what (the service or scheduled task) where (on which computer), and manually change the password at the GUI, or you create a script to help you do the job.

A friend of mine, asked me to help him out and write the script he needed. I thought of creating a script that asks the user for input (account name, new password and a list of computers) and then runs against all the computers in the list and changes the password accordingly… but wouldn’t it be nicer to have a nifty application that does all that, and that you wouldn’t have to edit a text file, or type-in all the parameters each time you want to run the process but with a different set of arguments?

So I decided to write the application. The list of requirements included:

  • The computer list should be easy to manage, and the user should be able to easily add a computer to the list, or a pre-created list from a text file, or even directly from an Active Directory container.
  • The process results should be easy to understand, and even available to export and save for future references.
  • Have an option to manage only services, only scheduled tasks or both.
  • Have an option to restart the services after the password was changed.
  • Have an option to change the user account running the services and/or scheduled tasks.
  • Have a “dry-run” option that would only show the objects (services and scheduled tasks) that their credentials would have been changed.
  • Have an option to quickly connect using Remote Desktop to a selected computer in the list, and to edit the properties of scheduled task listed in the results.

The result from this list, together with other ideas and suggestions that came along the way is SSTUM (Service and Scheduled Task User Manager).

I think it’s easy to use, and the GUI is pretty much self explanatory:

Service and Scheduled Task User Manager

AddComputers ContextMenu

 

1. Add computers to the list. you can add a specific computer name, a list of computers from an Active Directory container or from a csv or text file) using the buttons in the Computer List box, right-click the list area and use the context menu, or drag-and-drop a csv or a text file to the computers list area.

 

Note: When using the specific computer option you can use a comma (“,”) to add many computers or an asterisk (“*”) to be used with a search filter to add computers from Active Directory. As a combined example: by typing in “SQL*,*TEST” in the Add a specific computer box, you will be adding to the list all computer accounts in Active Directory that start with “SQL” and all computer accounts that end with “TEST”.

2. Type-in the Current User that you want to change it’s password on all the listed computers, type in the New User if you want the change the user account running the services and scheduled tasks (or type-in the same account as in the current user text box, to leave the account information unchanged)

3. Enter the new password, and type it again in the validate field.

4. Select to Manage Scheduled Tasks, Manage Services and whether to Restart the services after the password was changed or not.

5. Click the Report Objects for a “dry-run”, or the Change Credentials to run the process and actually change the credentials for the selected objects (Services and Scheduled Tasks) on the listed computers.

Note: For the Report Objects option, you need only the Current User information.

Results ContextMenu

 

6. You can right-click the Results pane to quickly connect to a computer using Remote Desktop, to open the Task Properties window, or to export the results report to a CSV or an XML file to be later opened as an XML table in Excel.

 

 

SSTUM uses TaskScheduler.dll from http://www.codeproject.com/KB/cs/tsnewlib.aspx and dsuiext.dll from the Active Directory Service Interfaces, both included in the downloadable zipped file.

Download SSTUM.zip
Please note it requires you to have at least .NET Framework 2.0 installed

About these ads
  1. July 28, 2010 at 15:44 | #1

    Excellent Martin. You did exactly what a Sysadmin need. I am sure this tool will help lot of Sysadmins around in their password change activities. I will write a article in my blog pretty soon about this.

    Happy SysAdmin’s Day in Advance(July 30).

    Thanks again.

  2. erich
    August 6, 2010 at 08:29 | #2

    Hi Martin
    Somehow I cannot get this tool to work.
    It shows process completed but the results pane is empty. I tried it on XP and Vista but no success. Any Ideas
    Regards Erich

    • August 7, 2010 at 20:59 | #3

      Are you working in an ActiveDirectory environment? Are you running SSTUM under a prvileged user account? Do you have admin permissions on the remote computers?
      What about tcp/ip connectivity? Are you behind a firewall?
      Are you trying to modify services or scheduled tasks?

  3. August 19, 2010 at 10:45 | #4

    Cheers for the superb tool Martin…!

  4. Bill Benton
    August 20, 2010 at 19:25 | #5

    works well for Win2003 tasks.

    Can you get it working for Win2008 tasks and Win2008 Attached Events?

    • August 22, 2010 at 21:23 | #6

      Yes. The next version will support Win2008.

      • Chris
        November 9, 2010 at 19:34 | #7

        is it possible to implement the funktion to list tasks and services that runs as the local Administrator Account?

  5. Chris
    November 9, 2010 at 19:39 | #8

    The tool is perfekt to manage domain user accounts!
    Congratulation!

    • November 10, 2010 at 00:21 | #9

      I’ll add the local admin account option to the next version.

  6. Yoda
    December 31, 2010 at 19:27 | #10

    Hi,

    Any news for a new version which will support 2008/2008 R2 ?

    Thanks :-)

  7. Yashem
    January 18, 2011 at 16:45 | #11

    Yoda :Any news for a new version which will support 2008/2008 R2 ?
    Thanks

    I’ll second that – that would be the dot on the i. ;-)

  8. February 3, 2011 at 21:54 | #12

    Just wanted to say from one IT Pro / Developer to another – good work :) I’ve written a load of free apps for IT Pros (anyone interested can find them on my site http://www.cjwdev.co.uk) and I very rarely come across other people that have done the same (loads of command line tools out there but not many decent free GUI tools in my opinion). Anyway, I was about to write this exact same application and then found yours so you’ve saved me a lot of work as well. I’m curious as well, how did you get the logon details of the services? I was planning to call the QueryServiceConfig Windows API function from my .NET app as I couldn’t find any .NET only way of doing it. Did you find an easier way or did you have to resort to Windows APIs as well?
    Cheers, Chris.

    • February 3, 2011 at 22:48 | #13

      Hey Chris, thanks for the compliments!
      This little app, was supposed to get bigger. But I never got the time to complete it, and I’m not sure I ever will… (new baby and new job).
      I wanted to add some features like, [1] Support for Task Scheduler ver 2.0 (Windows 2008 / VISTA, Windows 2008 R2 / Windows 7).
      [2] Manage IIS ApplicationPools Identity passwords (IIS 6.0 and 7.x) [3] Manage SQL SA passwords. etc’….
      BTW, the for the services logon details I used WMI and the Win32_Service class. I can send you a snippet if you want. just drop me an email.

  9. JA
    August 6, 2011 at 19:45 | #14

    This is a great app that saved me a ton of work. I hope you still reconsider updating this to work with Server 2008. Either way, thank you for sharing this with all of us.

  10. AlanWhitten
    August 10, 2011 at 19:58 | #15

    I downloaded this program because I want to look out at a server farm and look at all scheduled tasks. IE – Whats happening at 3am tomorrow. I installed on my computer and added 2 computers via IP address. None of the data is filled when I click on a server. All I can do is add machines and remote desktop to them. Export says that there isnt anything to export.

    What am I missing?????

  11. kack
    November 23, 2011 at 17:10 | #16

    Hi,
    i can not download this file from this link.
    please help

    • November 23, 2011 at 23:05 | #17

      The file is hosted on mediafire.com
      When you click the SSTUM.zip link, it’ll open a new window to the download page. Then, just click the download button.

  12. Sixshooter
    May 29, 2012 at 22:28 | #20

    Can you let us all know when the 2008 version will be available for download.

  13. May 31, 2012 at 01:02 | #21

    Sorry guys, I don’t have the source code anymore. So I won’t be upgrading it to support Windows 2008 and above anytime soon.
    You can use the PowerShell version to (only) get the list of services, scheduled tasks and application pools. it doesn’t have the option to set a new identity or password (yet), but i’ll get to it. sometime. I hope.
    See http://gallery.technet.microsoft.com/Get-ServiceAccountUsage-b2fa966f for the PowerShell function

  14. May 31, 2012 at 16:44 | #22

    Well if you won’t be upgrading it to work with Windows 7 and Server 2008 etc, I’ll make my own version that will do it :) shouldn’t take long, and when its done it will be available to download here: http://cjwdev.co.uk/Software.html

  15. Sixshooter
    June 7, 2012 at 12:30 | #23

    Pleased to hear it cjwdev, this tool will make life a lot easier for any administrators out there.

    • June 7, 2012 at 15:54 | #24

      Thanks, it is nearly finished – I’ve got all of the services side of it up and running now, so just looking at scheduled tasks and then it will be done. I’ll post some screenshots and info on my blog later today (cjwdev.wordpress.com)

  16. Scott
    February 12, 2013 at 18:08 | #27

    Will this scan machines for a service using specific Account. I am looking to inventry any machine using a specific account ?

    • February 12, 2013 at 23:28 | #28

      Yes.

      • Sixshooter
        February 13, 2013 at 23:10 | #29

        Scott
        I use this at work and find it invaluable. It will let you inventory any user account running both a service and a scheduled task.

  17. Scott
    February 18, 2013 at 13:08 | #30

    Hi getting an error Unhandled exceptions has occurred in your application when i try to connect to AD.I am running the application from the desktop of a windows 2008 R2 server could this be the issue ?

    • February 23, 2013 at 23:16 | #31

      What is the complete error message?
      Click the details button in the error message window, and copy-paste the information here please.

  18. Jeff Diemer
    May 16, 2013 at 17:57 | #32

    Running on Windows 8 Pro using elevated Administrator permissions.

    Error message when attempting to open computers via Active Directory (windows 2008 compatibility):

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************
    System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    at System.StubHelpers.ValueClassMarshaler.ClearNative(IntPtr dst, IntPtr pMT)
    at ..DsBrowseForContainerW(& )
    at .()
    at . ()
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6400 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
    —————————————-
    SSTUM
    Assembly Version: 1.0.0.3
    Win32 Version: 1.0.0.3
    CodeBase: file:///C:/Users/jeff/Desktop/SSTUM/SSTUM.exe
    —————————————-
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6402 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    —————————————-
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6401 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    —————————————-
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6401 (Win8RTMGDR.050727-6400)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    —————————————-
    System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
    —————————————-
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
    —————————————-
    System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.6387 (Win8RTM.050727-6300)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    —————————————-

    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

  1. July 27, 2010 at 22:47 | #1
  2. July 28, 2010 at 19:22 | #2
  3. August 19, 2010 at 10:52 | #3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: