I've been playing with a c# app that hosts IronPython, IronRuby, and (hopefully) PowerShell. Since IronPython and IronRuby were completely built on the DLR, the API for using them is pretty much identical.
IronPython.Hosting.Python.CreateEngine()
and
IronRuby.Ruby.CreateEngine()
both create instances of a Microsoft.Scripting.Hosting.ScriptEngine. Is there any hope of coercing PowerShell 3.0 to create a ScriptEngine? I have not been able to find much on the subject, other than PowerShell 3.0 seem be built on the DLR more than the previous version was (see http://huddledmasses.org/powershell-3-finally-on-the-dlr.
It doesn't appear that you can cast a PowerShell engine created with the following to a ScriptEngine.
System.Management.Automation.PowerShell.Create()
I suspect that if I really want to handle PowerShell through the same API I need to create my own ScriptEngine that wraps the PowerShell host.