A friend and colleague of mine, Chris Townsend were talking over lunch recently, when he lamented that during a very long scripted process, he would have to manually check back in for status checks to see how this process was going, and might waste a whole weekend in front of the keyboard. We began trying to think of ways to get notifications if he needed to intervene and manually do something.
We talked about e-mails, but I think it wouldn’t work because of no open SMTP relay. Then we wondered about sending a text, and I was reminded of PushBullet. If you’ve never heard of it before, it is a very cool service you can install on your desktop, tablets, phones and even web browsers to recieve and send push notifications. Your friends can sign up under one single Push list and send each other notifications or cool links. You can also use it in your scripts, provided you’d like to dig into the SDK and setup your own framework with the API.
Introducing PowerBullet v 1.0
I present to you the (mostly) finished version of my implementation of PushBullet, which I call PowerBullet. It currently contains only one function, Send-PushMessage, which will send pushes to all of your devices. In v 2.0, you’ll be able to specify which device a message goes to. Currently, you can send the following types of messages:
- Send a Message/ Note (contains a title, and body text) – works
- Send an address (Will open in the default maps application) – works
- Send a file which pre-exists on the web – works
- Send a link (will open as a URL) – works
- Send a checklist*
- Upload and send a file*
There are currently issues with sending a Checklist and Uploading a file. Due to the more complex nature of these tasks, I plan to fully implement them in v2.0. For now, the code exists and the function will mostly work, but error out. If you spot the hole in my logic, let me know!
To start off, I need to give credit where credit is due: Continue reading