We help IT Professionals succeed at work.

Open pdf files in browser using sharepoint 2010

I am trying to get it so that users in a site on our sharepoint server can open pdf's directly in the browser and not have to download them.  I found this article:


Option #1 looks like it sets Browser File Handling to Permissive for all sites and I only want to do it for one specific site.  So I decided to try the powershell option.  When I run powershell and put that in there (with my site url in it) I get the following error:

 The term 'Get-SPWebApplication' is not recognized as a cmdlet, function, operableprogram

Any thoughts or a way of opening the pdf in the browser?
Watch Question

Lets start with the simple question first. Are you sure you are running this command in the Sharepoint 2010 Management Shell and not just a regular powershell window.

I just tested this on my SP2010 server and the command is a valid one.

If you open the powershell window and type get-spw and then hit tab it should autofill the command hitting tab will cycle through to the next command. GET-SPwebapplication is definitely a correct command.

Also if you are running this from the sharepoint server using a regular powershell window you can run the following command to add the SP cmdlets.

add-pssnapin microsoft.sharepoint.powershell


I was trying it through the regular powershell.  So I ran it through the Sharepoint one, and I get the error:

Cannot find an SPWebApplication object with Name, Id, or URL:

Can that not be run at the site level?

Our server would be


but the site url I am trying is:


Explore More ContentExplore courses, solutions, and other research materials related to this topic.