Azure 资源管理器模板 设置 VM 时区



我用过这个

"osProfile": {
"computerName": "[concat(parameters('vmNamePrefix'), copyIndex(1))]",
"adminUsername": "[parameters('vmAdminUsername')]",
"adminPassword": "[parameters('vmAdminPassword')]",
"windowsConfiguration": {
"timeZone": "GMT Standard Time"
}
}

尝试在部署新 VM 时设置时区,但我不断收到此部署错误:参数 windowsConfiguration.timeZone 的值无效。

语法似乎是正确的 https://learn.microsoft.com/en-ie/azure/templates/microsoft.compute/virtualmachines 但看起来它不喜欢GMT Standard Time位。

知道这里需要什么样的价值吗?

您可以使用此 powershell 表达式:

[System.TimeZoneInfo]::GetSystemTimeZones() | Select-Object -ExpandProperty Id

最新更新