Enable-WebRequestTracing

Enables Request Tracing for the site specified.

Syntax

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

Description

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

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.

Optional Parameters

-CustomActions

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

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Directory

The directory in which Request Tracing log files are stored.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-MaxLogFileSize

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

Type:UInt32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-MaxLogFiles

The maximum number of log files to store.

Type:UInt32
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

The name of the site for which tracing is enabled.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-StatusCodes

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

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False