Shahar Gvirtz's Weblog

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:

  • Get-Student
  • New-Student
  • Update-Student
  • Delete-Studentimage

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.

Comments

Cheap Louis Vuitton Outlet said:

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work. I am always trying to foster good relationships with people who can help my cause. This really breaks it down to a step by step process

# July 18, 2011 4:15 AM

cheap louis vuitton bags said:

Very valuable information, I am very grateful.

# July 18, 2011 11:14 PM

Cheap Supra Footwear said:

I agree with your Blog and I will be back to check it more in the future so please keep up your work. I love your content & the way that you write. It looks like you have been doing this for a while now, how long have you been blogging for?

# July 21, 2011 11:17 PM

Nike Shox cheap said:

This website has got lots of extremely helpful info on it. Thanks for helping me.<a href="www.nikeshoxcheapsale.com/" title="Nike Shox cheap">Nike Shox cheap</a>

# August 8, 2011 4:06 AM

The North Face Canada said:

Thanks very much for this wonderful blog;this is the kind of thing that keeps me going through the day.<a href="www.northfaceoutletcanada.com/" title="The North Face Canada">The North Face Canada</a>

# August 12, 2011 2:39 AM

baseball caps said:

I love your homepage, the way I love air. Ok just kidding but really good explanations though .

# August 13, 2011 3:56 AM

cheap herve leger dress said:

I always enjoy your posts, your real, and some times funny as well. keep it up!<a href="www.cheapherveleger-sale.com/" title="cheap herve leger dress">cheap herve leger dress</a>

# August 14, 2011 9:54 PM

wholesale jerseys said:

Just want to say your article is brilliant. The clarity in your post is simply impressive and i can assume you are an expert on this subject.

# August 14, 2011 10:01 PM

cheap Prada handbags said:

I read this informative article and I really enjoy reading it. I hope see more articles on this topic by you soon.

# September 3, 2011 2:38 AM

Prada handbags outlet said:

Your blog is perfect, and I like this article. I find the information I need. I think I can find more useful information here, thanks.<a href="www.pradabagsoutletstore.com/" title="Prada handbags outlet">Prada handbags outlet</a>

# September 8, 2011 3:14 AM

Monster beats studio said:

You're probably sick of hearing it, but you've got a really well written blog. Keep up the the great work.

# September 13, 2011 9:35 PM

Ralph Lauren outlet said:

Thanks for sharing your thoughts with us.I enjoyed well while reading your article.<a href="www.ralphlaurenoutletstore.net/" title="Ralph Lauren outlet">Ralph Lauren outlet</a>

# September 14, 2011 5:17 AM

Buy software said:

h9jnh4 Hello! Read the pages not for the first day. Yes, the connection speed is not good. How can I subscribe? I would like to read you in the future!....

# November 5, 2011 8:32 PM

bhavik said:

Dear Shahar,

the link to ppt and source code is inaccessible.

Could u provide new ones?

Regards,

Bhavik Shah

# January 3, 2012 7:25 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)