The Enable-MDMTracecmdlet 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 -Local -Level <TraceLevel> -Components <TraceComponent[]> [-Guids <Guid[]>] [-IncludeStackTrace] [<CommonParameters>] Enable-MDMTrace -Server <ServerParameter[]> -Level <TraceLevel> -Components <TraceComponent[]> [-Guids <Guid[]>] [-IncludeStackTrace] [<CommonParameters>] Enable-MDMTrace -Global -Level <TraceLevel> -Components <TraceComponent[]> [-Guids <Guid[]>] [-IncludeStackTrace] [<CommonParameters>] |
Parameters
The following describes the Enable-MDMTracecmdlet 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 DeviceManagementor Enrollmentto enable tracing on all servers that have those server roles.
- Global
-
Specifies that tracing is to be performed on every Mobile Device Manager (MDM) 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 Mobile Device Manager (MDM) Shell prompt, type get-help about_commonparameters.
Input Type
None
Output Type
None
Examples
This Enable-MDMTracecommand example sets all components of all servers to log trace messages at and above the level, Error.
Copy Code | |
---|---|
C:\PS>Enable-MDMTrace -Global -Components Everything -Level Error |
This Enable-MDMTracecommand example sets the diagnostic service on every MDM Enrollment Server to log trace messages at and above the level, Debug.
Copy Code | |
---|---|
C:\PS>Enable-MDMTrace -Server Enrollment -Components Diagnostics -Level Debug |
This Enable-MDMTracecommand example enables trace logging of all messages, including stack traces, for the components OMAProxyEngineand Cmdletson the servers DM.VDomain.com and EN.VDomain.com.
Copy Code | |
---|---|
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 Mobile Device Manager (MDM) Shell prompt, type:
get-help Enable-MDMTrace -detailed, or get-help Enable-MDMTrace -full