Send push notifications to mobile devices and desktops from PowerShell using the Pushover service!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
If you want to send push notifications to one or more mobile or desktop devices from PowerShell, that's exactly what this module is about. The module makes use of the Pushover.net notification service which is free for up to 10k notifications per month!
The goal of the module is to support as much of the Pushover API as possible. To start with, the messages endpoint is be supported using the Send-Pushover function, and the most common features including message priority, retry interval, expiration, and attachment capabilities are available.
Later, support will be added for additional features like checking receipt status, listing and specifying notification sounds, and other API areas like subscriptions, groups, licensing, etc.
Before you use Poshover and the Pushover API, you need a Pushover account and an application token.
To use this module, you must have an account on Pushover.net and your own application/api token.
- Create a Pushover.net account
- Create an Application and save your token
- Create a delivery group or acquire one or more user ID's to which notifications should be sent
To clone and develop the module, you should have a handful of PowerShell modules already installed on your development system.
- psake for build
- Pester for testing
- PSScriptAnalyzer for linting
Launch an elevated PowerShell session and run the following:
Install-Module -Name Poshover -AllowPrerelease
If that failed, you may need to update your PowerShellGet package provider. Try this:
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
Install-PackageProvider -Name NuGet -Force
Install-Module -Name PowerShellGet -Force
Install-Module -Name Poshover -AllowPrerelease
Send-Pushover -Token $apikey -User $deliverygroup -Message 'Have a nice day!'
The structure of the PowerShell module is such that the .\src\ directory contains the module manifest, .psm1 file, and all other functions/classes/tests necessary. The "build" process takes the content of the .\src\ directory, copies it to .\output\Poshover\version, and updates the module manifest to ensure all classes and functions are exported properly.
To build, simply run Invoke-psake build
from the root of the project. And to test, run Invoke-psake test
.
I like to also setup VSCode to launch .\debug.ps1 when I press F5. This will clear the .\output\ directory and call the psake build task, then force-import the updated module from the .\output\ directory. I find this makes the developer "inner-loop" really quick.
Also, I recommend using the Microsoft.Powershell.SecretManagement module for storing your api keys. That way you never enter them in clear text.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Josh Hendricks - @joshooaj
Project Link: https://github.com/jhendricks123/Poshover