We help IT Professionals succeed at work.

Script to kill outlook tasks

Tek Info
Tek Info used Ask the Experts™
on
I would like to have a script handy (.bat) which when double clicked will kill any outlook processes that are found using tasks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AlexA lack of information provides a lack of a decent solution.

Commented:
Taskkill /im Outlook.exe

Open in new window


Easy.
Bill PrewTest your restores, not your backups...
Top Expert 2016

Commented:
Why would you want to do that, you run the risk of corruption PST files and losing potential active work in Outlook?


»bp
AlexA lack of information provides a lack of a decent solution.

Commented:
I'd say the likelihood is he's got an addon which is crashing out his client. Fixing the addon would be the preferable way forward to be fair.
Bill PrewTest your restores, not your backups...
Top Expert 2016

Commented:
If that's the case then I'd suggest identifying the faulty addon by process of elimination, and then disabling it until a fixed version can be obtained / created.

Outlook is fairly robust (at east 2017 is) about being terminated abnormally, but I still don't like the idea of killing all Outlook processes if it can be avoided.


»bp
AlexA lack of information provides a lack of a decent solution.

Commented:
I'm 100% behind you on that Bill, but at the same time he didn't stipulate WHY they want this. I agree with everything you've said but the OP failed to explain why they wanted the code. I just provided exactly what they wanted :-)

A lack of information provides a lack of a decent solution.
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
Sometimes your Outlook instance does not terminate, and there is no (obvious) reason for that. In that case killing Outlook after having tried to close it by normal means is required. However - there is only one single Outlook instance running per user session. As long as only a single user is logged in, there cannot be more than one Outlook process running ;-).
And killing it might require "the force": taskkill /im Outlook.exe /f