Change Browser File Handling for all document libraries and lists

Updated 31-07-2012: Increased performance by using the .AllWebs property instead of using Get-SPWeb for each SPSite object.When do you use it?The script provides a solution when it comes to the very common "I cannot open the PDF without saving it first" problem.In some scenario's

 
 
 
 
 
3.6 Star
(5)
2,096 times
Add to favorites
SharePoint
7/31/2012
E-mail Twitter del.icio.us Digg Facebook
  • Script doesn't work on my server
    1 Posts | Last post May 25, 2015
    • Hi I have just downloaded this script and deployed it in my SharePoint farm. I keep getting this feedback:
      
      Amount of webs updated:0
      Amount of lists updated: 0
      
      Is there anything I have to do before running this in powershell?
  • Run script and got this error
    2 Posts | Last post September 26, 2013
    • The following exception was thrown when trying to enumerate the collection: "Ac
      cess is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))".
      At C:\scripts\Change-BrowserFileHandling.ps1:33 char:13
      +     $lists = <<<<  $web.Lists | ?{$_.BrowserFileHandling -eq "Strict"}
          + CategoryInfo          : NotSpecified: (:) [], ExtendedTypeSystemExceptio
         n
          + FullyQualifiedErrorId : ExceptionInGetEnumerator
      
    • Hi Luis,
      
      The error shows you have unsufficient permissions to perform the action.
      To check this, please add "Full control" permissions to the user you are running PowerShell with. 
      
      Go to Central Administration -> Application Management -> Manage Web Applications.
      
      Select the Web Application, and in the ribbon click "User Policy". Add the user here with Full Control permissions.
      
      Hope this helps.
  • Nothing happens...
    3 Posts | Last post March 22, 2012
    • When we execut the script on the server nothing happens, no errors, no feedback, not anything, just goes back to prompt.
      
      Any ideas?
    • Hi Tyler,
      
      I just updated the script so you can execute it without any problems.
      
      Save the script and navigate to the folder where the script resides in your PowerShell instance (as administrator):
      
      .\Change-BrowserFileHandling.ps1 
      
      Additionaly, you can use parameters now, so you could type:
      .\Change-BrowserFileHandling.ps1 -URL "http://www.yoururl.com/site" to do this just for the site that you specified.
      
      I hope this helps.
    • Great script! Thanks for sharing..