【发布时间】:2018-07-11 05:47:33
【问题描述】:
所以,有人会认为这很简单,但我已经处理了几天了。
基本上是这样的:
Parent.ps1
#calling the childrunbook
./childrunbook.ps1 -FirstName 'John'-LastName 'Snow'
$newGreeting = $greeting + 'John Snow'
Write-Output $newGreeting
Child.ps1
param(
[string]$Firstname,
[string]$Lastname
)
$greeting = 'Hello from the Child Runbook'
Write-Output $greeting
结果
#I was hoping to get
"Hello from the Child Runbook John Snow"
#But all I'm getting is:
"John Snow" :-(
我可以在 Powershell 中轻松完成此操作,但是一旦我将相同的代码放入 Azure 上的 Powershell Runbooks 中,就不行了。我认为这可能是单引号/双引号问题,但这并没有带来任何进展。有任何想法吗?
提前致谢!
【问题讨论】:
标签: powershell azure azure-automation runbook