سؤال

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

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top