Wednesday, March 27, 2013

Get notified when your computer reboots using Pushover

Pushover is a platform for sending and receiving push notifications to mobile devices (Android and iOS). Pushover is free, but requires the installation of a paid app on your Android or iOS device. After you set up your account on Pushover you get a user token that is used to identify you as the sender of a notification.
To send notifications, create a new application on the Pushover site. Give it a name, select type and upload an icon. After the application is registered you get an application token that identifies your application.

OK, so I wanted a notification sent to my phone whenever my computer restarted. Since it's a Windows 8 computer I decided to go for PowerShell 3.0 and created the following script:
$uri = ""
$parameters = @{
  token = "<app token>"
  user = "<user token>"
  title = "Reboot"
  message = "Your computer just rebooted"
$parameters | Invoke-RestMethod -Uri $uri -Method Post
Nothing special about the script, basically it's a slight modification of an example script found on the Pushover FAQ. Just replace <app token> and <user token> with your own tokens.

Next, I need to have the script run when the computer starts, and run before anyone logs on. That's the point, right, if I'm at the computer I don't need a notification telling me the computer restarted.
Run the Local Group Policy Editor (gpedit.msc) tool as administrator and drill down to Local Computer Policy -> Computer Configuration -> Windows Settings -> Scripts and open Startup.

Go to the PowerShell Scripts tab and click Add. Click Browse next to Script Name and locate your script. Click OK, OK and then close the policy editor.

All done!


  1. This is one of the most important blogs that I have seen, keep it up!

  2. When you rent a computer you don't have to worry about the pesky finance charges that so often come attached to computer credit accounts. All the costs are in your monthly rental fee.
    navigate to this web-site

  3. Its an incredible joy perusing your post.Its brimming with data I am searching for and I want to post a remark that "The substance of your post is magnificent" Great work.  Visit website

  4. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work Ad spy

  5. Particular interviews furnish firsthand message on mart size, industry trends, ontogeny trends, capitalist landscape and outlook, etc. visita il sito

  6. Much appreciated such a great amount for this data. I need to tell you I agree on a few of the focuses you make here and others might require some further survey, however I can see your perspective. besuche die Website

  7. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it

  8. This is exactly what I'm seeking. BUT I cannot get it to Run in PowerShell 2.0 (Win764Bit PC.)
    Error below: The term 'Invoke-RestMethod' is not recognized as the na
    ck the spelling of the name, or if a path was included,
    At C:\Users\GServer\Documents\Scripts\PushReboot.ps1:8 c
    + $parameters | Invoke-RestMethod <<<< -uri $uri -Metho
    + CategoryInfo : ObjectNotFound: (Invoke-Re
    + FullyQualifiedErrorId : CommandNotFoundException

    Can anyone please help to get this working in Powershell 2 - I've even tried upgrading to Powershell 3, but that just hangs at Initialising Install.

  9. More established Motherboards correspondence was what might be compared to a two way two path road with a speed limit of 25 MPH. Today the new Motherboards resemble 8 path parkways with 200MPH speed limits. wipe hard drive Techpally