Laser powershell automation, int input parameter not working


I am using azure automation,
and have such a code

workflow Report { param ( [parameter(Mandatory=$True)] [string] $Name, [parameter(Mandatory=$true)] [Int] $MyCount ) inlinescript { Write-Verbose "Name $Name" Write-Verbose "Count $MyCount" } } 

in the test panel (at https://portal.azure.com ) I set the following value for these parameters: "Test" and 2
In the console, I see the following result:

 Name Test Count 

$ Name working good
but $ mycount didn't show

According to the documentation, I am doing everything right
https://technet.microsoft.com/en-us/library/hh847743.aspx

How can I use int input parameter?

+6
source share
2 answers

according to this post https://technet.microsoft.com/en-us/library/jj574197.aspx
in inlinescript I do not have access to the main variables
to get the main variable i need to use $

 Write-Verbose "Count $Using:MyCount" 
+1
source

I had a similar problem, I noticed that my workbook type should be PoweShell “Runbook Runflow” in the “Other” section.

When I selected only PowerShell, none of my options would appear on my test panel

0
source

All Articles