Thank you so much for coming to this session.WE’re going to be discussing using powershell as a platform for tools development.
This CodeStock session is sponsored by REcruitWise…
.. And Cadre5
I also have a personal sponsor today.SoftwareFX makes visualization and charting components. They also make a wicked little tool called “PowerGadgets” that lets you make desktop gadgets with powershell one-liners.
My name …From charlotte ncRun Code Owls LLCYou can drop me a email at…Follow me as beefarino….Visit my blog
A quick question:How many of you are developers?How many of those have been on the receiving end of a support call for their own application?How many of those have been on the receiving end of a brow beating from this guy….
Ever found yourself in a situation where your had to create a new tool because a user found a hole you didn’t plug?There are two ways to approach tool making….
You can make a tool that fits a specific task.E.g., a wrench that fits one specific size nut.In this case how many tools do you end up with?
.. Or you can make a general tool that fits lots of situations.Like a crescent wrench, which can fit lots of size nuts.It can also be used as a hammer, wedge, chisel if need be.
So consider when you’re making your software tools…… which is more maintainable: one tool or many?… which is more usable, more portable, more accessible?My goal is to get you thinking about that one tool…
My goal is to get you thinking about targeting PowerShellas your One Tool.The example I’ve chosen for this is the ASP.NET Membership framework used to manage user accounts for websites. I’ve chosen this because it’s been the cause of many headaches for me, and I’m assuming you’ve found yourself in similar boats.How many of you have experience with this, use it for your own sites?How are the management tools for it? Let’s take a look at them…
So how does powershell know which provider to use for a specific thing? It’s all about paths.When the user enters a provider command, like get-item, there is an explicit item (file, reg key, etc) being referenced.This reference is made using a path string.The resolved path generally contains a drive reference.Every powershell drive is associated with a specific provider.This provider is used to resolve the command.
A provider abstracts the things it stores as Items.Item can have Content and Properties.
There are specific powershellcmdlets for working with each of these abstractions.
Not all of them are necessarily supportede.g., the certificate provider doesn’t allow new-item
These are the cmdlets our membership provider will support.We’re not supporting these others because they don’t apply to Membership
Providers are implemented in tiers.Each tier builds on the one below it, so you can’t make an Item provider without making a Drive provider first.
So we’ll start with the drive provider, which will allow us to add a Membership drive to our powershell session.
The new System.management.automation.dll we’re using in these demos is hard to find, so I made a tinyurl to find it when I need it.
Go to this url and complete the survey, be sure to provide your email addy.I’ll give the first 50 responders a $120 gift code for softwarefxpowergadgets.
Power Shell As A Tools Platform
Jim Christopher<br />PowerShell as a Tools Platform<br />
CodeStock is proudly partnered with:<br />RecruitWise and Staff with Excellence - www.recruitwise.jobs<br />Send instant feedback on this session via Twitter:<br />Send a direct message with the room number to @CodeStock<br />d codestock 417 This session is great!<br />For more information on sending feedback using Twitter while at CodeStock, please see the “CodeStock README” in your CodeStock guide.<br />
The Hardest Problems Solved By The Best Engineers<br />