❔ Load Powershell Scripts as dynamic functions for a job manager?
Is it possible to use
System.Management.Automation.PowerShell
to load powershell scripts (where the script itself is just one big function),
and then execute them as functions?
I know you can just load a script and execute it at once, but i am trying to make a job manager where you got different scripts that you can assign work to.
As a workflow, you create a task, then add inputs and available script/s to do what you want.
But i can't figure out if it's possible to even load scripts and have them callable to begin with.2 Replies
I think its possible, you pass the path of script file and invoke it. It will return the output if ps has return values
where do you want to use this ?
You can write wrapper functions for ps scripts to invoke them and return the output
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.