azure - 从 arm 模板向 DSC 传递凭证
解决方案
这对我有用。电源外壳:
Param(
[System.Management.Automation.PSCredential]$Admincreds,
xxx
)
xxx
手臂模板:
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.20",
"autoUpgradeMinorVersion": true,
"settings": {
"configuration": {
"url": "https://url.zip",
"script": "file.ps1",
"function": "configuration"
},
"configurationArguments": {
"param": "something"
}
},
"protectedSettings": {
"configurationArguments": {
"adminCreds": {
"userName": "actualusername",
"password": "actualpassword"
}
}
}
}
推荐阅读
- react-native - navigationOptions 中的弃用:headerLeft:
将在未来的版本中删除 - html - 如何不在隐藏的侧边栏中加载图像
- swift - MacOS 12 下的 SwiftUI 按钮角色
- r - 如何在 R 中更改 Netcdf 文件中的经度格式?
- javascript - 不关注点击日期选择器(第三次点击也应该打开它)
- c# - 将功能绑定到 QR 码或用作提交按钮 blazor
- amazon-web-services - 手动触发 50 多个 AWS 代码管道
- c# - 调用存储过程时如何测试 C# EF 核心 DbContext.Database.ExecuteSqlRaw()?
- android - 使用 Android Studio UI 组件创建通知
- oracle - 关于 AWS 性能问题的 ORDS