I’ve been using PowerShell since it came out, and along the way I cobbled together a bunch of cmdlets, functions, and filters to create a fairly robust PowerShell toolkit. I’m particularly proud of the stuff I did around progress reporting, which I found to be essential when my tasks were long-running processes that dealt with over 10,000 items. I also wrote a bunch of stuff to simplify syntax so that I could just get stuff done.
I used it mostly for personal tasks and a handful of development tasks. When I worked on a big SharePoint 2010 migration at the beginning of the year (which I will also be blogging about), I ended up upgrading the whole library to PowerShell 2.0 and also writing a ton of stuff to manage SharePoint 2010. Since then, I’ve used it on an almost daily basis with every SharePoint 2010 project I encounter, and I will continue to enhance and refine it going forward.
Whereas most of the existing PowerShell API for SharePoint deals with administrative concerns (a la stsadm), I needed to manipulate a lot of SharePoint content. Lists, List Items, Documents, Pages, WebParts, Groups, Permissions, PropertyBags, etc. You get the gist.
I was surprised to find that there weren’t (m)any cmdlets that addressed those concerns. I’m still surprised, and maybe I missed something, but a deadline’s a deadline, so I wrote a bunch of my own cmdlets, which I am now sharing. If you’ve ever tried to do any of these things in PowerShell, I think you’ll find these functions very helpful.
I’ve just refactored everything into 2 major libraries (General PowerShell and SharePoint 2010) that are loaded using a dependency loader that is also part of the library. I tried to modularize everything so that if you wanted to just use a couple of parts of it, you should be able to do so with minimal concern over dependencies on other script files. I also just went through and added comment-based help and examples to many of the cmdlets. In the future, I may refactor it to take advantage of PowerShell 2.0 modules, but for the time being, I like the drop-and-go simplicity of my current approach.
The new codeplex project is here: wfpowershell.codeplex.com.
There’s no official release yet, but you can just download the latest revision from:
http://wfpowershell.codeplex.com/SourceControl/list/changesets.
The only thing you need to know is how to initialize the library once you’re in a PowerShell session. All you need to do is dot-execute the Bootstrapper script. Typically you would do something like this
cd [library directory] . .\Bootstrapper.ps1
That’s about it. You’ll have to browse through the scripts yourself to see what’s inside while I work on blogging and documenting how to use it.
Let me know what you think!
Discussion
No comments for “New Codeplex project: Winston’s PowerShell Extensions”
Post a comment