I've been writing some utilities that make use of PowerShell Cmdlets for App-V. The interesting part is Microsoft seems to only document the cmdlets and not the .net assemblies used behind the Powershell modules.
Now I'm familiar with P/Invoke and COM Interop and I've learned how to use System.Management.Automation to create a powershell session and invoke the cmdlets.
But something doesn't smell right to me. I'm basically writing my own wrapper classes to hide the powershell invocations from the rest of my code. It seems like I should either a) bypass powershell and go straight for the managed library behind it or b) there should be better mechanism for generating interop libraries for powershell cmdlets.
It seems like Microsoft is making a lot of use of PS CmdLets these days that it's essentially becoming a new API to interop with.
Am I missing something? What's a good strategy to use in this scenario?