Pergunta

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

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top