Category filter

Script to send scheduled notifications to Windows device

Organizations manage a large workforce and numerous devices, which demands the need for seamless communication. Hence, sending notifications to devices is a timeless requirement. Such notifications can range from reminder messages for upcoming meetings, alerts regarding a suspected security breach to warnings about potential Wi-Fi outages. It would be convenient if IT administrators could just enter the content of the notification and push it to all devices simultaneously. Even better, they could schedule these notifications for a specific time in the future, eliminating any risks associated with time-sensitive messages. With Hexnode UEM, they can do so for Windows devices by running the script given below using the Execute Custom Script action.

Disclaimer:


The sample scripts provided below are adapted from third-party open-source sites.

PowerShell script to schedule notifications

Display notification as pop-up box

Display notification as toast message

In the scripts given above, replace Team meeting in an hour with the content of the notification and REMINDER with the required title. Replace QA with the username of the device and 2:25pm with the stipulated time to send the notification.

What happens at the device end?

On executing the script, the configured message will be displayed on the device at the scheduled time, provided the specified user is logged in.

Pop-up box notifications

scheduled notification displayed on device end as pop-up box

Toast notifications

scheduled message displayed on device end as toast message

  • Sample Script Repository