Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.Net Automatically killing processes that have not closed properly

Posted on 2015-01-28
1
Medium Priority
?
134 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 2000 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

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolve DNS query failed errors for Exchange
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

772 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