This section describes the Enable-MDTMonitorService 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

Enable-MDTMonitorService [-EventPort] <Int32> [-DataPort] <Int32> [<CommonParameters>]

Description

This cmdlet enables the MDT monitoring service, which runs on the computer where MDT is installed. 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.

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 Enable-MDTMonitorService cmdlet.

-EventPort <Int32>

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

 

Parameter

Value

Required?

False

Position?

2 and Named

Default value

9800

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?

False

Position?

3 and Named

Default value

9801

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 String type object if the Verbose common parameter is included; otherwise, no output is generated.

Example 1

Enable-MDTMonitorService

 

Description

This example enables the MDT monitoring service on the local computer using the default value of 9800 for the event port and the value of 9801 for the data port on the MDT monitoring service.

Example 2

Enable-MDTMonitorService –EventPort 7000 –DataPort 7001

 

Description

This example enables the MDT monitoring service on the local computer using the value of 7000 for the event port and the value of 7001 for the data port on the MDT monitoring service.

Related Topics

MDT Windows PowerShell Cmdlets