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.
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 ?
PreRequisites
- 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 :
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.
See below, the corresponding information using the Get-mdtmonitordata cmdlet.
As you can see, the deployment status is now set to 4.
If another error occurs you will get the below 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 :
Source : D. Van Robaeys, www.systanddeploy.com