Fjärilsmannen
How do you get the output type from a powershell script with System.Management.Automation?
I am trying to figure out how to get the type specified in a powershell script
[OutputType([int])]
for example.
I can find it in the parsed attributes but it's just treated as an attribute that has "[int]", so it's not seen as a type but just the string value.
But there seems to be a OutputTypeAttribute
class, but i can't find any information on how to get a hold of that.21 replies
❔ 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.5 replies