This section describes the Test-MDTMonitorData Windows PowerShell cmdlet. Run this cmdlet from a Windows PowerShell console that has the MDT PowerShell snap-in loaded. For more information on how to start a Windows PowerShell console that has the MDT PowerShell snap-in loaded, see Loading the MDT Windows PowerShell Snap-In.

Syntax

Test-MDTMonitorData -ServerName <String> -EventPort <Int32> -DataPort <Int32> [<CommonParameters>]

Description

This cmdlet validates if the MDT monitoring service, which runs on the computer on which MDT is installed, is enabled and running properly. The MDT monitoring service collects monitoring information that can be displayed:

·     In the Monitoring node in a deployment share in the Deployment Workbench

·     Using the Get-MDTMonitorData cmdlet

The MDT monitoring service can be disabled using the Disable-MDTMonitorService. Monitoring information can be written to the MDT monitoring service using the Set-MDTMonitorData cmdlet.

Note   For this cmdlet to function properly there must be at least one MDT monitoring data item in the deployment share. If no MDT monitoring information has been recorded, the deployment share will fail the test.

For more information on the MDT monitoring service, see the section Monitoring MDT Deployments in the MDT document, Using the Microsoft Deployment Toolkit.

Parameters

This subsection provides information about the various parameters that can be used with the Test-MDTMonitorData cmdlet.

-Server <String>

Specifies the name of the computer on which MDT is installed and the MDT monitoring service is running.

 

Parameter

Value

Required?

True

Position?

Named

Default value

None

Accept pipeline input?

False

Accept wildcard characters?

False

 

-DataPort <Int32>

This parameter specifies the TCP port used as the data port for the MDT monitoring service.

 

Parameter

Value

Required?

True

Position?

Named

Default value

Accept pipeline input?

False

Accept wildcard characters?

False

 

-EventPort <Int32>

This parameter specifies the TCP port used as the event port for the MDT monitoring service.

 

Parameter

Value

Required?

True

Position?

Named

Default value

Accept pipeline input?        

False

Accept wildcard characters?

False

 

<CommonParameters>

This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see the topic, “about_CommonParameters,” which you can access by typing the following command, and then pressing ENTER:

Get-Help about_CommonParameters

Outputs

This cmdlet outputs a Boolean value that represents the success (true) or failure (false) of the text.

Example 1

Test-MDTMonitorData -Server "WDG-MDT-01" -DataPort "9801" ‑EventPort "9800"

Description

This example verifies if the MDT monitoring service on WDG-MDT-01 is installed and running. The cmdlet will verify using a data port of 9801 and an event port of 9800.

Related Topics

MDT Windows PowerShell Cmdlets