Skip to content

PSPushover

GitHub Actions Test Workflow Status GitHub Actions Docs Workflow Status GitHub Actions Publish Workflow Status PowerShell Gallery Version PowerShell Gallery Downloads GitHub License Built with Material for MkDocs

The PSPushover PowerShell module makes it a breeze to send push notifications to any device using the Pushover service from PowerShell on Windows, Linux, and MacOS. You can send push notifications to Android, iOS, and desktop devices.

Each notification is associated with an "application", and can be sent to an individual user, or to a group of users. Get notified...

  • when backups fail
  • when cron jobs run
  • when servers restart
  • when your GitHub Actions / Azure DevOps / Jenkins / GitLab pipelines fail
  • when someone star's your GitHub repo
  • whenever and for whatever you want!

Try it out

Screenshot of Pushover notification on iOS

When this GitHub repository receives a new star, it triggers a GitHub Action workflow which uses PSPushover to send a notification to anyone who subscribes using the link below.

Subscribe to Star Notifications

Pushover will generate a random user token for you and add it to a distribution group. You can unsubscribe from your Pushover dashboard at any time, and your real user token is never exposed. So go ahead and try it out! If you already had the repo starred before subscribing, you can unstar and star it again as many times as you like.

Getting started

All Pushover notifications are sent from an application to a user or group. To send your first push notification, you need an application token and a user key. To receive notifications, you need the Pushover app installed on a mobile device, or at least have the website open with notifications enabled in a compatible browser.

Create an application

Notifications need to come from something, and with Pushover, that something is an "application". The application can be named anything you like. Naming things is hard though, so if you can't decide on a name, use "PSPushover".

  1. Register and/or login at pushover.net.
  2. Take note of your user key. It looks like ygzttgcfpab5wyrtstnxlrqllpr0et.
  3. Under Your Applications, click Create an Application/API Token, fill out the required fields, and take note of the api key.

Install PSPushover

Install-Module joshooaj.PSPushover -Scope CurrentUser -Repository PSGallery

Set default tokens

You can choose to enter your app and user tokens each time you call Send-Pushover, but you can also save them securely using Set-PushoverConfig and then they'll become the default values when no alternate tokens are provided.

$appToken = Read-Host -Prompt 'Application token' -AsSecureString
$usrToken = Read-Host -Prompt 'User token' -AsSecureString
Set-PushoverConfig -Token $appToken -User $usrToken

Send a message

It's time to send your first push notification!

Send-Pushover -Message 'Hello from PSPushover!'