Question

I would like to create PowerShell cmdlets that interact with my application at runtime. Are there any best practices on how to accomplish this?

Was it helpful?

Solution

There are several options. You could some form of IPC mechanism: named pipes, memory mapped files, MSMQ, etc. The cmdlets could communicate to the app via a socket. If the app is managed, it could host a WCF endpoint that the cmdlets could use to communicate with the app. You could also expose a COM API and then control the app via that API. I'm sure there are several other ways I've failed to mention.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top