Solved

VB.Net Automatically killing processes that have not closed properly

Posted on 2015-01-28
1
122 Views
Last Modified: 2015-01-28
Hi Experts.  On our terminal servers, we often have processes that have hung or not closed properly.   Does anyone know of a way to identify processes that are not live, "owned" or have been running for hours, and a way of killing them?  There are some programs that have known issues on Terminal Server and writing something would save us having to go into the server and kill the processes.  Thanks in advance
0
Comment
Question by:PNRT
1 Comment
 
LVL 15

Accepted Solution

by:
ChloesDad earned 500 total points
ID: 40575903
To get an array of all the process do this

         ' Get all processes running on the local computer. 
         Dim localAll As Process() = Process.GetProcesses()

Open in new window


The process class has properties, Kill, which kills the process, Responding which indicates if the UI is responding, and starttime, which you can use to work out how long the process has been running.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…

760 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

20 Experts available now in Live!

Get 1:1 Help Now