[英]PowerShell sript to set IIS environment variable
How can I automate the following steps by using PowerShell? 如何使用PowerShell自动执行以下步骤? : :
Thanks to Lex Li, Seems like Configuration Editor generates scripts automatically before savings. 感谢Lex Li,好像Configuration Editor这样的文件在保存之前会自动生成脚本。 This has lead me to getting the final PS script to be: 这使我获得了最终的PS脚本:
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST/WEBSITENAME' -filter "system.webServer/aspNetCore/environmentVariables" -name "." -value @{name='EnvironmentVariableName';value='EnvironmentVariableValue'}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.