Reputation: 1
I've used appcmd to set environment variables on one application pool, but now I need to set it on all but 2 application pools, on some servers that have dozens of application pools running.
The idea was to set it in all and then remove it from the couple I need to remove it from instead of running the command 40 or 50 times to set it one by one.
Is it possible to do this ?
Thank you
Upvotes: 0
Views: 706
Reputation: 5215
You can try to this command:
appcmd.exe set config -section:system.applicationHost/applicationPools /+"environmentVariables.[name='foo',value='bar']" /commit:apphost
More infor you can refer to this link:
https://stackoverflow.com/a/44688613/13336642.
Upvotes: 0