PS 7.1.3 Azure CLI 2.22.1

Prev Next

Skillable Studio allows execution of scripts against a cloud subscription, as well as executing scripts that do not have a target. Scripts are used in Automated Activities and Life Cycle Actions.

Your scripts can communicate success or failure to Skillable Studio in one of two ways.

//do stuff... all good
return $true
PowerShell
//do stuff... uh oh
return $false
PowerShell
//do stuff... all good
Set-ActivityResult -Correct
PowerShell
//do stuff... uh oh
Set-ActivityResult -Incorrect
Plain text

You can also report the result as a score percentage...

//do stuff... we want to report success and set the score value as 50%
Set-ActivityResult -Score .5
PowerShell

Notifications appear as real-time toast notification in the lab client.

Send-LabNotification -Message "Hello from a script"
PowerShell

Lab variables are always string name/value pairs. Variable values are scoped to the lab instances and become available within the lab instructions as well as subsequent script executions.

Set-LabVariable -Name firstName -Value John
PowerShell

You can "receive" a variable in your script...

#a variable set elsewhere in the lab, but we can use it in our script
$myVariable1 = "@lab.Variable(myVariable1)"
PowerShell