MDT Monitoring: WPF Deployment notifications

In this post, I will show you a way to monitor your MDT deployment and display a GUI when a computer is installed or when an error occurs during the deployment.
In a previous post I have shown you how to monitor your deployment and display notification using the BurnToast module. 
This time I used another way using a PowerShell GUI with MahApps.
This way you can use this method on Windows 10 but also on Windows 7 computers.

In the example below I ran the notification script on the left computer. 
The right computer is being installed and once the deployment is completed the GUI appears on the left computer.

How to get the scripts ?


- MDT Monitoring enabled on the server
- MDT Monitor Service started on the server
This deployment notification can be used on any Windows 7 & Windows 10 computers.
There is no need to run it on the MDT server, you can run it on a client computer.

How to use it ?

1 / Run the Monitoring.ps1 file and type the computer name to monitor, as below:
Don't close the PowerShell windows, the script will analyze your deployments status. 
2 / Once deployment is finished you will get a notification as below.

Deployment Success Notification

Once a deployment is completed successfully on a computer, the below GUI will appear.
Deployment completed notification
In the example below the right computer, called computer2, is being deployed.
The Monitoring.ps1 script has been launched on the left computer. 
Deployment completed successfully on computer2 and the a GUI notification is displayed on the left computer.
As you may noticed the GUI notification appears few seconds before the Final success wizard on the right computer.

Deployment error Notification

If computer doesn't answer for the past four hours, the deployment status will be Unresponsive, see below the warning you will get.
Deployment Unresponsive Warning
See below, the corresponding information using the Get-mdtmonitordata cmdlet.
As you can see, the deploymentstatus is now set to 4.
Unresponsive DeploymentStatus
If another error occurs you will get the below warning
Deployment failed warning
As you may noticed the GUI appeared at 20:52 and using the Get-monitordata cmdlet, we can see that the Last time the computer has answered is 15:49. 
The deploymentStatus will have the value 4 have five hours without any answers.

How it works ?

First you will need to type your deployment share and MDT module paths in the Monitoring_Infos.xml file, as below

The MDT module path should be the path to the MicrosoftdeploymentToolkit.psd1 file. 
By default, this file is located in the folder C:\Program Files\Microsoft Deployment Toolkit\Bin
See below the main PS1 script, Monitoring.ps1

The script will analyze your deployment and will return a notification in a WPF GUI.
See below, the PS1 script that will display the GUI.

See below the XAML file used to display the notification 

Share this

Related Posts

Next Post »