Show me the Monad

For me, the Microsoft Command Shell (MSH) has to be the most exciting thing to come out of Microsoft for years; yes, I'm a command line whore, but proud of it. In the *nix world I used ksh and when I ended up working a lot with DOS, 4DOS was my trusty companion. Up until recently 4DOS's 32bit successor, 4NT, was my main workhorse in the nt4/2000/xp world, but it's slowly losing ground now to MSH.

I've been working a lot with SharePoint Products & Technologies 2003 the last few years, and I've increasingly found myself writing little c# console apps to perform menial work like batch uploads into lists, mass user management/migrating, site cloning etc. I actually started to sit down and write a shell which was christened SPSH (pronounced speh-shell -- e.g. special, geddit!) which was going to work like NETSH with command contexts etc; NETSH is pretty nice, it feels like very much like IOS. Then I discovered MSH and the Cmdlet Provider model and I saw the light

Made in Express entrant

So, I'm announcing my work on a SharePointProvider which I expect to have ready in about 6 weeks from now in it's first release form. I'm about 2 weeks into it now. Incidentally, since I'm developing it with the unbelievably cool -- and free -- Visual Studio Express, I've entered the project for the "Made in Express" Contest. It'd be nice to get the $10k, but I'm doing this for fun already and to help ease my workload (and yours too if you decide to use it). Imagine being able to do this:

MSH C:\monad\snapins> new-drive wss sharepoint http://intranet

Name       Provider      Root                    CurrentLocation
----       --------      ----                    ---------------
wss        nivot.mona...
http://intranet

MSH C:\monad\snapins> cd wss:
MSH wss:\> cd subsite\!Users
MSH wss:\subsite\!Users> copy * ..\!roles\contributor

Anyhow, the list of things you can do is endless once the provider is in place. Check all users in a site collection against AD to see if they locked out their accounts? easy. Copy users from one site to another? easy. Downgrade all contributors from a particular domain to reader? easy.

Also, you'll be able to copy files from one document library to another while preserving metadata, optionally creating the source schema in the destination if the document libraries do not match.

And finally, if you don't want to wait for me before you get scripting SharePoint, take this in:

MSH c:\monad> [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

GAC    Version        Location
---    -------        --------
True   v1.1.4322      C:\WINDOWS\assembly\GAC\Microsoft.SharePoint\11.0.0.0__71e9bce111e9429c\Microsoft.SharePoint.dll

MSH c:\monad> $site = new-object Microsoft.SharePoint.SPSite("http://intranet")
MSH c:\monad> $site.ID.toString()
d5dfb76b-fd15-4666-b9f1-93f2ae617086

Exciting times!

blog comments powered by Disqus

About the author

Irish, PowerShell MVP, .NET/ASP.NET/SharePoint Developer, Budding Architect. Developer. Montrealer. Opinionated. Montreal, Quebec.

Month List

Page List