答案 0 :(得分:1)
这是对我有用的东西。 Powershell:
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"
}
}
}
}