The policy setting that controls Toast Notifications is
particularly difficult to undo. It is controlled by the
Local Group Policy Editor at
User Configuration > Administrative Templates >
Start Menu and Taskbar > Notifications, policy
"Turn off toast notifications".
It modifies various registry entries, but also several files,
one of whom is in binary format, so not user-modifiable.
This is why a Microsoft utility is required for setting it.
I will give below two commands for enabling and disabling
Toast Notifications.
You may put them in two .bat files and assign them hotekeys,
or alternatively use
AutoHotkey.
Prerequisite
Download the LGPO utility, the Local Group Policy Object Utility,
from
Microsoft Security Compliance Toolkit 1.0.
When pressing the Download button, select "LGPO.zip" and click
Next to download it.
Unzip the archive to obtain this utility in LGPO.exe.
Input files
Create two text files as follows (you may use your own file-names):
1. disable_toast_notifications.txt
User
SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
NoToastApplicationNotification
DWORD:1
2. enable_toast_notifications.txt
User
SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications
NoToastApplicationNotification
DWORD:0
Disable Toast Notifications
Use the following command in Run as Administrator mode:
\path\LGPO.exe /t \path\disable_toast_notifications.txt
Enable Toast Notifications
Use the following command in Run as Administrator mode:
\path\LGPO.exe /t \path\enable_toast_notifications.txt
For more information see the article
How to use LGPO.exe to modify lgpo settings (with lgpo examples).