3

Is it possible to configure the logging behaviour of IIS centrally, ideally at a domain level? Specifically I'm looking at the Log File Rollover settings.

Having done some research I haven't been able to find anything obvious tied to either Active Directory or some other automated way of centrally managing this aspect of IIS configuration - though that may be down to not picking the appropriate search terms.

I'm open to Group Policy, or any other robust method that doesn't require manual intervention on each and every machine to which the configuration needs to be applied.

1 Answer 1

3
+100

These settings are stored in the <logFile> element of the <siteDefaults> element in %SystemRoot%\System32\InetSrv\config\applicationHost.config.

I'm not aware of any "stock" functionality in Group Policy that allows for management of these settings. The Microsoft.Web.Administration API is a managed-code API that you could call from PowerShell to script changes to the file. You could also look at using AppCmd.exe to script something using old-school batch files, too.

The command below, for example, sets the server-wide default setting for log file rollover time to use local time:

appcmd.exe set config -section:system.applicationHost/sites /siteDefaults.logFile.localTimeRollover:true /commit:apphost

Running a script to make modifications to the applicationHost.config file as a Group Policy Startup Script seems like a reasonable option to me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .