2

I can run this command to add a custom log:

.\appcmd.exe set config -section:system.applicationHost/sites /+"[name='MyWebSite'].logFile.customFields.[logFieldName='OriginalIP',sourceName='X-FORWARDED-FOR',sourceType='RequestHeader']" /commit:apphost

What command to I use to see if that config has already been set? There is no appcmd.exe get config -section...

red888
  • 27,709
  • 55
  • 204
  • 392

1 Answers1

3

Try something like

appcmd.exe list config -section:system.applicationHost/sites /text:*

Depending on what you want to check for, you will have to parse the output.

For more information, run

appcmd.exe /? config
Florian Winter
  • 4,750
  • 1
  • 44
  • 69