I am trying to automate the kusto scripts by triggering from azure runbook instead from VM. I have a masterscript.ps1 which calls other powershell scripts. Could you please help me where should be we add the code of other powershell scripts in runbook created. Ways that we can call other powershell scripts from powershell runbook.
In below example, I have the masterscript which tries to invoke the other powershell scripts. In powershell runbook type, where should I add the other scripts code.
Example :
Masterscript.ps1 -
write-host n
n "Master script initiate" n
n
write-host n "########################################################################################################################################################################################"
n n write-host "investigatorDB_v3.ps1 script initiate"
n n write-host "########################################################################################################################################################################################"
n `n
&"$PSScriptroot\investigatorDB_v3.ps1" -save
write-host n "########################################################################################################################################################################################"
n n write-host "investigatorDB_ClosedSync_v3.ps1 script initiate"
n n write-host "########################################################################################################################################################################################"
n `n
&"$PSScriptroot\investigatorDB_ClosedSync_v3.ps1" -save
write-host n "########################################################################################################################################################################################"
n n write-host "investigatorDB_UpdateState_v3.ps1 script initiate"
n n write-host "########################################################################################################################################################################################"
n `n
&"$PSScriptroot\investigatorDB_UpdateState_v3.ps1" -save
write-host n
n "Master Script Complete" n
n