[英]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...
没有appcmd.exe get config -section...
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.