<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BasementJack &#187; Sharepoint</title>
	<atom:link href="http://basementjack.com/tag/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://basementjack.com</link>
	<description>Jack&#039;s basement and some other stuff...</description>
	<lastBuildDate>Fri, 18 May 2012 20:26:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PowerShell to add all users (claims) to Sharepoint</title>
		<link>http://basementjack.com/uncategorized/powershell-allusers-claims/</link>
		<comments>http://basementjack.com/uncategorized/powershell-allusers-claims/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 16:33:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=449</guid>
		<description><![CDATA[PowerShell command to add all users via claims via PowerShell to SharePoint 1 New-spuser “c:0&#40;.s&#124;true&#34; -web http://www.mysharepointsite.com/ -permissionlevel &#34;read&#34;]]></description>
			<content:encoded><![CDATA[<p>PowerShell command to add all users via claims via PowerShell to SharePoint</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;">New<span style="color: pink;">-</span>spuser  “c:<span style="color: #804000;">0</span><span style="color: #000000;">&#40;</span>.s<span style="color: pink;">|</span>true<span style="color: #800000;">&quot; -web http://www.mysharepointsite.com/ -permissionlevel &quot;</span>read<span style="color: #800000;">&quot;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/powershell-allusers-claims/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell to activate a SharePoint 2010 feature on every site collection in a web app</title>
		<link>http://basementjack.com/uncategorized/powershell-to-activate-a-sharepoint-2010-feature-on-every-site-collection-in-a-web-app/</link>
		<comments>http://basementjack.com/uncategorized/powershell-to-activate-a-sharepoint-2010-feature-on-every-site-collection-in-a-web-app/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 05:07:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=423</guid>
		<description><![CDATA[I recently was given a WSP to add to our farm. In this case after the WSP was installed and deployed we needed to activate the feature at the site collection level. Thats usually easy enough to do through the UI, but in this particular case we had a web application which had over a [...]]]></description>
			<content:encoded><![CDATA[<p>I recently was given a WSP to add to our farm.</p>
<p>In this case after the WSP was installed and deployed we needed to activate the feature at the site collection level.<br />
Thats usually easy enough to do through the UI, but in this particular case we had a web application which had over a dozen site collections.</p>
<p>ie:</p>
<ul>
<li>http://jack.com</li>
<li>http://jack.com/blog</li>
<li>http://jack.com/marketing</li>
<li>10 more like the above&#8230;</li>
</ul>
<p>Activating it at http://jack.com from the UI was fine, but when the user navigated to http://jack.com/blog they were stumbling onto another site collection, and the feature wasn&#8217;t activated there.</p>
<p>To activate it on every Site collection meant that I&#8217;d have to a) know what each site collection was, and b) visit that site, and activate the feature.<br />
<br/><br />
Too much work.<br />
<br/><br />
What was needed was a simple script that would loop though each site collection, enabling the feature on each one.<br />
<br/><br />
The script below is a result of that need&#8230;<br />
<br/></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;">&nbsp;
 <span style="color: #008000;"># this script enables a feature on every site collection on a given web app</span>
&nbsp;
 <span style="color: #008080; font-weight: bold;">Add-PSSnapin</span> microsoft.sharepoint.powershell <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue
 <span style="color: #800080;">$webs</span> <span style="color: pink;">=</span>  get<span style="color: pink;">-</span>spsite <span style="color: pink;">-</span>webapplication <span style="color: #800000;">&quot;http://www.yoursharepointURL.com&quot;</span>
 <span style="color: #800080;">$feature</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;YourFeatureName&quot;</span> <span style="color: #008000;">#this might not be what you expect it to be, best to do get-spfeature | Select displayname</span>
&nbsp;
  <span style="color: #0000FF;">Foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$oneweb</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$webs</span><span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #800080;">$oneweb</span>
    <span style="color: #800080;">$siteFeature</span> <span style="color: pink;">=</span> get<span style="color: pink;">-</span>spfeature <span style="color: pink;">-</span>site <span style="color: #800080;">$oneweb</span> <span style="color: pink;">|</span> <span style="color: #0000FF;">Where</span> <span style="color: #000000;">&#123;</span><span style="color: #000080;">$_</span>.displayname <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$feature</span><span style="color: #000000;">&#125;</span>
    <span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$siteFeature</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$null</span><span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
      <span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;Activating Site level Features at $oneweb&quot;</span> <span style="color: #008080; font-style: italic;">-foregroundcolor</span> Yellow
      Enable<span style="color: pink;">-</span>SPFeature <span style="color: pink;">-</span>Identity <span style="color: #800080;">$Feature</span> <span style="color: pink;">-</span>URL <span style="color: #800080;">$oneweb</span>.URL <span style="color: #008080; font-style: italic;">-Confirm</span>:<span style="color: #800080;">$False</span>
    <span style="color: #000000;">&#125;</span>
    <span style="color: #0000FF;">else</span>
    <span style="color: #000000;">&#123;</span>
      <span style="color: #008080; font-weight: bold;">Write-Host</span> <span style="color: #800000;">&quot;Feature $feature is already activated on $oneweb&quot;</span> <span style="color: #008080; font-style: italic;">-foregroundcolor</span> green
    <span style="color: #000000;">&#125;</span>
  <span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>If you look at the simple logic, you&#8217;ll see you can run it more than once &#8211; and the second time you run it, it should display an all green list indicating that all the site collections already have the feature activated.</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/powershell-to-activate-a-sharepoint-2010-feature-on-every-site-collection-in-a-web-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Give a new Sharepoint developer the ability to run powershell commands</title>
		<link>http://basementjack.com/uncategorized/give-a-new-sharepoint-developer-the-ability-to-run-powershell-commands/</link>
		<comments>http://basementjack.com/uncategorized/give-a-new-sharepoint-developer-the-ability-to-run-powershell-commands/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 22:21:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=410</guid>
		<description><![CDATA[See who has them with get-spshelladmin add one with add-spshelladmin]]></description>
			<content:encoded><![CDATA[<p>See who has them with<br />
get-spshelladmin<br />
add one with<br />
add-spshelladmin</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/give-a-new-sharepoint-developer-the-ability-to-run-powershell-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell to test a URL against UAG rulesets</title>
		<link>http://basementjack.com/uncategorized/powershell-to-test-a-url-against-uag-rulesets/</link>
		<comments>http://basementjack.com/uncategorized/powershell-to-test-a-url-against-uag-rulesets/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 04:43:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[UAG]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=400</guid>
		<description><![CDATA[Many companies use Microsoft Forefront Universal Access Gateway (UAG) to publish sharepoint sites to the public internet. We recently had a problem where office (word, excel, powerpoint) documents would not open through a sharepoint published site Via UAG in the office app on the end users home PC. In UAG there&#8217;s a bunch of rules [...]]]></description>
			<content:encoded><![CDATA[<p>Many companies use Microsoft Forefront Universal Access Gateway (UAG) to publish sharepoint sites to the public internet.</p>
<p>We recently had a problem where office (word, excel, powerpoint) documents would not open through a sharepoint published site Via UAG in the office app on the end users home PC.</p>
<p>In UAG there&#8217;s a bunch of rules that match the URL in question via a regex.<br />
We needed a quick way to test our URL against the regex in each and every rule so we knew which rules applied.</p>
<p>There currently isn&#8217;t a way to do that in UAG (there should be)<br />
So as an alternate to doing these manually, I used the &#8220;Export rules&#8221; feature, then wrote the following powershell script to parse the exported file, gather the RegEx&#8217;s of each, and test the URL in question against each RegEx so you can see what rule is actually being applied.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># if you run from ISE and get a permissions error copy and paste everything to a new tab.</span>
<span style="color: #008000;"># or run get-executionpolicy (take note what it is) then run (as an administrator): set-executionpolicy unrestricted</span>
<span style="color: #008000;">#set theses two variables -</span>
<span style="color: #800080;">$ExportedRuleSetFile</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">get-content</span> <span style="color: #800000;">'c:\PS\PRD_URLset.txt'</span>
<span style="color: #800080;">$URLtoFind</span> <span style="color: pink;">=</span> <span style="color: #800000;">&quot;/get/content/from/sharepoint.aspx&quot;</span>
<span style="color: #0000FF;">Function</span> FindAMatch<span style="color: #000000;">&#40;</span><span style="color: #800080;">$Rulefile</span><span style="color: pink;">,</span> <span style="color: #800080;">$URL</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #800080;">$table</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> system.Data.DataTable <span style="color: #800000;">&quot;RegExList&quot;</span>
	<span style="color: #800080;">$col1</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> system.Data.DataColumn Section<span style="color: pink;">,</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$col2</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> system.Data.DataColumn Name<span style="color: pink;">,</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$col3</span> <span style="color: pink;">=</span> <span style="color: #008080; font-weight: bold;">New-Object</span> system.Data.DataColumn RegEx<span style="color: pink;">,</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#91;</span><span style="color: #008080;">string</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$table</span>.columns.add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$col1</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$table</span>.columns.add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$col2</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$table</span>.columns.add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$col3</span><span style="color: #000000;">&#41;</span>
&nbsp;
	<span style="color: #800080;">$row</span> <span style="color: pink;">=</span> <span style="color: #800080;">$table</span>.NewRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #800080;">$row</span>.Section <span style="color: pink;">=</span> <span style="color: #800000;">&quot;Section&quot;</span>
	<span style="color: #800080;">$row</span>.name <span style="color: pink;">=</span> <span style="color: #800000;">&quot;Name&quot;</span>
	<span style="color: #800080;">$row</span>.RegEx <span style="color: pink;">=</span> <span style="color: #800000;">&quot;Regex&quot;</span>
&nbsp;
	<span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$line</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$Rulefile</span> <span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$line</span><span style="color: #000000;">&#91;</span><span style="color: #804000;">0</span><span style="color: #000000;">&#93;</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;[&quot;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #800080;">$table</span>.Rows.add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$row</span><span style="color: #000000;">&#41;</span>
			<span style="color: #800080;">$row</span> <span style="color: pink;">=</span> <span style="color: #800080;">$table</span>.NEwRow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
			<span style="color: #800080;">$row</span>.Section <span style="color: pink;">=</span> <span style="color: #800080;">$line</span>
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0000FF;">elseif</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$line</span>.substring<span style="color: #000000;">&#40;</span><span style="color: #804000;">0</span><span style="color: pink;">,</span><span style="color: #804000;">7</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;m_regex&quot;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #800080;">$row</span>.RegEx <span style="color: pink;">=</span> <span style="color: #800080;">$line</span>.substring<span style="color: #000000;">&#40;</span><span style="color: #804000;">8</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#125;</span>
		<span style="color: #0000FF;">elseif</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$line</span>.substring<span style="color: #000000;">&#40;</span><span style="color: #804000;">0</span><span style="color: pink;">,</span><span style="color: #804000;">7</span><span style="color: #000000;">&#41;</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800000;">&quot;m_name=&quot;</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #800080;">$row</span>.Name <span style="color: pink;">=</span> <span style="color: #800080;">$line</span>.Substring<span style="color: #000000;">&#40;</span><span style="color: #804000;">7</span><span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
	<span style="color: #800080;">$table</span>.Rows.add<span style="color: #000000;">&#40;</span><span style="color: #800080;">$row</span><span style="color: #000000;">&#41;</span>
&nbsp;
	<span style="color: #008080; font-weight: bold;">write-host</span> Note: this only searches SharePoint Rules
	<span style="color: #008000;"># note the select statement is needed because many of the records don't have regex values</span>
	<span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$record</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$table</span>.<span style="color: #008080; font-weight: bold;">select</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;name like 'SharePoint%'&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$url</span> <span style="color: #FF0000;">-match</span> <span style="color: #800080;">$record</span>.regex<span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800080;">$url</span> found <span style="color: #0000FF;">in</span> <span style="color: #800080;">$record</span>.name via regex matching <span style="color: #800080;">$record</span>.regex
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span> <span style="color: #008000;">#end function</span>
FindAMatch <span style="color: #800080;">$ExportedRuleSetFile</span> $URLtoFind</pre></td></tr></table></div>

<p>Sample output looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="none" style="font-family:monospace;">Note: this only searches SharePoint Rules
/get/content/from/sharepoint.aspx found in SharePoint14AAM_Rule1 via regex matching (/[^&quot;#&amp;amp;*+:&amp;lt;&amp;gt;?\\{|}~]*)/?
/get/content/from/sharepoint.aspx found in SharePoint14AAM_Rule47 via regex matching (/[^&quot;#&amp;amp;*+:&amp;lt;&amp;gt;?\\{|}~]*)*/[^&quot;#&amp;amp;/:&amp;lt;&amp;gt;?\\{|}~]*\.aspx
/get/content/from/sharepoint.aspx found in SharePoint14AAM_Rule48 via regex matching /
/get/content/from/sharepoint.aspx found in SharePoint14AAM_Rule60 via regex matching (/[^&quot;#&amp;amp;*+:&amp;lt;&amp;gt;?\\{|}~]*)/?</pre></div></div>

<p>As a side note, we were able to pinpoint the rule that applied to our URL which made fixing it much easier!</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/powershell-to-test-a-url-against-uag-rulesets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharepoint 2010 ULS logs &#8211; How to keep them in SQL</title>
		<link>http://basementjack.com/uncategorized/sharepoint-2010-uls-logs-how-to-keep-them-in-sql/</link>
		<comments>http://basementjack.com/uncategorized/sharepoint-2010-uls-logs-how-to-keep-them-in-sql/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 23:32:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[ULS]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=392</guid>
		<description><![CDATA[This article shows you how to store your ULS logs in SQL]]></description>
			<content:encoded><![CDATA[<p>This is another &#8220;Wow that was easy!&#8221; SharePoint items&#8230;</p>
<p>Open Central Admin<br />
Go to the Monitoring section, then under &#8220;Timer Jobs&#8221;, select &#8220;Review job definitions&#8221;</p>
<p>There&#8217;s a timer job called &#8220;Diagnostic Data Provider: Trace Log&#8221;</p>
<p>It&#8217;s disabled by default, enable it and it will create new tables and a view on your logging database. (I think by default this is named WSS_Logging)<br />
Leave it enabled (mine is set to run every 10 minutes)</p>
<p>Open SQL server Management studio and connect to your sharepoint DB server.<br />
expand the WSS_Logging DB<br />
Expand Views<br />
Look for the new view called &#8220;ULSTraceLog&#8221;</p>
<p>I usually right click on the view name and &#8220;Select Top 1000 Rows&#8221;<br />
Then from there I can add a where clause to the query thats on screen,<br />
most often it&#8217;s<br />
WHERE CorrelationID = &#8216;abcd-efg-hijk-lmnop-qrstuv&#8217;</p>
<p>Another tip- in the results (which on my system default to the &#8220;grid&#8221; view),<br />
Right Click, Select All, then<br />
Right Click, Copy with headers<br />
you can then paste this into Excel and it&#8217;s pretty readable if you need to email it to someone.</p>
<p>As a side note, I&#8217;ve enabled this on a handful of farms and it seems to auto trim the DB sizes &#8211; so you don&#8217;t need to worry about the DB filling up over time.</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/sharepoint-2010-uls-logs-how-to-keep-them-in-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save/Export/Backup WSP&#8217;s from your SharePoint 2010 Farm</title>
		<link>http://basementjack.com/uncategorized/saveexportbackup-wsps-from-your-sharepoint-2010-farm/</link>
		<comments>http://basementjack.com/uncategorized/saveexportbackup-wsps-from-your-sharepoint-2010-farm/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 19:38:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=379</guid>
		<description><![CDATA[This was so easy, I had to bookmark it here&#8230; Get-SpSolution &#124; forEach-Object { $_.SolutionFile.SaveAs(&#8220;C:\exportedWSP\$($_.Name)&#8221;) } Note that this only exports farm solutions, not sandboxed ones that sit in the content database]]></description>
			<content:encoded><![CDATA[<p>This was so easy, I had to bookmark it here&#8230;</p>
<p>Get-SpSolution | forEach-Object {<br />
  $_.SolutionFile.SaveAs(&#8220;C:\exportedWSP\$($_.Name)&#8221;)<br />
}<br />
Note that this only exports farm solutions, not sandboxed ones that sit in the content database</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/saveexportbackup-wsps-from-your-sharepoint-2010-farm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>User leaves company, comes back, SharePoint is not happy&#8230;</title>
		<link>http://basementjack.com/uncategorized/user-leaves-company-comes-back-sharepoint-is-not-happy/</link>
		<comments>http://basementjack.com/uncategorized/user-leaves-company-comes-back-sharepoint-is-not-happy/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 15:00:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=380</guid>
		<description><![CDATA[If a user&#8217;s Active Directory (AD) account is deleted, then re-added, they will have a different SID and this will cause some trouble in SharePoint. In SharePoint 2007 the fix for this is easy: Stsadm -o migrateuser -oldlogin domain\jsmith -newlogin domain\jjones -ignoresidhistory ]]></description>
			<content:encoded><![CDATA[<p>If a user&#8217;s Active Directory (AD) account is deleted, then re-added, they will have a different SID and this will cause some trouble in SharePoint.</p>
<p>In SharePoint 2007 the fix for this is easy:</p>
<pre><span style="color: #0000ff;">Stsadm -o migrateuser -oldlogin domain\jsmith -newlogin domain\jjones -ignoresidhistory </span></pre>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/user-leaves-company-comes-back-sharepoint-is-not-happy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell script to add a list of users to the site collection administrators group of every site on your SharePoint 2010 farm.</title>
		<link>http://basementjack.com/uncategorized/powershell-script-to-add-a-list-of-users-to-the-site-collection-administrators-group-of-every-site-on-your-sharepoint-2010-farm/</link>
		<comments>http://basementjack.com/uncategorized/powershell-script-to-add-a-list-of-users-to-the-site-collection-administrators-group-of-every-site-on-your-sharepoint-2010-farm/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 02:19:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=377</guid>
		<description><![CDATA[I wanted a way to inject myself as a site collection admin into every site in sharepoint, Note, I&#8217;m not talking about the primary/secondary that you can set in Central admin. I&#8217;m talking about that group you can only get to from within each site itself. Or in this case, with the powershell script below&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted a way to inject myself as a site collection admin into every site in sharepoint, Note, I&#8217;m not talking about the primary/secondary that you can set in Central admin.<br />
I&#8217;m talking about that group you can only get to from within each site itself. Or in this case, with the powershell script below&#8230;<br />
Note that it takes an array of names &#8211; if you have a team of admins or developers that all need access, you can put all their names in the list.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># set site collection owner for all sites...</span>
<span style="color: #008000;"># 1-2012</span>
<span style="color: #008080; font-weight: bold;">Add-PSSnapin</span> Microsoft.SharePoint.PowerShell
&nbsp;
<span style="color: #008000;"># $AccountList is an array of Windows Identities in the format of $AccountList = @(&quot;DOMAIN\USERID&quot; , &quot;DOMAIN\USERID2&quot;)</span>
<span style="color: #800080;">$AccountList</span> <span style="color: pink;">=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;LAB\Jack&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;Lab\tom&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;Lab\dick&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;lab\harry&quot;</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;">#this gets an array of objects representing the sites at the IIS level:</span>
<span style="color: #800080;">$IISSites</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPWebApplication
<span style="color: #0000FF;">Foreach</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$oneIISSite</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$IISSites</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
   <span style="color: #008000;">#using .Sites, we can get a list of the site collections</span>
   <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$SharepointSiteCollection</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$oneIISSite</span>.Sites<span style="color: #000000;">&#41;</span>
   <span style="color: #000000;">&#123;</span>
      <span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #800080;">$SharepointSiteCollection</span>.url <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Cyan
      <span style="color: #800080;">$spweb</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPWeb <span style="color: #800080;">$SharepointSiteCollection</span>.url
&nbsp;
      <span style="color: #008000;">#now we have the website, so lets look at each account in our array</span>
      <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$Account</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$AccountList</span><span style="color: #000000;">&#41;</span>
      <span style="color: #000000;">&#123;</span>
         <span style="color: #008000;">#lets see if the user already exists</span>
         <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;Looking to see if User &quot;</span> <span style="color: #800080;">$account</span> <span style="color: #800000;">&quot; is a member on &quot;</span> <span style="color: #800080;">$SharepointSiteCollection</span>.url <span style="color: #008080; font-style: italic;">-foregroundcolor</span> Blue<span style="color: pink;">&lt;/</span>p<span style="color: pink;">&gt;</span>
         <span style="color: #800080;">$user</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPUSER <span style="color: pink;">-</span>identity <span style="color: #800080;">$Account</span> <span style="color: pink;">-</span>web <span style="color: #800080;">$SharepointSiteCollection</span>.url <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue <span style="color: #008000;">#This will throw an error if the user does not exist</span>
         <span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$user</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$null</span><span style="color: #000000;">&#41;</span>
         <span style="color: #000000;">&#123;</span>
            <span style="color: #008000;">#if the user did NOT exist, then we will add them here.</span>
            <span style="color: #800080;">$SPWeb</span>.ALLUsers.ADD<span style="color: #000000;">&#40;</span><span style="color: #800080;">$Account</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;Added by AdminScript&quot;</span><span style="color: #000000;">&#41;</span>
            <span style="color: #800080;">$user</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPUSER <span style="color: pink;">-</span>identity <span style="color: #800080;">$Account</span> <span style="color: pink;">-</span>web <span style="color: #800080;">$SharepointSiteCollection</span>.url
            <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;Added user $Account to URL $SPWeb.URL&quot;</span> <span style="color: #008080; font-style: italic;">-Foregroundcolor</span> Magenta
         <span style="color: #000000;">&#125;</span>
         <span style="color: #0000FF;">else</span>
         <span style="color: #000000;">&#123;</span>
            <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;user $Account was already in URL &quot;</span> <span style="color: #800080;">$SPWeb</span>.URL <span style="color: #008080; font-style: italic;">-Foregroundcolor</span> DarkGreen
         <span style="color: #000000;">&#125;</span>
         <span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$user</span>.IsSiteAdmin <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$true</span><span style="color: #000000;">&#41;</span>
         <span style="color: #000000;">&#123;</span>
            <span style="color: #800080;">$user</span>.IsSiteAdmin <span style="color: pink;">=</span> <span style="color: #800080;">$true</span>
            <span style="color: #800080;">$user</span>.Update<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
            <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;$account has been made an admin on $SPWeb.URL&quot;</span> <span style="color: #008080; font-style: italic;">-Foregroundcolor</span> Magenta
         <span style="color: #000000;">&#125;</span>
         <span style="color: #0000FF;">else</span>
         <span style="color: #000000;">&#123;</span> 
         <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;$account was already an admin on $SPWeb.URL&quot;</span> <span style="color: #008080; font-style: italic;">-Foregroundcolor</span> DarkGreen
         <span style="color: #000000;">&#125;</span>
     <span style="color: #000000;">&#125;</span>
     <span style="color: #800080;">$SharePointSite</span>.Dispose<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
<p>Here&#8217;s another version of the script, this one also takes an array of top level URL&#8217;s</p>
<p>It&#8217;s handy if you have lots of url&#8217;s on your site and only want to work with a few of them.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
</pre></td><td class="code"><pre class="powershell" style="font-family:monospace;"><span style="color: #008000;"># set site collection owner for all sites...</span>
<span style="color: #008000;"># 1-2012 Jack</span>
&nbsp;
<span style="color: #008080; font-weight: bold;">Add-PSSnapin</span> Microsoft.SharePoint.PowerShell <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue
&nbsp;
<span style="color: #008000;"># $AccountList is an array of Windows Identities in the format of $AccountList = @(&quot;DOMAIN\USERID&quot; , &quot;DOMAIN\USERID2&quot;)</span>
<span style="color: #800080;">$AccountList</span> <span style="color: pink;">=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;LAB\Jack&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;Lab\tom&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;Lab\dick&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;lab\harry&quot;</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;"># $iisSiteList is an array of top level IIS site URLs</span>
<span style="color: #800080;">$iisSiteList</span> <span style="color: pink;">=</span> <span style="color: pink;">@</span><span style="color: #000000;">&#40;</span><span style="color: #800000;">&quot;http://sharepoint2010s/&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;http://sharepoint2010s:8080&quot;</span><span style="color: #000000;">&#41;</span>
&nbsp;
<span style="color: #008000;">#this gets an array of objects representing the sites at the IIS level:</span>
<span style="color: #008000;">## no longer needed.... $IISSites = Get-SPWebApplication</span>
     <span style="color: #0000FF;">Foreach</span><span style="color: #000000;">&#40;</span><span style="color: #800080;">$oneIISSite</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$IISSiteList</span><span style="color: #000000;">&#41;</span>
     <span style="color: #000000;">&#123;</span> 
&nbsp;
  <span style="color: #008000;">#using .Sites, we can get a list of the site collections</span>
  <span style="color: #008000;">#so really what were saying is for each SharepointSiteCollection</span>
&nbsp;
   <span style="color: #008000;">#this code is altered a bit, since we're using an array of top level site names.</span>
   <span style="color: #008000;"># we need to use (Get-SPWebApplication $oneIISSite).Sites</span>
  <span style="color: #008000;"># which is the same as $sitelist = Get-SPWebApplication $oneIISSite</span>
 <span style="color: #008000;">#                      $sitelist.sites</span>
  <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$SharepointSiteCollection</span> <span style="color: #0000FF;">in</span> <span style="color: #000000;">&#40;</span>Get<span style="color: pink;">-</span>SPWebApplication <span style="color: #800080;">$oneIISSite</span><span style="color: #000000;">&#41;</span>.Sites<span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#123;</span>
       <span style="color: #008080; font-weight: bold;">write-host</span> <span style="color: #800080;">$SharepointSiteCollection</span>.url <span style="color: #008080; font-style: italic;">-ForegroundColor</span> Cyan
&nbsp;
       <span style="color: #800080;">$spweb</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPWeb <span style="color: #800080;">$SharepointSiteCollection</span>.url
&nbsp;
       <span style="color: #008000;">#now we have the website, so lets look at each account in our array</span>
       <span style="color: #0000FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$Account</span> <span style="color: #0000FF;">in</span> <span style="color: #800080;">$AccountList</span><span style="color: #000000;">&#41;</span>
       <span style="color: #000000;">&#123;</span>
           <span style="color: #008000;">#lets see if the user already exists</span>
           <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;Looking to see if User &quot;</span> <span style="color: #800080;">$account</span> <span style="color: #800000;">&quot; is a member on &quot;</span> <span style="color: #800080;">$SharepointSiteCollection</span>.url <span style="color: #008080; font-style: italic;">-foregroundcolor</span> Blue
&nbsp;
           <span style="color: #800080;">$user</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPUSER <span style="color: pink;">-</span>identity <span style="color: #800080;">$Account</span> <span style="color: pink;">-</span>web <span style="color: #800080;">$SharepointSiteCollection</span>.url <span style="color: #008080; font-style: italic;">-ErrorAction</span> SilentlyContinue <span style="color: #008000;">#This will throw an error if the user does not exist</span>
           <span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$user</span> <span style="color: #FF0000;">-eq</span> <span style="color: #800080;">$null</span><span style="color: #000000;">&#41;</span>
           <span style="color: #000000;">&#123;</span> <span style="color: #008000;">#if the user did NOT exist, then we will add them here.</span>
               <span style="color: #800080;">$SPWeb</span>.ALLUsers.ADD<span style="color: #000000;">&#40;</span><span style="color: #800080;">$Account</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;&quot;</span><span style="color: pink;">,</span> <span style="color: #800000;">&quot;Added by AdminScript&quot;</span><span style="color: #000000;">&#41;</span>
               <span style="color: #800080;">$user</span> <span style="color: pink;">=</span> Get<span style="color: pink;">-</span>SPUSER <span style="color: pink;">-</span>identity <span style="color: #800080;">$Account</span> <span style="color: pink;">-</span>web <span style="color: #800080;">$SharepointSiteCollection</span>.url
                <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;Added user $Account to URL $SPWeb.URL&quot;</span> <span style="color: #008080; font-style: italic;">-Foregroundcolor</span> Magenta
           <span style="color: #000000;">&#125;</span>
            <span style="color: #0000FF;">else</span>
           <span style="color: #000000;">&#123;</span>
                <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> DarkGreen <span style="color: #800000;">&quot;user $Account was already in URL &quot;</span> <span style="color: #800080;">$SPWeb</span>.URL
           <span style="color: #000000;">&#125;</span>
&nbsp;
           <span style="color: #0000FF;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #800080;">$user</span>.IsSiteAdmin <span style="color: #FF0000;">-ne</span> <span style="color: #800080;">$true</span><span style="color: #000000;">&#41;</span>
           <span style="color: #000000;">&#123;</span>
             <span style="color: #800080;">$user</span>.IsSiteAdmin <span style="color: pink;">=</span> <span style="color: #800080;">$true</span>
             <span style="color: #800080;">$user</span>.Update<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
             <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #800000;">&quot;$account has been made an admin on $SPWeb.URL&quot;</span> <span style="color: #008080; font-style: italic;">-Foregroundcolor</span> Magenta
           <span style="color: #000000;">&#125;</span>
           <span style="color: #0000FF;">else</span>
           <span style="color: #000000;">&#123;</span>
             <span style="color: #008080; font-weight: bold;">Write-host</span> <span style="color: #008080; font-style: italic;">-ForegroundColor</span> DarkGreen <span style="color: #800000;">&quot;$account was already an admin on $SPWeb.URL&quot;</span>
           <span style="color: #000000;">&#125;</span>
       <span style="color: #000000;">&#125;</span>
  <span style="color: #800080;">$SharepointSiteCollection</span>.Dispose<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
  <span style="color: #000000;">&#125;</span> 
<span style="color: #000000;">&#125;</span></pre></td></tr></table></div>

<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/powershell-script-to-add-a-list-of-users-to-the-site-collection-administrators-group-of-every-site-on-your-sharepoint-2010-farm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perms needed for an account to deploy code in sharepoint 2010</title>
		<link>http://basementjack.com/uncategorized/perms-needed-for-an-account-to-deploy-code-in-sharepoint-2010/</link>
		<comments>http://basementjack.com/uncategorized/perms-needed-for-an-account-to-deploy-code-in-sharepoint-2010/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 20:28:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Sharepoint]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=371</guid>
		<description><![CDATA[-user must be local admin on box -user must be in farm admin group in SP -user must be in sharepoint_shell_access role on SQL server on Sharepoint_config db -user must have dbo role on each content db being accessed (Sharepoint_shell_access role only exists on sharepoint_Config- this is ok)]]></description>
			<content:encoded><![CDATA[<p>-user must be local admin on box<br />
-user must be in farm admin group in SP<br />
-user must be in sharepoint_shell_access role on SQL server on Sharepoint_config db<br />
-user must have dbo role on each content db being accessed (Sharepoint_shell_access role only exists on sharepoint_Config- this is ok)</p>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/perms-needed-for-an-account-to-deploy-code-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PDF&#8217;s not opening in browser from a sharepoint 2010 site?</title>
		<link>http://basementjack.com/uncategorized/pdfs-not-opening-in-browser-from-a-sharepoint-2010-site/</link>
		<comments>http://basementjack.com/uncategorized/pdfs-not-opening-in-browser-from-a-sharepoint-2010-site/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 17:29:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint2010]]></category>

		<guid isPermaLink="false">http://basementjack.com/?p=352</guid>
		<description><![CDATA[I had this problem enough times that I wanted to capture the solution. First of all, credit goes to Craig Lussier on the Technet forms, his post has the full solution and background. http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/2f66404e-5193-46d3-b6b1-45cf72410432?prof=required I used the above solution and it worked great. I also found a script that I did not try. The script [...]]]></description>
			<content:encoded><![CDATA[<p>I had this problem enough times that I wanted to capture the solution.</p>
<p>First of all, credit goes to Craig Lussier on the Technet forms, his post has the full solution and background.</p>
<p><a title="Technet Forums." href="http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/2f66404e-5193-46d3-b6b1-45cf72410432?prof=required" target="_blank">http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/2f66404e-5193-46d3-b6b1-45cf72410432?prof=required</a></p>
<p>I used the above solution and it worked great.</p>
<p>I also found a script that I did not try. The script is described as being able to change this setting system wide by looping through each document library in each subsite of a given site &#8211; it could come in handy. (the script is by the same poster &#8211; Craig Lussier &#8211; Thanks Craig!</p>
<p><a href="http://gallery.technet.microsoft.com/scriptcenter/Set-SPDocumentLibrary-0426781c">http://gallery.technet.microsoft.com/scriptcenter/Set-SPDocumentLibrary-0426781c</a></p>
<blockquote>
<div>
<div>
<p>The code below is from the first link above, I&#8217;ve copied it here in case MS ever changes the link structure and the original post can&#8217;t be found. </p>
</div>
</div>
</blockquote>
<div>
<div>
<div>
<pre># SPAssignment
$gc = Start-SPAssignment

#Get Web
$web = $gc | Get-SPWeb "http://yourspweburl"

#Get Document Library
$docLib = $web.lists["Your Document Library Title"]

#View all properties/methods of the Document Library and you'll see that BrowserFileHandling is a property
$docLib | Get-Member

#See the current BrowserFileHandling setting for the Document Library
$docLib.BrowserFileHandling

#If you need to change it from Strict to Permissive
$docLib.BrowserFileHandling = "Permissive"
$docLib.Update()

# End SPAssgment
$gc | Stop-SPAssignment</pre>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://basementjack.com/uncategorized/pdfs-not-opening-in-browser-from-a-sharepoint-2010-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

