MDT Monitoring: Deployment Notification scripts

Last week, I wrote a post about the nice BurntToast module that allows you to display Windows 10 notifications. Now let's use it to monitor our MDT deployment and display notification when deployment is completed, or warning for error ...
First let us see how to use the monitoring data part using MDT, I won't explain how to configure the monitoring part but just how to use it with PowerShell for our examples.

See below, some nice links,  how to configure the monitoring part
- Monitoring deployment (Tzouvaras Kostas
- Monitoring in French (Yannick Plavonil)

The deployment notification can be used on any Windows 10 computers, no need tu run it on the MDT Server  The only pre-requisite is that Monitoring has to be enable on the MDT server. 

I will publish soon a tool, using Mahapps and PowerShell, that I created to monitor Deployment with or without MDT installed, display deployment progress and other properties, configure progress notification ...

In the example below, I ran the notification script on the left computer. 
Note: MDT server is not installed on that computer,  you can consider it as a client.
Thre right computer is being installed using MDT.

Monitoring with PowerShell

See below the PowerShell cmdlet, to use the Monitoring data part from MDT 

This cmdlet will list all deployment as below:
Get-MDTMonitordata values
For our next example we will use the following propertie:
- Percentcomplete
- StepName
- DeploymentStatus

Percent complete indicates the deployment progression percentage.
StepName indicates the current step of your Deployment, for instance below.
Install Operating System Step name
DeploymentStatus indicates the status of your deployment
running: the Task Sequence is healthy and running
failed: the TS failed, and deployment process unsuccessful
completed: the TS has finished 
unresponsive: computer dosn't answer since the past 4 hours

We will use the below variables in our scripts

Deployment completed warning

In the example below, we will see how to display a notification on your computer when a specific ciomputer has been successfully installed.
See below the warning in action
Deployment completed warning
See below the PS1 script used for this warning

Deployment progress notification

In the example below, we will see how to display a notifications when a specific computer is being installed and show its progression with percentage and step name.
At each step of the deployment, for instance Format and Partition, Inject drivers, Install OS, a notification will be displayed.

See below the PS1 scripts used for this warning

See below the warning in action
Deployment Progress notification

Deployment error warning

In the example below we will see how to display a notification when an error occurs during the deployment of a specific computer. Error are catched using the DeploymentStatus parameter. 

See below the PS1 scripts used for this warning

See below the warning in action
Deployment Unresponsive warning

Deployment main steps warning

In the example below, we will see how to display a notification for the main deployment steps.
By main step, I mean some specific steps. In my example I will focus on the steps below:
- Format and Partition Disk (UEFI)
- Inject Drivers
- Install Operating System
- Install Applications
Steps to notify 
Of course you can choose your own steps by choosing yours in your Task Sequence. 

See below the PS1 script used for this example

See below the notification in action

How to get the scripts ?

You can download these samples scripts on Technet, below button.

In these scripts I create a function that requires some parameters
- Computer name
- DeploymentShare path
- Module path
Required parameters
You can of course ask just one parameter, computer name and store all others in an XML file, as these parameters will be mostly common. 
See below the XML that can be used 

See below the beginning PS1 functions that can be used

What's next ?

So far we have seen how to display a notification and warning when a deployment is completed on a specific computer and when error occurs.
Why not using this part to check multiple computers deployment ?
In my next post I will show that.

Share this

Related Posts

Next Post »

2 commentaires

21 février 2017 à 21:30 delete


I have a little question... Which computer received the notification ? The MDT server ? It's possible to display this notification to a remote workstation to monit the deployment ?

Thanks for your answer and this excellent article !


21 février 2017 à 23:16 delete


Thanks for your comment.
you can use it on the server but in my case i run it on another computer. This computer should have Windows 10 installed to run the module. MDT is not needed on that computer you can load a light module of mdt i created in a previous post.
To resume, this notification can be used on the computer you want with w10. If mdt isn't installed you have to specify the mdt module path, it should be the path to the microsoft deployment toolkit.psd1 file. Specify also the deploymentshare to monitor. I will soon publish a new version that will display the notification in a powershell gui. This way Windows 10 won't be required. Don't hesitate if you have more questions 😊