Invoking a specific function from PowerShell script from C#
Is there a way to call a specific function from a PowerShell script from C# code?
I have the basic example up and running that executes a string with a PowerShell script.
What if i have a file with many functions and i'd like 开发者_运维技巧to load only a particular one into C# and execute it ?
How can this be done?
Also, is there a way to load the parameters into this function dynamically, without actually knowing ahead which is the function that is loaded?
Thanks!
精彩评论