Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure automation powershell,不工作输入参数_Azure_Azure Powershell_Azure Automation - Fatal编程技术网

Azure automation powershell,不工作输入参数

Azure automation powershell,不工作输入参数,azure,azure-powershell,azure-automation,Azure,Azure Powershell,Azure Automation,我使用azure自动化, 并且有这样的代码 workflow Report { param ( [parameter(Mandatory=$True)] [string] $Name, [parameter(Mandatory=$true)] [Int] $MyCount ) inlinescript { Write-Verbose "Name $Name" W


我使用azure自动化,
并且有这样的代码

workflow Report
{
    param
    (
        [parameter(Mandatory=$True)]
        [string] $Name,

        [parameter(Mandatory=$true)]
        [Int] $MyCount
    )

    inlinescript
    {
       Write-Verbose "Name $Name"
       Write-Verbose "Count $MyCount"
    }
}
在测试窗格(on)中,我为该参数设置下一个值:“测试”和2
在控制台中,我看到下一个结果:

Name Test
Count
$Name工作正常
但是$MyCount没有显示

根据文档,我做的一切都是对的

如何使用int输入参数?

根据本文
inlinescript中,我没有访问主要变量的权限
对于get主变量,我需要使用$Using

Write-Verbose "Count $Using:MyCount"

我有一个类似的问题,我注意到我的runbook类型必须是“PoweShell Workflow runbook”下的其他


当我选择just PowerShell时,我的任何参数都不会出现在我的测试窗格中

,但既然$Name和$MyCount都是参数,为什么您可以访问$Name?