【发布时间】:2018-11-27 11:59:32
【问题描述】:
我想,我阅读了所有相关的帖子,仍然无法完成这项工作。
我有一个 Azure Runbook,需要将 HashTable 参数传递给预配脚本。稍后由Apply-PnPTemplate 函数使用。
在脚本中声明的参数为
[System.Collections.Hashtable] $Parameters = @{}
但我也试过
[Object] $Parameters = @{}
我尝试测试我的脚本,添加 @{"customercode"="TEST"} 作为参数,但我收到以下错误消息:
Cannot convert the "@{"customercode"="TEST"}" value of type "System.String" to type "System.Collections.Hashtable".
我尝试过:传递和不传递@,将分隔符更改为;;(我也需要在PowerApps 中使用它)和,,它们都没有帮助。请告知,将此对象传递给脚本的正确方法是什么。
【问题讨论】:
标签: azure-powershell azure-automation