BurntToast Logo Banner

In this guide, I will explain to create and display a notification using PowerShell. To perform this task, I will use PowerShell and especially, the BurntToast module which is a custom module available on GitHub. You can download the module or use the PowerShell Gallery to install on your machine: https://github.com/Windos/BurntToast. The PowerShell Module works on Windows 10 and Windows Server 2019. At the time of writing, the latest version on PS Gallery is 0.8.5.

Notifications can be useful to display important information on your machine or to display information remotely on user workstations for example. In this guide, I will describe how to install this custom module, and then how to create your own notification locally.

First, run the following command to install the module for the PowerShell Gallery:

Do not forget to run your console as administrator before running the previous command.

Once the module is installed, you can run the “Get-Command” cmdlet to understand how to use the module. I will not cover all the cmdlet, but as you can see, it is easy to create a very complete notification.

Get-Command

The module is installed, then we can run the following cmdlet without additional arguments:

This basic cmdlet will create our first notification on the machine!

Create our first notification

Of course, as you can imagine, it is possible and very simple to customize the notification. We can customize the notification to adjust the logo, the text, add buttons, ….

Using the following command, I can easily add a logo with the “AppLogo” argument:

AppLogo

Now, I just add the “Text” argument to add:

  • The notification title
  • The notification description

It is very easy to understand, the first argument matches the title, and you can add two arguments to display a description in your notification. Two lines are the maximum allowed by the module.

Display a description in your notification

Depending on the notification content, you can also adjust the logo, in this example, I added a critical logo to notify users:

Add a critical logo to notify users

Now, we will add the ‘hero image’ which is the image on top of the notification. The following command creates a new Image element for Toast Notifications:

New Image element for Toast Notifications

This feature is very cool, you can add the company logo if you want to display notification on user’s workstations.

StarWind Backup Appliance (BA) is an industry-first all-NVMe backup appliance that provides unprecedented levels of backup and recovery speed. It comes as a tiny, pre-configured, ready-to-backup solution that eliminates the backup server storage bottleneck and fits even the strictest RTPO. Consisting of the best commodity hardware, your chosen hypervisor, and a StarWind SDS engine backed by 24/7/365 ProActive Support, StarWind BA ushers in a new age of a future-proof, eco-friendly, transparent, and reasonably priced backup infrastructure. Explore Backup Appliance from StarWind StarWind Backup Appliance Datasheet

To finish this guide, we can add buttons on this notification. Thanks to these buttons, users can perform basic tasks. The following command lines will add two buttons on the notification:

Perform basic tasks

Of course, the module lets you perform other customizations to suit your needs, such as:

Adding sounds

Adding alarm clock

Views All Time
1
Views Today
24
Back to blog
The following two tabs change content below.
Nicolas Prigent
Nicolas Prigent
Nicolas Prigent works as an IT Production Manager, based in Paris, with a primary focus on Microsoft technologies. Nicolas is a three-time Microsoft MVP in Cloud and Datacenter Management with 10 years experience in administering Windows products. He also received the "PowerShell Heroes 2016" Award.