azure - Azure 资源管理器模板集 VM 时区
问题描述
我用过这个
"osProfile": {
"computerName": "[concat(parameters('vmNamePrefix'), copyIndex(1))]",
"adminUsername": "[parameters('vmAdminUsername')]",
"adminPassword": "[parameters('vmAdminPassword')]",
"windowsConfiguration": {
"timeZone": "GMT Standard Time"
}
}
尝试在部署新 VM 时设置时区,但我不断收到此部署错误:参数 windowsConfiguration.timeZone 的值无效。
根据https://docs.microsoft.com/en-ie/azure/templates/microsoft.compute/virtualmachines ,语法似乎是正确的,但看起来它不喜欢这个GMT Standard Time
位。
知道这里需要什么样的价值吗?
解决方案
您可以使用这个 powershell 表达式:
[System.TimeZoneInfo]::GetSystemTimeZones() | Select-Object -ExpandProperty Id
推荐阅读
- twig - HTML 代码在 OpenCart 运输方法标签中不起作用
- java - 尝试使用 @Value 从属性文件设置 @Scheduled 的 cron 属性,但出现编译时错误
- flutter - 如何在颤动的字符串中使用特殊的unicode字符?
- c++ - 在 Windows 中创建 OpenGL 上下文
- symfony - 在不同的频道中发送 symfony ChatMessage
- javascript - 在单箭头(自动返回)功能中添加控制台日志而不添加花括号
- ios - 如何删除一组 GMSMarker?
- powershell - 使用 $PSScriptRoot 从另一个脚本执行 powershell 脚本?
- c++ - 朋友模板专业化
- javascript - 节点 mongodb 将数据存储为字符串而不是对象