1

I have a powershell script that has a bunch of powershell functions. I want to be able to selectivly call indiviual functions from my VB.net application without running the whole script.

My research into calling Powershell code from VB.net has shown me either to call in individual powershell COMMAND (say Get-User) or calling a complete powershell script itself (The whole .ps1 file)

Anyone know how to do this, or can point me to a good site (that has code examples?)

Thanks

1
  • Since functions are script blocks, or basically mini-scripts, have you thought about breaking them out into separate .ps1 files and calling them that way? Commented Feb 14, 2012 at 20:39

1 Answer 1

1

Microsoft's new scripting shell formerly known as Monad or MSH. For examples you could visit here.

2
  • Is that your personal site? Commented May 2, 2012 at 11:59
  • Not mine, but a very useful site and I found it could help to deal with the situation. Commented May 2, 2012 at 12:23

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.