PowerShell Not your Father’s Command Line Part 11 of 31: PowerShell Providers and You!

Today, Matt is going to tell you about the awesomeness known as PowerShell providers. I have to admit that providers really are helpful. Sure, there are the PowerShell-specific providers – Alias, Function, and Variable. These can tap into the PowerShell system and help you determine what aliases, functions, and variables already exist. But then there are other providers that are there to make it easier to access data stores that are typically hard to access in a scripting environment.

Matt will talk about the registry provider tomorrow, so I won’t go on about it here. The other built-in providers give us access to the file system objects (FileSystem provider), X.509 certificate store (Certificate provider), environment variables (Environment provider), and Web Services for Management (WSMan provider).

When Matt and I were working on our book, I had the joys of playing with providers and figuring out how they work under the covers. I won’t scare you off from them by showing you code here – that’s in Appendix C of our book. However, if you want to get into provider development more extensively after reading our book, I recommend talking with Oisin Grehan, the coordinator of the PowerShell Script Provider project on CodePlex, which will allow you to write a custom provider in PowerShell. (Yes, a provider to create providers!)

Leave a Reply

Your email address will not be published. Required fields are marked *