Build API for your application based on Windows PowerShell
Windows PowerShell, is the new (kind of new) Shell from Microsoft. Actually, PowerShell is more than a shell. you can use PowerShell as a Platform. Because PowerShell commands (AKA command-lets or cmdlets) are actually .NET classes, and PowerShell, not like other shells, is object oriented, we can use powershell as a development platform.
When you write an Application, you can create a new PowerShell tier, which include command-lets which relevant for your application. for example, in student management application, I'll create the following command-lets:
This PowerShell tier include command-lets that can be used as your Application API.
The command-lets you write can use by users who want to use command line for working with your application, scripts writers that can use your command lines, and you can base your GUI (PowerShell is more than command line you can create even WPF GUI PowerShell command-lets behind the scenes) based on this command-lets (think about it: the name of command-let is verb-noun which exactly the way we describe the things the user can do with the GUI), and other applications can use this command-lets as your Application's API, because any .NET application can easily execute PowerShell scripts, include your application's command-lets, and work with the results (everything is objects).
For more information about it, download my presentation and the source code (include exampled of build GUI based on PowerShell in .NET 3.5 application [even that PowerShell command lets should be written in .NET 2.0 or be fully compatibility with it]) from my lecture about PowerShell in Developer Academy 2 (Israel).
You can also read my code project article about Build PowerShell Command-Let.
Shahar Gvirtz.