How to Shutdown Windows Computer Remotely Using Outlook

Ads by Google

Remote-Control

Have you ever left your computer on, only realizing later that you wouldn’t be able to get back at it until a few hours? Well, I must admit that I have this foolish habit.

And hence, it became very import for me to find a way to switch off my computer even while I would be away. I did not want to rely on third party software. I decided to use a tool that’s always open on my computer.

We know that Windows uses Shutdown.exe to switch off our computer. We have also learned that MS Outlook can launch applications on receipt of emails and rules verification. Let’s see how we can use this capability of Outlook to trigger a shutdown.

Note: You must have Outlook installed (and up and running) on your computer. It should also be connected to the internet so that the desktop email client is ready to receive emails and trigger the shutdown process.

Step 1: Create a .bat file. First create a text file and then save it as .bat. Remember the save location.

Save-Type-Shutdown

Step 2: Before you close the file, put this in it: %systemroot%\system32\shutdown.exe -s -t 0. Also shown in the image below. Save and close the file.

Shutdown-Command-Content

Step 3: Now open MS Outlook. Under Home tab, go to Rules and expand the menu. Select Manage Rules and Alerts.

Shutdown-Create-Rule

Step 4: On the Rules and Alerts window chick on New Rule while under Email Rules tab.

Shutdown-New-Rule

Step 5: Start off by selecting your template as Apply rule on messages I receive. Click on Next.

Shutdown-Apply-Receive-Rule

Step 6: This is the most important step as it determines what rule should be applied. You may have your own conditions but my suggestion would be to have a mix of many to restrict unwanted shutdowns.

Step 6 (a): Select the following rules. For me there is a reason to each:

  1. through the specified account- If you have multiple email id’s configured with MS Outlook you must choose which account the rule applies to.
  2. sent only to me- The motive is to restrict the email rule trigger based on recipient list.
  3. with specific words in the subject- Another constraint so that the receiving email is identified better.
  4. with specific words in the body- Sometimes, only the subject may be ambiguous. So a body makes it more refined.
  5. on this computer only- If you have Outlook configured with same email addresses on multiple machines you must be cautious about the machine you want to apply the rule to.

Shutdown-Rule-Conditions

Step 6 (b): Once you have selected the conditions you need to specify the content by clicking on each of those links in the second half of the window. Here are my samples:-

Apply-Account-Shutdown

Ads by Google

Shutdown-Subject-1

Shutdown-Subject-2

Shutdown-Body

Step 6 (c): Back on the main window, verify that you have associated all conditions. Then click on Next.

Shutdown-Rule-Created

Step 7: Next comes the action to be applied when an email is received and all the conditions match. Select start application and delete it.

Shutdown-Start-Application

The action for start application will do your job. However, if you do not delete it the rule may apply again and again on opening Outlook, resulting in a loop.

Step 7 (a): For starting application action, click on the link and select the file you created at the beginning of the tutorial. Click on Next.

Select-Shutdown-Execute

Step 8: I do not think you require any exceptions here. So ignore this window and click on Next.

Shutdown-Exceptions

Step 9: Give the rule a name for future references, turn it on and click on Finish.

Shutdown-Finish-Rule-Setup

Step 10: That’s it. You are done. Now you can turn off you computer remotely.

Triggering Remote Shutdown

When you want to remotely turn off you computer just create a new mail with proper subject and body (as defined in the rule conditions) and send it to the account to which the rule applies. If Outlook is up and running and it receives the mail your computer will be shutdown.

Important

You think you are done? Not yet. With all this effort the computer will be shut down on receipt of a matching email from any email account around the world.

So, go back to Step 6 (a) and select one for the condition from people or specific group. Map it to the account you are going to use to send out emails for such Shutdown trigger.

If you like the trick, try to create similar ones to restart, logoff and hibernate your computer. Let us know how it works.

Liked the article? Make sure to check our previous posts on Outlook. We do all sorts of cool and helpful how-tos, guides, lists and more. So if you don’t want to miss those, make sure to subscribe to our email newsletter.

Top Image Credit: free photos & art

Before You Go...

Just wanted to let you know that we've just launched our YouTube Channel where we'll upload awesome video content. Make sure you hit the subscribe button to stay up to date with the new videos we upload every week.

Get Guiding Tech articles delivered to your inbox.

Also get a free ebook when you subscribe.

We will never share your address. Unsubscribe at any time.



  • Loldotdot

    Hehe.

  • Techngro

    Will this work with LibreOffice?

  • t

    In step 7 the “account” was not blackedout. js

  • Balcis

    You created a .bat file but at the outlook settings it looks as shutdown.EXE.

    • szunyi

      this article is fake

    • Mafioso

      when you click “start application” to select your bat file, just click/select “all” fles on the opened window and *.bat appears :)

      • Balcis

        I just wanted to point the difference, thank you.

  • szunyi

    Thunderbird rulz!

  • Mafioso

    -to restart local computer: in *.bat file you replace /s with /r
    -to hibernate local computer: in *.bat file you replace /s with /h
    -to logoff from local computer: in *.bat file you replace /s with /l

    Tip: Don’t forget to use different names for different rules to avoid a miss much.

    For a complete list of “shutdown” options open “cmd” and type: shutdown /?

    @Balcis: when you click “start application” to select your bat file, just click “all” fles on the opened window and *.bat appears :)

    • Maia421

      @vkomninos:disqus: Thanks for the tip, but the logoff one doesn’t seem to work. The email gets into my inbox, runs cmd and then deletes itself, nothing else happens. Any idea why? (I’m on windows 7 pro, using outlook 2013)

      • Mafioso

        I’ve no idea. It could be anything preventing so. On my system (Win7Pro/Office 2007 :( ) I tried it and it works fine.

  • Maia421

    This works perfectly BUT there’s a but… : What if one application is running on your computer is running that tends to prevent shutdown (i.e. Skype)? When you manually try to shutdown a computer with Skype running, you will find the computer telling you “one application is preventing shutdown *shows which application is preventing shutdown* do you want to:
    - force shutdown
    - cancel”

    You need a human hand to click on the force shutdown option or your computer will stay like this indefinitely. Is there a way to bypass this?
    Because if before I use remote shutdown I need to make sure I have quit Skype, I might as well remember to shutdown my computer…

    Thanks for your help!

    • Sandeep Agarwal

      You need to use -f to force shutdown.

      • Maia421

        @san_aggg:disqus: thanks a lot” Does it matter where I place the -f ?

  • dblginca

    That was really great, what’s the possibility that we can name the bat file to run in the message