简体   繁体   中英

Does desired state configuration support specifying custom log field names for IIS server logs

I have googled Desired State Configuration and checked the Microsoft site for information on specifying settings for IIS servers, specifically using DSC to make IIS servers STIG compliant. Unfortunately, I can't find many details specifically for IIS web server setting. Any recommendations or code examples would be greatly appreciated.

To set the Custom Logging Fields name in iis you could use the below PowerShell command:

New-ItemProperty 'IIS:\Sites\Default Web Site' -Name logfile.customFields.collection -Value @{logFieldName='testname';sourceType='RequestHeader';sourceName='c-ip'}

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM