Solved

How to script the automatic shut down of a specific process on a terminal server weekly

Posted on 2012-04-05
2
370 Views
Last Modified: 2012-04-09
I have a long story, that ends in a simple question at the bottom, please bear with me:

I have a 2008 R2 Terminal Server in production.  6 of the clients that RDP to this server in our environment simply run a web page that is used for an employee timeclock application.  

The SAAS host has a maintenance window on Sunday between 9AM and 11AM every week in which their servers shut down.  When this happens the web page goes 404 and needs to be reconnected to the service.  

This is a monitor on a wall, connected to a thin client connected to the terminal server.  With over 1000 employees using this system for clocking in and out, we want this to be as simple as possible.  There is no touch interface, no keyboard, no mouse.  Just the card swipe.  The system works perfectly until the Sunday maintenance window.

The station automatically launches iexplore.exe as an environment setting in the Active Directory user setup, so if the iexplore.exe closes it logs the session out, and then the thin client re-establishes a new session and launches iexplore fresh again.

What I am looking for is a way to script the automatic shutdown of the iexplore.exe process on the terminal server at 11:00AM every Sunday.  I would love to be able to aim the script at the 6 specific usernames associated to the 6 stations, however if necessary, if I can put a script together that kills all iexplore.exe processes on the server regardless of what user has it open would be great too.
envirosetting.JPG
0
Comment
Question by:TheMetalicOne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
pony10us earned 500 total points
ID: 37813207
The following shoud force terminate the iexplore.exe process for the 6 users:



@echo off
rem ****************************************
rem * Kill iexplore.exe task for 6 individuals               *
rem * Use scheduled task to set the date/time to run *
rem * change the user1-6 to the login names of the    *
rem * 6 individuals                                                       *
rem ****************************************

 TASKKILL /F /FI "USERNAME eq user1" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user2" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user3" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user4" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user5" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user6" /IM iexplore.exe

exit
0
 
LVL 5

Author Closing Comment

by:TheMetalicOne
ID: 37823068
So simple, yet genius.  Thanks for your help on this.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

751 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