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 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
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.
Execute this command to import the 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
Then you can create your custom notification using the parameters
New-BTAppId -AppId "thewindowscollege.com" New-BurntToastNotification 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.
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") [reflection.assembly]::loadwithpartialname("System.Drawing") $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)
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!