Enable-MDMTrace

2/9/2009

The Enable-MDMTrace cmdlet enables Windows Software Trace Preprocessor (WPP) logging for one or more components.

Notice that trace logging is likely to affect the performance of the system, especially if you specify a high logging level.

Important

We recommend that you perform diagnostic tracing only in association with a Microsoft Customer Support Services (CSS) representative.

Syntax

Enable-MDMTrace -Global -Components <TraceComponent[]> [-Guids <Guid[]>] [-IncludeStackTrace] -Level <TraceLevel> [<CommonParameters>]

Enable-MDMTrace -Local -Components <TraceComponent[]> [-Guids <Guid[]>] [-IncludeStackTrace] -Level <TraceLevel> [<CommonParameters>]

Enable-MDMTrace -Server <ServerParameter[]> -Components <TraceComponent[]> [-Guids <Guid[]>] [-IncludeStackTrace] -Level <TraceLevel> [<CommonParameters>]

Parameters

The following describes the Enable-MDMTrace cmdlet parameters.

  • Local
    Specifies that the trace is to be performed only on the local system.
  • Server <ServerParameter[]>
    Specifies one or more servers on which the trace is to be performed. You can specify individual servers by name, or you can specify DeviceManagement or Enrollment to enable tracing on all servers that have those server roles. If the value contains a space or other special characters, enclose the string in quotation marks.
  • Global
    Specifies that tracing is to be performed on every Mobile Device Manager Device Management Server and MDM Enrollment Server.
  • Level <TraceLevel>
    Defines the level of trace messages logged. The server logs all messages at or above the specified level. Valid levels are Error, Warning, Informational, Debug, and Trace. When set to Trace, the server logs all messages.
  • Components <TraceComponent[]>
    Specifies one or more components for which trace logging is enabled. You can enter multiple components, separated by commas. If you specify the value Everything, the cmdlet enables trace logging for all components.
  • Guids <Guid[]>
    Specifies the GUID of a third-party trace provider for which you want to enable log message tracing. You can enter multiple values, separated by commas.
  • IncludeStackTrace
    Specifies that the server is to log stack traces associated with messages. By default, the server does not log stack traces.
  • CommonParameters
    This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, at the MDM Shell prompt, type get-help about_commonparameters.

Input Type

None

Output Type

None

Examples

This Enable-MDMTrace command example sets all components of all servers to log trace messages at and above the level, Error.

C:\PS>Enable-MDMTrace -Global -Components Everything -Level Error

This Enable-MDMTrace command example sets the diagnostic service on every MDM Enrollment Server to log trace messages at and above the level, Debug.

C:\PS>Enable-MDMTrace -Server Enrollment -Components Diagnostics -Level Debug

This Enable-MDMTrace command example enables trace logging of all messages, including stack traces, for the components OMAProxyEngine and Cmdlets on the servers DM.VDomain.com and EN.VDomain.com.

C:\PS>Enable-MDMTrace -Server DM.VDomain.com,EN.VDomain.com -Components OMAProxyEngine,Cmdlets -Level Trace -IncludeStackTrace

Cmdlet Help

To view this information online, at the MDM Shell prompt, type:

get-help Enable-MDMTrace -detailed, or get-help Enable-MDMTrace -full

See Also

Reference

Disable-MDMTrace
Get-MDMTrace