After adding a runbook with parameters, I'm unable to start it, either in the Test Pane or as a Job after publishing.
[edit] I should probably add it doesn't matter if I have [CmdletBinding()]
specified or not. [/edit]
The runbook (script) in your screenshot contains a function definition (which takes parameters), but does not ever call the function. Your runbook does not take parameters, the function does. That is why the test pane is showing no parameters.
Try this:
param([string]$Bar)
function test-set {
param([string]$Bar)
"$Bar"
}
test-set -Bar $Bar