# Friday, April 21, 2006

I wish I could say I'm busy working on my SharePoint provider, but eh, no. I'm currently embroiled in the living hell that is house hunting: mortages, loans, notaries, agents and other such savagery. Why can't I just buy the friggin' thing on eBay? Oh yeah, just remembered why: you would pay $400,000; get hit by PayPal for $50,000; it would be the wrong colour; it would be late; the seller would insist on you paying via Western Union before shipping you a garden shed. etc etc.

 

posted on Friday, April 21, 2006 11:45:34 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [1] Trackback
# Sunday, April 09, 2006

...released to GotDotNet's MSH Community Extensions run by Monad MVP Blogger, Keith Hill.

posted on Sunday, April 09, 2006 1:20:16 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Wednesday, April 05, 2006

So, another drop for you today:

It now supports infinitely complex paths, and copy/move/delete:
 
e.g.
 
     # clear all alerts for the 'username' found in the contributor role
   remove-item wss:\site\subsite\!roles\contributor\username\!alerts\*
 
   # make the cross-site group 'crosssitegroup' part of the administrator role
   copy !groups\crosssitegroup  !roles\administrator\
 
   # upgrade perms for 'crosssitegroup' from reader to contributor
     move !roles\reader\crosssitegroup !roles\contributor
 
Of course, wildcards work too, so let loose!
 
pseudo containers (will tab complete, but not show up in get-childitems):
 
   !alerts, !groups, !roles, !lists, !users
 
When in the context of certain containers, only a subset of these will appear. For example, when in the user container, only !groups and !alerts are available
 
containers:
 
   user, group, role, list
 
leaf:
 
  alert, listitem
 
I've implemented a handful of what I call "adders" and "removers" to allow basic copy/move/delete functionality between different types of compatible (and incompatible) paths. So, what do I mean by "incompatible?" For example, it is currently possible to do:
 
   move-item \!users\oisin \!roles\contributor\
 
So, what happens is the user oisin gets copied to the contributor role (ok) and then is removed from the source (not ok). In sharepoint terms, this makes oisin a contributor, and then removes him from the site users -- which also removes him from contributors :)
 
Since I plan to release the source when I get to a reasonable beta level, I don't want any dirty hacks. I'm taking the time to architect the copy/move/remove path rules properly, so as to give back a solid, reusable framework to the community.
 
Use with:
 
   installutil.exe nivot.monad.sharepoint.dll
   add-mshsnapin nivot.monad.sharepoint
   new-drive <drivename> sharepoint <url>    ( e.g. new-drive wss: sharepoint http://localhost/ )
 

(old binary removed) - latest version always at:
http://www.codeplex.com/PSSharePoint

posted on Wednesday, April 05, 2006 12:31:49 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Thursday, March 30, 2006

Update April 8th: for latest version -- see home page http://www.nivot.org/

This was a lot of pain; but through a combination of Lutz Roeder's Reflector, MDBG and tinkering, I've got a functioning NavigableCmdletProvider derived SharePoint provider working:

  • only supports Drive-Qualified operation at the moment
  • no support for copy,delete or move, yet.
  • each web exposes pseudo container paths of !Alerts, !Groups, !Lists, !Roles, !Users
  • no format-types xml included yet, so directory display is a little messy

This initial release only supports running on the same server as sharepoint, meaning you'll need to install 2.0 framework and Monad 3.1 onto your sharepoint box. Just extract the DLL and run the following commands to get started:

MSH C:\Monad\Snapins> c:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe MshSharePointProviderSnapin.dll
...
MSH C:\Monad\Snapins> add-mshsnapin nivot.monad.providers
MSH C:\Monad\Snapins> new-drive wss sharepoint
http://wss.server.com
MSH C:\Monad\Snapins> cd wss:
MSH wss:\>

So, from here you can use cd or set-location and hit tab to cycle through the pseudo containers and subwebs. Once inside, e.g. wss:\subsite\!roles, you can type dir to enumerate all SPRole items. Alerts, Groups, Lists, Roles and Users are treated as containers. Alert, Group, List, Role and User are leaf nodes. I'm extending this to treat a List and a User as a container too to expose their collections (List.Items) and (User.Alerts) as further containers. Currently, only simple paths are supported, some examples:

\!alerts\alerttitle
\subweb\!roles
\subweb\!users\username
\subweb\subweb2\


Complex nested paths will be in the next release, e.g.

\subweb\!users\username\!alerts\alerttitle

Currently, it does support not SPS; you can map a drive to the root of a portal, but you will experience some weird behaviour. I plan to incorporate support for that in the future.

The next release will support copy, move and delete semantics between containers. It will also support complex paths. Post any ideas, feature requests and/or anything you feel might a bug or just done wrong. I'm working on a list of concrete features for my next post.

Have fun!

( for latest version, see homepage )

posted on Thursday, March 30, 2006 6:38:24 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [3] Trackback
# Wednesday, March 22, 2006

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!

posted on Wednesday, March 22, 2006 1:32:35 PM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Thursday, March 16, 2006
You get "Cannot complete this action" when updating/editing a Hyperlink field ( URL ) in a Links list programmatically.
posted on Thursday, March 16, 2006 11:07:51 AM (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Tuesday, January 10, 2006
Faulting application w3wp.exe, version 6.0.3790.1830, stamp 42435be1, faulting module stswel.dll, version 11.0.6568.0, stamp 42e17544, debug? 0, fault address 0x0009310c.

This is something I fell victim about 18 months ago, pre-SP1 for Windows SharePoint Services, and I'd forgotten about until the recent release of SP2 for both WSS and SPS. By the time I had resolved the problem and discussed it with the Microsoft Escalation Engineer we had standing by, SP1 was already in testing. It was said that a "fix" may not make that service pack. So, it was worked around and was duly forgotten until now -- the release of SP2 -- and so I decided to see if it had been "fixed."
posted on Tuesday, January 10, 2006 5:10:56 PM (Eastern Standard Time, UTC-05:00)  #    Comments [2] Trackback
# Tuesday, January 03, 2006
Error 1928. error registering COM+ application. Contact your support personnel for more information.
or
Error 5003. Regsvcs failed for assembly c:\program files\Microsoft Biztalk Server 2004\Microsoft.Biztalk.Deployment.dll. Return code 1. (BizTalk SP1)


I ran into the above error while installing BizTalk 2004 dev/sdk components onto my windows xp/sp2 box and spent a few hours debugging the problem and managed to find a workaround. The problem stems from overly tight default permissions on keys created under HKLM\software\classes during the install.

posted on Tuesday, January 03, 2006 5:05:18 PM (Eastern Standard Time, UTC-05:00)  #    Comments [7] Trackback