Create Pull Request
| Date | Scan | Status | Result |
|---|---|---|---|
| 2025-07-12 23:44 | #41 | cancelled |
Biased
|
| 2025-07-12 00:58 | #8 | cancelled |
Clean
|
| 2025-07-10 05:06 | #7 | processing |
Clean
|
| 2025-07-09 23:22 | #6 | cancelled |
Clean
|
Workflow Test-Parameters
{
param (
[Parameter(Mandatory=$true)][object]$user
)
$userObject = $user | ConvertFrom-JSON
if ($userObject.Show) {
foreach ($i in 1..$userObject.RepeatCount) {
$userObject.FirstName
$userObject.LastName
}
}
}
Workflow Test-Parameters
{
param (
[Parameter(Mandatory=$true)][array]$user
)
if ($user[3]) {
foreach ($i in 1..$user[2]) {
$ user[0]
$ user[1]
}
}
}
Workflow Test-Parameters
{
param (
[Parameter(Mandatory=$true)][PSCredential]$credential
)
$credential.UserName
}
`Start-AzAutomationRunbook` returns a job object that you can use to track status once the runbook is started. You can then use this job object with [Get-AzAutomationJob](/powershell/module/Az.Automation/Get-AzAutomationJob) to determine the status of the job and [Get-AzAutomationJobOutput](/powershell/module/az.automation/get-azautomationjoboutput) to retrieve its output. The following example starts a runbook called **Test-Runbook**, waits until it has completed, and then displays its output.
If the runbook requires parameters, then you must provide them as a [hashtable](/powershell/module/microsoft.powershell.core/about/about_hash_tables). The key of the hashtable must match the parameter name and the value is the parameter value. The following example shows how to start a runbook with two string parameters named FirstName and LastName, an integer named RepeatCount, and a boolean parameter named Show. For more information on parameters, see [Runbook Parameters](#work-with-runbook-parameters).