Hi,
I plan to create a C# WPF UI application which uses my own powershell cmdlets to do all the works like adduser, addgroup, getmachineinfo...
I have foresee some issues in this model. For example, cmdlets' asynchronous call using background job and Powershell eventing do not fit the C# UI's event model. To handle a background job's result, the main thread need to query the result proactively. For handle the events (engine/.net object/wmi), UI need to have a thread to wait for the events. This could be an ill-formed workflow and might cause a big pain for UI to handle asynchronous call and eventing.
Could anybody share your experience on the Pros and Cons of using powershell cmdlets for a WPF application's backend calls?
Appreciate any input.
Thanks
Leon