This post is going to cover how to use Powershell to send push notifications to your smartphone using Powershell.
I recently discovered a web service called Notify17. It’s a really nifty little service which allows you to easily send push notifications to iOS/Andriod and Browsers.
It really is very easy to use. I started using it on Unix but I wanted the same functionality in one of my PowerShell Scripts. It couldn’t be easier:
$notifyParams = @{title="PowerShell Alert";content="Script has completed!"} Invoke-WebRequest -Uri https://hook.notify17.net/api/raw/RAW_API_KEY -Method POST -Body $notifyParams
Most of the supplied examples use curl, which Windows does not have, but Invoke-WebRequest works perfectly.
This simple bit of code immediately generates a notification on my phone and my computer:
There are so many cool ways to use this, for example:
- Backup Failures
- Hardware Errors
- Website Down Notifications
- Notifications from Sensors etc
- Call it from Zapier to generate an alert
What I like really like about this service:
- So easy to use!
- E-Mails often get missed and it’s really useful to be able to get an alert for the really important stuff.
I modified my own Dell Hardware Alert script and tested it with Notify17 and it worked great, much better than getting an email which you might not see for a while.
Thanks to Alberto Marchetti for building Notify17.
mika hak says
Hi, thank you, i found them thanks to your article, they are closing their service, do you have any alternative to send push notification to iphone through the powershell? thanks.