![](/img/trans.png)
[英]Need Help on this: How to Generate Service Account Key from 2021 for any Essential Version chatbot on Dialogflow to be used in the Index.js
[英]Need help setting ARR Affinity and HTTP Version in Powershell
我正在尝试在调用 New-AzWebApp 后设置 HTTP 版本和 ARR 亲和力设置。 我已经尝试了很多变体,但似乎找不到任何关于这些列表的有效列表的文档。 例如,要设置堆栈,您必须使用“CURRENT_STACK”,但当我查看环境模板时,没有提及 current_stack 或堆栈。 我还确保我使用的是最新的 Az 模块。
这些是我根据 inte.net 上其他地方的调查结果开始的电话。 但是,调用此方法后,Stack 会更新,但 HTTP Version 或 ARR Affinity 都不会更新。
$PropertiesObject = @{
CURRENT_STACK = "dotnet"
http20Enabled = $true
clientAffinityEnabled = $false
}
New-AzResource -ResourceGroupName "JASON-SCRIPT-TEST"
-ResourceType "Microsoft.Web/sites/config"
-ResourceName "jason-script-test/metadata"
-PropertyObject $PropertiesObject
-Force
$AppService = Set-AzWebApp -ResourceGroupName "JASON-SCRIPT-TEST"
-AppServicePlan "JASON-SCRIPT-TEST-APPSVCPLN"
-Name "jason-script-test"
任何获得这些设置的帮助都将受到赞赏。 另外,如果有人知道我在哪里可以找到要在此处设置的有效值列表,那就太棒了。
所以在尝试了很多不同的东西,以及挖掘 PowerShell AZ 代码之后,这就是我最终通过 PowerShell 设置它的方式。
AppService = Get-AzWebApp -ResourceGroup $ResourceGroupName `
-Name $AppServiceName
$AppService.ClientAffinityEnabled = $false
$AppService.SiteConfig.Http20Enabled = $true
$AppService | Set-AzWebApp
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.