Just Add Code

Extending PowerShell – Code Camp IV

For the fourth Twin Cities Code Camp I gave a presentation on Extending PowerShell for developers.  Turnout was great yet again at Code Camp, pretty much every session filled up.  The enthusiasm of the people who attend these sessions really make it a fun place to present.  I had a great group in my session, they helped make it into a very interactive presentation.

I started with scripting in PowerShell, then moved into dynamically adding members (properties and functions) to objects.  The PS1XML file is available for download.  Additionally, if you were interested in another example of this, the PowerShell for SharePoint Developers session I did at DevConnections has another good example of where a PS1XML can be used.

A Cmdlet and SnapIn were created using David Aiken‘s great PowerShell Visual Studio templates.  It demo’d passing parameters to a Cmdlet and having it return an array of items back to the Pipeline.  I also showed two implementations of hosting PowerShell; one for running a command from your app, and the other for replacing the UI entirely.

Slides
Code

No comments Digg this

No comments yet. Be the first.

Leave a reply