0

I'm not sure how to phrase the question, but this is what I'm looking for:

I want to create a VB.Net application that can 'insert' itself in a PowerShell pipe as receiver, and optionally also as a producer. In other words, I want to do this:

Some-PowerShell-CmdLet | My-Program

and optionally:

Some-PowerShell-CmdLet | My-Program | Other-PowerShell-CmdLet

I would very much appreciate it if you can point out the relevant documentations and/or tutorials.

2 Answers 2

2

Take a look at this MSDN Blog by David Aiken. It discusses getting the Visual Studio PowerShell Templates in C# and Vb.net and then gives a rundown on how to create a cmdlet.

You can also look at these tutorials from Microsoft.

Sign up to request clarification or add additional context in comments.

1 Comment

Interesting... thanks for the tips. Let me have some time reading them. I'll get back to you.
1

You can directly execute the application "powershell Some-PowerShell-CmdLet | PATH/My-Program" from where Powershell will be installed. Also use following command from Windows to start a new powershell window as: "start powershell new-PSSession -Computername ${IPAddress} -Cred ${adminUser}\${VMUserName}"

1 Comment

So, IOW, I should just handle the STDOUT of the PowerShell CmdLet? Hmmm... workable... any suggestion on how to feed its output onto a CmdLet where the output will be handled as objects?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.