Spread the love

Do you want to create custom Toast notifications in Windows 10?

Most Windows 10 users are familiar with the new Toast notifications, they are replacing the old balloon notifications we used to have in Windows 7 and older versions of Windows.

These notifications are triggered by applications and can in fact be controlled in Windows Settings.

For example, once you receive an e-mail message or when the Antivirus detected a malware on your system or even when your system has downloaded some updates and wants to notify you that a restart is needed.

The Powershell Cmdlets to display custom Toast notifications are not available by default, we have to use a special module named BurntToast. Here is the official module web page.

The main goal of this tutorial is to guide you to create your own notifications, so later you can use this functionality in your scripts for more interaction with the user.

Create Custom Toast Notifications

Open Start and search for “powershell“, right-click on Windows PowerShell and choose “Run as administrator“.

Type in the following command to install the module BurntToast (confirm the installation by typing Y):

Install-Module BurntToast

If the module didn’t install correctly, run the following command in order to allow downloaded scripts that are signed to run on your powershell session.

Set-ExecutionPolicy RemoteSigned

Execute this command to import the module BurntToast:

Import-Module BurntToast

Now create a new AppId, we will use this to set our custom BurntToast notification later.

You can start a default BurntToast notification using the New-BurntToastNotification command.

Then you can create your custom notification using the parameters -AppId, AppLogo and -Text.

New-BTAppId -AppId "thewindowscollege.com"
New-BurntToastNotification -AppId "thewindowscollege.com" -AppLogo "E:\wc.png" -Text "thewindowscollege is here!" , "Damn it feels good to use this module :)"

Here is the result, scroll down to see more details and description of each element.

Here is an demonstration to help you know the use of each attribute in the code we ran earlier.

To display all the commands available by the module BurntToast, run the following command:

Get-Command -Module BurntToast

And finally, some of you may want to uninstall this module, well it’s easy!

First remove the module then uninstall it with the following command lines:

Remove-Module BurntToast -force
Uninstall-Module BurntToast -AllVersions -force

Display Notifications Without BurntToast

There is a workaround to show Toast notifications but with limited capabilities using the following code.

$notify = new-object system.windows.forms.notifyicon
$notify.icon = [System.Drawing.SystemIcons]::Information
$notify.visible = $true
$notify.showballoontip(10,"thewindowscollege.com","WAW! It works!!!",[system.windows.forms.tooltipicon]::None)

That’s it!

You have discovered how to create your own Toast notifications in Windows 10!

When you open the Action Center using the Windows+A keyboard combination you will see all your custom notifications there.

Share this tutorial with your friends, they will like it!