Does anyone know how to set environment variables on an application pool using the IIS Administration REST API?
https://learn.microsoft.com/en-us/iis-administration/api/application-pools
CodePudding user response:
Setting environment variables using the Web API isn't currently possible.
If anyone else is interested in this feature, i've created a branch containing a first draft. Maybe i will submit a PR after some testing.
You can then create an AppPool like this:
{
"name": "Demonstration App Pool",
"environment_variables": {
"CONNECTION_STRING": "some value"
}
}