How can I send notification messages using PowerShell in Microsoft Intune


Occasionally you want to inform users about something, such as the need to update or install software, and the easiest way to do that is with some sort of a popup notification. The ability to do that in Microsoft Intune is not currently available in the product although it is a Uservoice item in progress. In the meantime however, if you need to send a notification to users of Windows devices in Microsoft Intune, it’s possible using PowerShell and here’s how to do it.

The idea here is that you can customize the PowerShell script to deliver the message you want (and if necessary take possible actions, however you need to add your custom code to the script and it must not exceed 200KB). the screenshots below are taken on a Windows 10 version 1709 device enrolled into Intune, the device is logged on as a user with normal permissions (not an Administrator) and this was configured with Windows AutoPilot.

Step 1. Download the script

Download the DisplayMessageInIntune.ps1 script.

Step 2. Edit the script in ISE

Launch PowerShell ISE and open the extracted downloaded script. Scroll down to the following values. The values are currently set as PowerShell Parameters with the hope that the current functionality in Microsoft Intune will support Params with PowerShell scripts in the future (I’ve requested this ability as a DCR to Microsoft directly). If this ability does come to Intune then I will blog an update to this post explaining how to make it dynamic.


When you’ve changed the message title and message body, you might also want to change the Type and Option available to the user, below are the values you can configure.

$Option can be any of the following values


$Type can be any of the following values

“Warning ”

Finally after line 69 you can add any additional code you want, for example to check what key was pressed etc.


read more @ here

This entry was posted in Intune, PowerShell scripts. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.