Enable-WebRequestTracing

Enable-WebRequestTracing

Enables Request Tracing for the site specified.

Syntax

Enable-WebRequestTracing [[-Name] <String>] [-Directory <String>] [-MaxLogFiles <UInt32>] [-MaxLogFileSize <UInt32>] [-CustomActions] [-StatusCodes <String>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

This cmdlet enables Request Tracing, and automatically configures a site rule that traces responses that have a status value between 400 and 600.

Parameters

-Name <String>

The name of the site for which tracing is enabled.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

1

-Directory <String>

The directory in which Request Tracing log files are stored.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-MaxLogFiles <UInt32>

The maximum number of log files to store.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-MaxLogFileSize <UInt32>

The maximum file size of a single Request Tracing log file.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-CustomActions <SwitchParameter>

Specifies an action taken when a Request Tracing log file is generated.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-StatusCodes <String>

Status codes for which a default Request Tracing rule is configured. The default code value is 500.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-WarningAction <ActionPreference>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-WarningVariable <String>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-CommonParameter

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About Common Parameter

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Input Type

.

Return Type

.

Notes

Examples

EXAMPLE 1: Enabling Request Tracing for the "Default Web Site"

IIS:\>Enable-WebRequestTracing -Name "Default Web Site"

Enables Request Tracing for the Default Web Site, which also automatically creates a rule that traces status code 500 errors.

See Also

Reference

Disable-WebRequestTracing