Share via

Powershell task kill

Anonymous
2022-02-07T12:06:36+00:00

I have several meeting rooms setup to empty the Outlook mailbox when its closed. So im trying to have a powershell script close Outlook after office hours but if you PS C:> Stop-Process -Name "outlook" it just kills outlook where as if you manually close it a prompt comes up with an OK box saying inbox will be emptied are you ok with this or something along those lines

Is there a way to have it hit OK for me and close?

Thank you!

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. DaveM121 872.6K Reputation points Independent Advisor
    2022-02-09T10:34:02+00:00

    Hi Ritchie,

    I am Dave, I will help you with this.

    There are a number of proposed solutions to this problem on the link below, hopefully one of those will work for you:

    https://social.technet.microsoft.com/Forums/lyn...

    0 comments No comments
  2. Anonymous
    2022-02-09T10:28:23+00:00

    Ah ok I missed understood your question.

    Unfortunately I am not sure how to assist further, hopefully another advisor will be able to assist further.

    Kind Regards,

    Elise

    0 comments No comments
  3. Anonymous
    2022-02-09T09:40:47+00:00

    Hi Elise

    Thats the same as what i was trying in the original post

    Trouble is that just kills it off completely and doesnt give you the dialoge do you want to delete on the way out.

    I need some extra script to close it gracefully and then fill out OK for me

    Cheers

    0 comments No comments
  4. Anonymous
    2022-02-07T16:10:34+00:00

    Hi, I'm Elise, and I'd be happy to help with your issue.

    Could you try:

    Stop-Process -Force -Name "outlook"

    Please let me know if you need any further assistance.

    Kind Regards,

    Elise

    0 comments No comments