red888
red888

Reputation: 31560

appcmd to check a config exists?

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...

Upvotes: 2

Views: 6174

Answers (1)

Florian Winter
Florian Winter

Reputation: 5279

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

Upvotes: 3

Related Questions