SharePoint 2010 List mgmt with PowerShell

Sep 15, 2011 at 4:59 PM

OK, I'm now officially frustrated with SP2010 lists.

With our use of templated sites for projects, we're running into the BrowserFileHandling being set to strict (thus disabling the ability to open .PDF's directly - without saving to a new location).

I've written scripts that will check/set the following attributes:

$list.BrowserFileHandling = Permissive

$list.DefaultItemOpen  = "PreferClient"

$list.DefaultItemOpenUseListSetting = "False"

However, when running $list.update(), I get the dreaded:

Exception calling "Update" with "0" argument(s): "<nativehr>0x80070005</nativehr><nativestack></nativestack>"

At C:\Temp\2\cf72c7d7-1985-4ef1-bcd0-1503da2d23a2.ps1:6 char:13

+ $list.Update <<<< ()

+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException

+ FullyQualifiedErrorId : DotNetMethodException

 Here's the code I'm using:


$list = $web.Lists["Shared Documents"]





$list.BrowserFileHandling = "Permissive"






 Any help much appreciated - I know that I was able to get this working before, but now - nada :(