Configuring IIS logging
By default, IIS logs nearly every transaction clients perform against the server. This is a great repository of information when debugging issues or when trying to profile your users and identify which resources are popular, which are not popular, and which are generating errors.
This recipe will cover how to configure IIS logging.
How to do it...
Carry out the following steps to configure IIS logging:
Change the IIS logging directory:
Set-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.directory -Value 'C:\Logs\IIS'
Change the logging type:
Set-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.logFormat 'W3C'
Change logging frequency:
Set-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.period -Value Weekly
Change logging to use a maximum size:
Set-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.period -Value MaxSize Set-ItemProperty 'IIS:\Sites\Default Web Site' -Name logFile.truncateSize 9000000
Disable logging:
Set-ItemProperty 'IIS:\Sites...