In this scenario, we will execute a fairly simple runbook on a hybrid worker. The runbook will look for all files in a directory specified in a runbook source parameter and copy to another hybrid worker directory specified in a runbook target parameter:
workflow File-Copy{ Param ( [parameter(Mandatory=$true)] [String] $FileSource, [parameter(Mandatory=$true)] [String] $FileDestination ) Write-Output "Runbook is executing on On-premises Hybrid worker: $env:ComputerName" Write-Output "File Destination: $FileDestination" Write-Output "Source of File: $FileSource" $execute = InlineScript { Try { Copy-Item -Path "$using:FileSource" -Destination "$using:FileDestination" -recurse } catch { $errorMessage = $error[0].Exception.Message ...