PowerShell tool: MDT Light Monitor

In this post I will show you a tool I created to monitor your Deployment Share.  You will be able to see running, completed and failed deployment. You will be also able to be notified when a deployment is completed or not by a GUI and by mail.
Why this Tool ? I created this tool to show you a new way to use the MDT Light method.
This tool can be used for instance to monitor your deployment.

Great links

- Monitoring deployment with MDT 2013 (Tzouvaras Costantinos)
- Configuring MDT monitoring (Johan Ardwimark)
- Dumping MDT monitor data to a webpage (Mikael Nystrom)
- MDT monitoring dashboard using PowerBI Part 1 (David Sebban)

In the below example I used the tool to display deployment, and be notified when the selected deployment is successfully completed or not by mail and with a WPF GUI. 
As the computer has already been installed and status is on completed, the notificatyion will be immediatly displayed.


How to get the tool ?



Prerequisites

- MDT Monitoring enabled on your server
- MDT Monitor service started on the server
- Complete the Monitoring_Infos.xml


Monitoring_infos.ml

The XML file contains the below informations:
- Your Deployment share path
- Path to the MicrosoftDeploymentToolkit.psd1 file
- SMTP server (for mail notification)
- Mail sender address (for mail notification)
- Mail recipient address (for mail notification)

This file has to be located on c:

See below an example of this xml file:


How to use the tool ?

1 / Complete the Monitoring_infos.xml file
1 / Run the MDT Light Monitor.exe

The GUI will be launched and all computers will be displayed.
Light monitor main GUI

Understanding Datagrid

The main GUI below, will show you all running, installed computers and also these one on which some errors occured.
Main Datagrid
The GUI will show you the informations below about your deployment:
  • Computer name
  • Deployment status: Running, failed, completed ...
  • Percent: Percentage of the deployment process
  • Step name: describe the deployment step
For instance the line below, shows a running deployment.
Running deployment


Understanding Actions part

The Actions part below, is composed of 3 buttons.
Actions part
Note: To use the three buttons below, you have to select first an entry in the datagrid.

The first button, refresh, allows you to refresh the Datagrid. 
The second button allows you to display properties of a specific computer, as below.
Properties part
The third button allows you to remove an entry of the monitor datagrid and also of the monitordata from MDT.


Understanding Properties part

The Deployment details part, shows computer name, deployment status, how many errors and warnings occured during the deployment. In the case below, we can see 7 errors during the deployment.
Deployment details
The deployment progress part, shows you the progression of your deployment.
Deployment progress
The More options button will display some settings in a FlyoutControl, as below
Properties - More options
The View logs part allows you to connect to the folder on the concerning computer.
Type a user name and password that can access to the computer and click on the View logs button.
It will open the logs folder in a new explorer window.
If the connection fails the below GUI will be displayed.

The Remote connection part allows you to connect remotly on the computer using mstsc.exe
Click on the Connect button and the mstsc.exe windows will be displayed.

The Deployment Status notification area part allows you to be notified when the deployment is completed successfully on the computer or when an error occurs.
Check Display a message, to be notified with a GUI, when the computer is successfully installed.
Check the Send a mail to be notified by mail when the computer is installed or when an error occurs.
Once you have checked an option the below GUI will be displayed to resume your choice.
Notification area GUI
To run the monitoring analyze click on the Run button.
Then a PowerShell window is launched.
Monitoring Analyze script
This window will analyze your deployment using the Get-MonitorData cmdlet.
Do not close this window until the notification appears. 

You can close the other GUI, as below.
How to let the Analyze script working
If the deployment is completed successfully you will get the below notification if you have checked option Display a message.
Deployment completed successfully - GUI notification
If you have checked Send a mail, you will receive a mail as below
Deployment success - Mail notification
If the deployment failed, for instance with unresponsive status, you will get the below notification.
Deployment Unresponsive - GUI notification
If you have checked Send a mail, you will receive a mail as below.
Deployment Unresponsive - Mail notification



Tool in action


What's next ?

I will provide you soon a version that allows you tu use the monitor tool without MDT or ADK installed on your computer.

Share this

Related Posts

Previous
Next Post »