SharePoint, PowerShell and Kerberos

Just a few weeks ago, I started using PowerShell to approach SharePoint and get things done. The possibilities seem endless, even for SharePoint 2007 (of course, SharePoint 2010 will be the answer to everything and more). Testing some scripts on my sandbox worked pretty fine (besides the learning curve for a non-developer). By the time I started moving some scripts to the customer Dev machines, weird errors started popping up. Trying to run the method Update() on a List object returned an error (Object reference not set to an instance of an object). Example:
$spsite = New-Object Microsoft.SharePoint.SPSite("http://myshinyportal")
$spweb = $site.OpenWeb("aWeb")
$splist = $spweb.GetList("aList")
$splist.EnableVersioning = $false
$splist.Update()

It took quite some searching, but finally colleague-at-customer Bastiaan Kortenbout found a similar case on the Microsoft Connect site. It turns out that PowerShell v2 and Kerberos are having some trouble getting along with each other. PowerShell v1 does now how to be nice to others, but this is a step backward from a functional standpoint. Hopefully Microsoft will fix this soon!

No comments:

Post a Comment