<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SharePoint - Inside The Lines</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:48:15 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Get Site Collection Size with PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/get-site-collection-size-with-powershell</link>
      <pubDate>Tue, 08 Sep 2015 11:45:49 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Bushnell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepoint_-_inside_the_lines/2015/09/08/get-site-collection-size-with-powershell/</guid>
      <description><![CDATA[Working with a customer recently I was asked to write a PowerShell script to get the site collection...]]></description>
      <content:encoded><![CDATA[<p>Working with a customer recently I was asked to write a PowerShell script to get the site collection size per content database.&nbsp; The script is pretty quick to run typically and can give an added benefit of allowing you to track growth over time if you don&#39;t remove the file from the server.&nbsp;</p>
<p><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">Add-PSSnapin</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;">microsoft.sharepoint.powershell</span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeLog</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;D:\temp\SPSiteSize.csv&quot;</span></span></span></p>
<p>############################################################</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$CurrentDate</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">Get-Date</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;">-format</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;">d</span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$WebApps</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">Get-SPWebApplication</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span></p>
<p><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;">foreach</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">(</span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$WebApp</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;">in</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$WebApps</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">)</span></span></p>
<p>{</p>
<p style="margin-left:30px;"><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Sites</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">Get-SPSite</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;">-WebApplication</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$WebApp</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;">-Limit</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;">All</span></span></span></p>
<p style="margin-left:30px;"><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;">foreach</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">(</span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;">in</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Sites</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">)</span></span></p>
<p style="margin-left:30px;">{</p>
<p style="margin-left:60px;"><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeInKB</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Usage</span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Storage</span></span></p>
<p style="margin-left:60px;"><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeInGB</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeInKB</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">/</span></span></span><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;">1024</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">/</span></span></span><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;">1024</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">/</span></span></span><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;">1024</span></span></span></p>
<p style="margin-left:60px;"><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeInGB</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">[</span></span></span><span style="color:#008080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#008080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#008080;font-family:Lucida Console;font-size:xx-small;">math</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">]::</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Round(</span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeInGB</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">,</span></span></span><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#800080;font-family:Lucida Console;font-size:xx-small;">2</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">)</span></span></p>
<p style="margin-left:60px;"><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$CSVOutput</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">RootWeb</span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Title </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;*&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">URL </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;*&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">ContentDatabase</span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Name </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;*&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeInGB</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;*&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$CurrentDate</span></span></span></p>
<p style="margin-left:60px;"><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$CSVOutput</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">|</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">Out-File</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SizeLog</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;">-Append</span></span></span></p>
<p style="margin-left:30px;">}</p>
<p>}</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Dispose()</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Automating Managed Password Change Using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/automating-managed-password-change-using-powershell</link>
      <pubDate>Fri, 25 Apr 2014 09:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Bushnell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepoint_-_inside_the_lines/2014/04/25/automating-managed-password-change-using-powershell/</guid>
      <description><![CDATA[Wanted to share a script I wrote a couple months ago for another PFE to create random passwords, log...]]></description>
      <content:encoded><![CDATA[<p>Wanted to share a script I wrote a couple months ago for another PFE to create random passwords, log them to a text file and change&nbsp;a SharePoint&nbsp;managed account.&nbsp;</p>
<p></p>
<p>#Identify the account to change<br />$Account = &quot;contoso\svcSPExcel&quot;<br />$ManagedAccount = Get-SPManagedAccount $Account</p>
<p>#Generate the Random Password<br />$rand = New-Object System.Random<br />#Generate a new 20 character password<br />$pwd = &quot;&quot;<br />1..20 | ForEach { $pwd = $pwd + [char]$rand.next(33,127) }</p>
<p>#Set the Password as a secure string<br />$securePassword = ConvertTo-SecureString -String $pwd -AsPlainText -Force</p>
<p>#Log the Change prior to the change<br />$Text = &quot;SharePoint Managed Account Password Changed for: &quot; + $Account + &quot; to &quot; + $pwd<br />Add-Content c:\temp\PasswordChanges.log $Text<br />#Reset the Password<br />Set-SPManagedAccount -Identity $ManagedAccount &ndash;Password $securePassword -Confirm:$false<br />#Repeat lines 1-18 for each managed account you want to change.</p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Search Error:  Event ID 2548 - Content plugin can not be initialized - list of CSS addresses</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/sharepoint-2013-search-error-event-id-2548-content-plugin-can-not-be-initialized-list-of-css-addresses</link>
      <pubDate>Tue, 25 Mar 2014 10:31:59 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Bushnell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepoint_-_inside_the_lines/2014/03/25/sharepoint-2013-search-error-event-id-2548-content-plugin-can-not-be-initialized-list-of-css-addresses/</guid>
      <description><![CDATA[While working with a customer and provisioning Search&nbsp;they were getting a strange error that...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family:Calibri;font-size:medium;">While working with a customer and provisioning Search&nbsp;they were getting a strange error that was causing the topology not to activate.&nbsp; It just stayed in a hanging state and in the Windows Application log there were errors: Event ID 2548 -&nbsp;&quot;Content plugin can not be initialized - list of CSS addresses.&quot;&nbsp; After a little research and testing&nbsp;I figured out&nbsp;the problem was really&nbsp;easy to&nbsp;fix.&nbsp; We granted the WSS_WPG and WSS_Admin_WPG groups Full Control permissions to the path where the Search Index would live.&nbsp; After&nbsp;we made the change the topology activation finished without issues.&nbsp; We did a quick reboot and the server came back up without errors.&nbsp; </span></p>
<p><span style="font-family:Calibri;font-size:medium;">As for the script used to provision search, see </span><a href="/b/sharepoint_-_inside_the_lines/archive/2013/08/07/sharepoint-2013-search-configuration-powershell-script.aspx"><span style="color:#0563c1;font-family:Calibri;font-size:medium;">this post</span></a><span style="font-family:Calibri;font-size:medium;">.</span></p>
<p><span style="font-family:Times New Roman;font-size:medium;"> </span></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint Site Redirection Using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/sharepoint-site-redirection-using-powershell</link>
      <pubDate>Thu, 20 Mar 2014 10:55:38 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Bushnell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepoint_-_inside_the_lines/2014/03/20/sharepoint-site-redirection-using-powershell/</guid>
      <description><![CDATA[Working with a customer this week there was a desire to create a script to redirect users from one...]]></description>
      <content:encoded><![CDATA[<p>Working with a customer this week there was a desire to create a script to redirect users from one site to another (mostly because we had several sites to do this to).&nbsp; While there are many ways to accomplish this such as IIS or using the Content Editor Web Part with a traditional redirect script, SharePoint also provides a redirect page content type that provides this functionality.&nbsp; Below is an example script we created to achieve the creation of the old site URL, create a redirect page with the property that redirects to the new site and sets the redirect page as the home page of the site.</p>
<p></p>
<p><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">Add-PSSnapin</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8a2be2;font-family:Lucida Console;font-size:xx-small;">Microsoft.SharePoint.PowerShell</span></span></span></p>
<p>#Setup Site String Variables</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;http://intranet.contoso.com/sites/Proj/&quot;</span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SiteName</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;Project1&quot;</span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$site1</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$site</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">+</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SiteName</span></span></span></p>
<p>#Specify the site to redirect to</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site1Redirect</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;http://intranet.contoso.com/PM/Projects/Project1&quot;</span></span></span></p>
<p>#create the old site in the new environment to redirect from</p>
<p><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">new-spweb</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;">-url</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$site1</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;">-Template</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;CMSPublishing#0&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#000080;font-family:Lucida Console;font-size:xx-small;">-Name</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$SiteName</span></span></span></p>
<p>#Create Redirect Page</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$s1</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">get-spweb</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$site1</span></span></span></p>
<p>#Finds the appropriate page layout</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$pubWeb</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">[</span></span></span><span style="color:#008080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#008080;font-family:Lucida Console;font-size:xx-small;"><span style="color:#008080;font-family:Lucida Console;font-size:xx-small;">Microsoft.SharePoint.Publishing.PublishingWeb</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">]::</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">GetPublishingWeb(</span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$s1</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">)</span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$pl</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$pubWeb</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">GetAvailablePageLayouts() </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">|</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;"><span style="color:#0000ff;font-family:Lucida Console;font-size:xx-small;">Where</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> { </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$_</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Name </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">-eq</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&ldquo;redirectpagelayout.aspx&rdquo;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">}</span></span></p>
<p>#Create New Page</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$newPage</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$pubWeb</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">AddPublishingPage(</span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;Redirect.aspx&quot;</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">,</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$pl</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">) </span></span><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;">#filename need end with .aspx extension</span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$newPage</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Update()</span></span></p>
<p> </p>
<p>#Get the docs from the Pages library and store in variable</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$list</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$s1</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">lists</span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">[</span></span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;Pages&quot;</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">]</span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$items</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$list</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">items</span></span></p>
<p>#Go through all items and update the redirect page to point to the proper</p>
<p><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;">foreach</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">(</span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$item</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;">in</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$items</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">)</span></span></p>
<p>{</p>
<p><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;">#If the &quot;Name&quot; column value equals &quot;Redirect.aspx&quot; </span></span></span></p>
<p><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;"><span style="color:#00008b;font-family:Lucida Console;font-size:xx-small;">if</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">(</span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$item</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">[</span></span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;Name&quot;</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">]</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">-eq</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;Redirect.aspx&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">)</span></span></p>
<p>{</p>
<p><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;">#Change the value of the &quot;Redirect URL&quot; column</span></span></span></p>
<p><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$item</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">[</span></span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;Redirect URL&quot;</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">]</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$Site1Redirect</span></span></span></p>
<p><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;"><span style="color:#006400;font-family:Lucida Console;font-size:xx-small;">#Update the item</span></span></span></p>
<p><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$item</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Update()</span></span></p>
<p>}</p>
<p>}</p>
<p>#Check the file in and publish it</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$newPage</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">CheckIn(</span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&ldquo;Created by PowerShell&rdquo;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">);</span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$newPage</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">ListItem</span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">File</span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">Publish(</span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;&quot;</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">)</span></span></p>
<p> </p>
<p>#Configure Redirect Page as Home Page for each site</p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$HomeDL</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$s1</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">RootFolder</span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$HomeDL</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">WelcomePage </span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">=</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;"> </span></span><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;"><span style="color:#8b0000;font-family:Lucida Console;font-size:xx-small;">&quot;Pages/Redirect.aspx&quot;</span></span></span></p>
<p><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;"><span style="color:#ff4500;font-family:Lucida Console;font-size:xx-small;">$HomeDL</span></span></span><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;"><span style="color:#a9a9a9;font-family:Lucida Console;font-size:xx-small;">.</span></span></span><span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">update()</span></span></p>
<p></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Search Configuration PowerShell Script</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/sharepoint-2013-search-configuration-powershell-script</link>
      <pubDate>Wed, 07 Aug 2013 05:43:12 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Bushnell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepoint_-_inside_the_lines/2013/08/07/sharepoint-2013-search-configuration-powershell-script/</guid>
      <description><![CDATA[So last month I promised some customers I would post mysearch script for 2013 and as life would have...]]></description>
      <content:encoded><![CDATA[<p>So last month I promised some customers I would post my<br />search script for 2013 and as life would have it, August came before I got to<br />it so here it is&hellip;. Better late than never.&nbsp;<br />While this script is pretty basic as far as provisioning Search for<br />SharePoint 2013 goes it does address two things I always try to do when I provision<br />search that I don&rsquo;t often see. &nbsp;First, it<br />is designed to use two different service accounts, one for the administration<br />application pool and the other for the query application pool.&nbsp; Second, at the end of the script I put in a<br />piece that sets the content access account to another account which follows<br />best practice.&nbsp;</p>
<p>This particular code is designed for a standard 3 tier farm<br />that has an Application, Web and Database server.&nbsp; The idea of the code is to put most of the<br />Search roles on the Application server.&nbsp;<br />The roles going on the Web server are related to the Query Role and<br />Index.&nbsp;</p>
<p>Script:</p>
<p>#Setup Variables - Assume 2 Servers (App &amp; Web)</p>
<p>#Assume 3 Accounts (Content Access, Admin, Query)</p>
<p>#### Note - You should setup the Index Location prior to<br />running these commands and ensure it is an empty folder</p>
<p>#### Note - If you setup diag logging prior to running<br />script, ensure you give dbo permissions to the account you run this under</p>
<p>write-host 0. Setting up some initial variables.</p>
<p>$AppSvr = "SPApp2013"</p>
<p>$WebSvr = "SPWeb2013"</p>
<p>$CAAcct = "campbushnell\svcSPSearchCA"</p>
<p>$password = "ZAQ!2wsx"</p>
<p>$CAAcctPW = ConvertTo-SecureString -String $password<br />-AsPlainText -Force</p>
<p>$AdminAcct = "campbushnell\svcSPSearchA"</p>
<p>$QueryAcct = "campbushnell\svcSPSearchQ"</p>
<p>$SSAName = "EnterpriseSearch"</p>
<p>$SSIAppSvr = get-SPServiceInstance -server $AppSvr |<br />?{$_.TypeName -eq "SharePoint Server Search"}</p>
<p>$SSIWebSvr = get-SPServiceInstance -server $WebSvr |<br />?{$_.TypeName -eq "SharePoint Server Search"}</p>
<p>$IndexLocation = "C:\SPIndexLocation"</p>
<p>$err = $null</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Start Services for SSI</p>
<p>write-host 1. Start Services search services for Each Server</p>
<p>Start-SPEnterpriseSearchServiceInstance -Identity $SSIAppSvr</p>
<p>Start-SPEnterpriseSearchServiceInstance -Identity $SSIWebSvr</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Create Application Pools</p>
<p>write-host 2. Create a Application Pools</p>
<p>$AdminAppPool = new-SPServiceApplicationPool -name<br />$SSAName"-AdminAppPool" -account $AdminAcct&nbsp;</p>
<p>$QueryAppPool = new-SPServiceApplicationPool -name<br />$SSAName"-QueryAppPool" -account $QueryAcct</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Create Search Service Application</p>
<p>write-host 3. Create the SearchApplication and set it to a<br />variable</p>
<p>$SearchApp = New-SPEnterpriseSearchServiceApplication -Name<br />$SSAName -applicationpool $AdminAppPool -databasename<br />$SSAName"_AdminDB"</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Create Search Service Application Proxy</p>
<p>write-host 4. Create search service application proxy</p>
<p>$SSAProxy = new-spenterprisesearchserviceapplicationproxy<br />-name $SSAName"ApplicationProxy" -SearchApplication $SearchApp</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Clone Search Topology (this is empty by default)</p>
<p>write-host 5. Clone Search Topology</p>
<p>$SearchTopology = $SearchApp.ActiveTopology.Clone()</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Provision Search Administration Component</p>
<p>write-host 6. Provision Search Admin Component.</p>
<p>New-SPEnterpriseSearchAdminComponent -SearchServiceInstance<br />$SSIAppSvr -SearchTopology $SearchTopology</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Provision New Search Content Processing Component</p>
<p>write-host 7. Create New Search Content Processing Component</p>
<p>New-SPEnterpriseSearchContentProcessingComponent<br />-SearchServiceInstance $SSIAppSvr -SearchTopology $SearchTopology</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Provision New Search Analytics Processing Component</p>
<p>write-host 8. Create New Search Analytics Processing<br />Component</p>
<p>New-SPEnterpriseSearchAnalyticsProcessingComponent<br />-SearchServiceInstance $SSIAppSvr -SearchTopology $SearchTopology</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Provision New Search Crawl Component</p>
<p>write-host 9. Create New Search Crawl Component</p>
<p>New-SPEnterpriseSearchCrawlComponent -SearchServiceInstance<br />$SSIAppSvr -SearchTopology $SearchTopology</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Provision New Search Index Component</p>
<p>write-host 10. Create New Search Index Component</p>
<p>New-SPEnterpriseSearchIndexComponent -SearchServiceInstance<br />$SSIWebSvr -SearchTopology $SearchTopology -RootDirectory $IndexLocation</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Provison New Query Processing Component</p>
<p>write-host 11. Create New Query Processing Component</p>
<p>New-SPEnterpriseSearchQueryProcessingComponent<br />-SearchServiceInstance $SSIWebSvr -SearchTopology $SearchTopology</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Activate Topology Changes</p>
<p>write-host 12. Activate Topology</p>
<p>$SearchTopology.Activate()</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>#Setup default Content Access Account</p>
<p>write-host 13. Set the default content access account</p>
<p>Set-SPEnterpriseSearchServiceApplication &ndash;Identity<br />$SearchApp -ApplicationPool $QueryAppPool -DefaultContentAccessAccountName<br />$CAAcct -DefaultContentAccessAccountPassword $CAAcctPW</p>
<p>&nbsp;</p>
<p>Write-host "Your search application $SSAName is now<br />ready"</p>
<p>&nbsp;</p>
<p>One last note with this script, it is designed for smaller<br />farms and if a large search farm is being created more configuration will be<br />required to ensure you get the performance you are looking for.</p>]]></content:encoded>
    </item>
    <item>
      <title>404 &amp; 401 Errors with the App Management Service</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/404-401-errors-with-the-app-management-service</link>
      <pubDate>Sun, 23 Jun 2013 23:27:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Bushnell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepoint_-_inside_the_lines/2013/06/23/404-401-errors-with-the-app-management-service/</guid>
      <description><![CDATA[I recently was testing out the configuration of the App Management Service in SharePoint 2013.&nbsp;...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri; font-size: small;">I recently was testing out the configuration of the App Management Service in SharePoint 2013.&nbsp; For the most part I followed the </span><a href="http://technet.microsoft.com/en-us/library/fp161236.aspx"><span style="color: #0563c1; font-family: Calibri; font-size: small;">TechNet article</span></a><span style="font-size: small;"><span style="font-family: Calibri;"> on the steps but because I like to create scripts I can share with customers I did the configuration in PowerShell.&nbsp; Below is the script which not only creates the App Management Service but also the Subscription Service which is required by the App Management Service.&nbsp; (If you use this script make sure you setup your service accounts as managed accounts first)&nbsp; I also like to get my DNS Forward Lookup Zone and wildcard CNAME alias created before running the script in case the AD/DNS guys have any changes they want to suggest.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">To setup the DNS forward lookup zone and wildcard CNAME alias I followed the TechNet article I already referenced but in case you are following this post instead of that I&rsquo;ll quickly rehash it.&nbsp; First, open <strong>DNS</strong> then right click <strong>Forward Lookup Zone</strong> and click <strong>New Zone</strong>.&nbsp; When going through the wizard click Next to start it then select <strong>Primary Zone</strong> and click Next.&nbsp; Then choose if it is at the <strong>Forest or the Domain</strong>, in my case it doesn&rsquo;t matter so I chose Domain and then click Next.&nbsp; Next you will provide a name for your zone (CampBushnellApps.lcl &ndash; This will become the $AppDomain variable in the script below).&nbsp; Once that&rsquo;s done I use the defaults through the rest of the wizard and click Finish to create.&nbsp; </span></span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/5584.DNS1.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/5584.DNS1.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/5584.DNS1.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/5584.DNS1.jpg" alt="" border="0" /></a></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Now I can create the wildcard CNAME alias.&nbsp; To do so I select the newly created forward lookup zone and right click and select <strong>new Alias (CNAME)</strong>.&nbsp; In the New Resource Record window I type * for the Alias Name and the WFE FQDN for the FQDN field (in this case SPWeb2013.campbushnell.lcl).&nbsp; If I wanted to use a load balanced URL (DNS A Record) instead I could do that instead of pointing directly at the WFE.&nbsp; This can work great for abstracting the server name or in the case that I have multiple WFEs.&nbsp; &nbsp;</span></span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/1007.DNS2.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/1007.DNS2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/1007.DNS2.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/1007.DNS2.jpg" alt="" border="0" /></a></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Now that the DNS side of the house is configured, I run my script&hellip; &nbsp;(The first section of the scripts I write I always setup my variables for use in the script which is great for multiple farms)</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Create Variables</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 0. Setup Variables</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$AMAcct = Get-SPManagedAccount "campbushnell\svcSPApps" #App Management Service Account</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$SSAcct = Get-SPManagedAccount "campbushnell\svcSPSubscript" #Subscription Settings Service Account</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$SubServiceName = "Subscription Settings Service"</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$AppServiceName = "App Management Service"</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$SubDBName = "SubscriptionSettingsServiceDB"</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$AppDBName = "AppServiceDB"</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$AppSvr = "SPApp2013"</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$AppDomain = "CampBushnellApps.lcl"</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$AppPrefix = "apps"</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Start the Subscription Settings Service and App Management Service</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 1. Subscription Settings Service and App Management Service</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$SubServiceInstance = get-SPServiceInstance -server $AppSvr | ?{$_.TypeName -eq "Microsoft SharePoint Foundation Subscription Settings Service"}</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Start-SPServiceInstance -Identity $SubServiceInstance</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$AppServiceInstance = get-SPServiceInstance -server $AppSvr | ?{$_.TypeName -eq "App Management Service"}</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Start-SPServiceInstance -Identity $AppServiceInstance</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Create Subscription Settings Service App Pool</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 2. Configure Subscription Settings Service App Pool</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$appPoolSubSvc = New-SPServiceApplicationPool -Name $SubServiceName-"AppPool" -Account $SSAcct</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Create Subscription Settings Service App</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 3. Configure Subscription Settings Service App</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$appSubSvc = New-SPSubscriptionSettingsServiceApplication &ndash;ApplicationPool $appPoolSubSvc &ndash;Name $SubServiceName &ndash;DatabaseName $SubDBName</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Create Subscription Settings Service App Proxy</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 4. Configure Subscription Settings Service App Proxy</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy &ndash;ServiceApplication $appSubSvc</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Create App Management Service App Pool</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 5. Configure App Management Service App Pool</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$appPoolAppSvc = New-SPServiceApplicationPool -Name $AppServiceName-"AppPool" -Account $AMAcct</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Create App Management Service App</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 6. Configure App Management Service App</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name $AppServiceName -DatabaseName $AppDBName</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Create App Management Service App Proxy</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 7. Configure App Management Service App Proxy</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">#Configure App URLs</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">write-host 8. Configure App URLs</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Set-SPAppDomain $AppDomain</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Set-SPAppSiteSubscriptionName -Name $AppPrefix -Confirm:$false</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">On occasion I have had step 8 of my script fail because SharePoint is still provisioning the service application and cannot setup the URLs.&nbsp; In those cases I simply manually setup the required variables and rerun the two lines of code for step 8.&nbsp; Once that is created I should be able to open Central Admin and access the Apps section. &nbsp;In this area I am going to verify my App Domain and App Prefix are set to my variables by selecting Configure App URLs.&nbsp; </span></span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/6278.AppURL.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/6278.AppURL.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/6278.AppURL.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/6278.AppURL.jpg" alt="" border="0" /></a></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">After I have verified that I go configure my App Catalog for the web application by selecting Manage App Catalog.&nbsp; Because it is new I have to create one for the web application.&nbsp; The process is much like creating a new site collection.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">After that there is one more step to take to allow my web application to access apps from the SharePoint store, I need to activate the<strong> Apps that require accessible internet facing endpoints </strong>feature.&nbsp; To do so I browse to Application Management </span>&agrave;<span style="font-family: Calibri;"> Manage Web Applications </span>&agrave;<span style="font-family: Calibri;"> select my web application and select Manage Features in the ribbon.&nbsp; Then I activate the feature.</span></span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/6305.WebAppFeatures.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/6305.WebAppFeatures.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/6305.WebAppFeatures.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/6305.WebAppFeatures.jpg" alt="" border="0" /></a></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">At this point I am able to add apps from the SharePoint store to a SharePoint page!!!&nbsp; But when I go and test the app on the page it bombs with &ldquo;page cannot be displayed&rdquo; error messages in the web part!&nbsp; What gives!?!&nbsp; Well after some Fiddler traces I found 404 errors. </span></span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/7875.404Error.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/7875.404Error.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/7875.404Error.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/7875.404Error.jpg" alt="" border="0" /></a></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">As it turns out the default website is picking up the app and trying to respond for it rather than redirecting to a SharePoint web application.&nbsp; First I attempted to fix this by disabling the default web site in IIS on my WFE.&nbsp; Not the fix so I re-enabled it (not because it is doing anything but because I like to keep things as close to out of the box as I can, especially for testing purposes).&nbsp; So instead I change the binding on my web application to pick up anything on port 80 (which is what my site is using).&nbsp; When I test again I get prompted for credentials so I put them in and continue to get prompted.&nbsp;</span></span>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/5621.401Error.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/5621.401Error.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/5621.401Error.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/5621.401Error.jpg" alt="" border="0" /></a></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">What is with the prompting for credentials?&nbsp; I quickly test again and this time my Fiddler trace shows me 401 errors.&nbsp; First I wonder if it is a loopback issue so I disabled loopback and after my first prompt it accepts my credentials and my app works!&nbsp; </span></span></p>
<p><span style="font-family: Calibri; font-size: small;">To disable loopback if you aren&rsquo;t familiar, open the registry and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA and create a new DWORD (32-bit) Value with a name of DisableLoopbackCheck and set the value to 1.&nbsp; Restart the server after the change to ensure it takes effect.&nbsp; Reference article </span><a href="http://support.microsoft.com/kb/896861"><span style="color: #0563c1; font-family: Calibri; font-size: small;">KB 896861</span></a></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">But I know that prompting credentials on page load isn&rsquo;t going to fly in the real world so how can I fix it?&nbsp; Well, to be honest it so simple I almost didn&rsquo;t try it&hellip; all I did was add the App Domain (*.CampBushnell.lcl) to my trusted sites and configured trusted sites to pass credentials.&nbsp; (I would recommend that be part of a group policy rather than setup on individual computers)&nbsp; I did take the Loopback out again and found that it still kept prompting for credentials so it definitely is part of the fix here.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/6567.TrustedSites.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/6567.TrustedSites.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/6567.TrustedSites.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/350x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/6567.TrustedSites.jpg" alt="" border="0" /></a>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/1007.TrustedSites2.jpg" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/1007.TrustedSites2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/1007.TrustedSites2.jpg" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/1007.TrustedSites2.jpg" alt="" border="0" /></a></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">As an aside in case you are using Kerberos with your web application&hellip; I spent several hours working through issues with this while using a Kerberos web application and found consistent prompting that neither of the above solutions resolved.&nbsp; In fact, the only way I have found around it so far for a web application using Kerberos is to setup a separate web application that is NTLM and setup the IIS binding to it rather than the Kerberos based web application.&nbsp; I still needed to trust the domain and forward credentials but after I did that the prompting issue stopped. &nbsp;</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 With SSRS 2012 And Constrained Delegation</title>
      <link>https://docs.microsoft.com/archive/blogs/sharepoint_-_inside_the_lines/sharepoint-2013-with-ssrs-2012-and-constrained-delegation</link>
      <pubDate>Tue, 28 May 2013 09:31:34 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Bushnell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/sharepoint_-_inside_the_lines/2013/05/28/sharepoint-2013-with-ssrs-2012-and-constrained-delegation/</guid>
      <description><![CDATA[I often get asked about how to configure the SharePoint 2013 BI stack (Excel Services,...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;"><span style="font-family: Calibri;">I often get asked about how to configure the SharePoint 2013 BI stack (Excel Services, PerformancePoint and SSRS 2012 integrated mode).&nbsp; To do this configuration Kerberos with constrained delegation is required and often this is the most tricky and unclearly documented piece.&nbsp; In this post I hope to provide some insight into the steps to configure these pieces.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">First, I will assume that SharePoint 2013 is installed and for the purposes of my test environment I have set a domain controller, a SQL 2012 server, and two SharePoint 2013 servers (Application and Web).&nbsp; </span></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/8081.FarmArchitecture.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/8081.FarmArchitecture.gif"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/8081.FarmArchitecture.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/108x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/8081.FarmArchitecture.gif" alt="" border="0" /></a>&nbsp;</p>
<p><span style="font-family: Calibri; font-size: small;">So the first step I will suggest taking is to install SQL 2012 SP1 on the SQL server as well as the patch from </span><a href="http://support.microsoft.com/kb/2793634"><span style="color: #0563c1; font-family: Calibri; font-size: small;">KB 2793634</span></a><span style="font-size: small;"><span style="font-family: Calibri;">.&nbsp; Without doing this step SharePoint will not show the SQL Reporting Services Service Application when you try to create it in Central Admin and it will not initialize the service in SharePoint.&nbsp; If you have already run into that step because you installed SSRS on SharePoint first, don&rsquo;t worry; install SP1 for SQL 2012 and the patch on the SQL server and on your SharePoint servers (Yes, I did say your SharePoint servers &ndash; When you put SSRS in your farm they have SQL bits on them).</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Once you have installed the patches I typically install SSRS on my SharePoint servers next.&nbsp; In the case of this small three server farm the Application server (SPApp2013) will become the server where I plan to run the SSRS engine but the Web server (SPWeb2013) will also get the SSRS add-in installed on it.&nbsp; If I was running more servers in the farm I would need to install the add-in there as well and if I was wanting to have a load balanced SSRS service application I would install the SSRS engine on another server as well.&nbsp; When installing SSRS engine from the SQL Server 2012 media (my preferred method) select the following features: </span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Reporting Services &ndash; SharePoint</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Reporting Services Add-in for SharePoint Products</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Management Tools &ndash; Basic &amp; Complete</span></span></li>
</ul>
<p><span style="font-family: Calibri;">These three are the for the application server.&nbsp; Again, for the web server you only need the middle bullet above (Reporting Services Add-in).&nbsp; Once SSRS is installed and patched on your servers you should see the option in Central Admin to setup the service application.&nbsp; If you don&rsquo;t see this option open the SharePoint Management Shell and run the following:</span></p>
<p><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/8272.SSRSServiceApplication.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/8272.SSRSServiceApplication.gif"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/8272.SSRSServiceApplication.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/250x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/8272.SSRSServiceApplication.gif" alt="" border="0" /></a></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Install-SPRSService</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Install-SPRSServiceProxy</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">get-spserviceinstance -all |where {$_.TypeName -like "SQL Server Reporting*"} | Start-SPServiceInstance</span></span></li>
</ul>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Then try to create the service application again.&nbsp; From there the service application creates like any other service application, however; because I haven&rsquo;t mentioned it yet, another assumption I had is that each service application has its own application pool and own service account associated with it.&nbsp; Once it is a security best practice but will also be important for constrained delegation.&nbsp; In the case of this environment I used the following service accounts for service applications:</span></span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="234">
<p><span style="text-decoration: underline;"><span style="font-size: small;"><span style="font-family: Calibri;">Service:</span></span></span></p>
</td>
<td valign="top" width="216">
<p><span style="font-size: small;"><span style="font-family: Calibri;"><span style="text-decoration: underline;">Service Account:</span></span></span></p>
</td>
</tr>
<tr>
<td valign="top" width="234">
<p><a href="http://dragonlair/"><span style="color: #0563c1; font-family: Calibri; font-size: small;">http://dragonlair</span></a></p>
</td>
<td valign="top" width="216">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSPWADragon</span></span></p>
</td>
</tr>
<tr>
<td valign="top" width="234">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Claims To Windows Token Service</span></span></p>
</td>
<td valign="top" width="216">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svc_SPC2WTS</span></span></p>
</td>
</tr>
<tr>
<td valign="top" width="234">
<p><span style="font-size: small;"><span style="font-family: Calibri;">SSRS Service</span></span></p>
</td>
<td valign="top" width="216">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSQLSSRS</span></span></p>
</td>
</tr>
<tr>
<td valign="top" width="234">
<p><span style="font-size: small;"><span style="font-family: Calibri;">SQL Engine</span></span></p>
</td>
<td valign="top" width="216">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSQLEng</span></span></p>
</td>
</tr>
<tr>
<td valign="top" width="234">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Excel Services</span></span></p>
</td>
<td valign="top" width="216">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSPExcel</span></span></p>
</td>
</tr>
<tr>
<td valign="top" width="234">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Performance Point Service</span></span></p>
</td>
<td valign="top" width="216">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSPPerfPnt</span></span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size: small;"><span style="font-family: Calibri;">I haven&rsquo;t touched Claims to Windows Token Service yet, but it is coming, and yes, required.&nbsp; Once I have the service application up and running I like to go make sure my service is started on the application server.&nbsp; To do this go to System Settings </span>&agrave;<span style="font-family: Calibri;"> Manage Services on Server.&nbsp; If it isn&rsquo;t started, start it on the application server.&nbsp; Next I need to go change the authentication method it will use from NTLM to Kerberos so we can use pass through authentication (otherwise known as the double hop issue).&nbsp; To do this I need to make changes to RSReportServer.config file.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/0537.SSRSAuthType.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/0537.SSRSAuthType.gif"><img style="border: 0px currentColor;" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/0537.SSRSAuthType.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/0537.SSRSAuthType.gif" alt="" width="250" /></a></span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">File is located in C:\Program Files\common files\Microsoft Shared\Web Server Extentions\15\Web Services\Reporting</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Change AuthenticationTypes &nbsp;from RSWindowsNTLM to RSWindowsNegotiate</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Save the file</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">IIS Reset on all servers</span></span></li>
</ul>
<p><span style="font-size: small;"><span style="font-family: Calibri;">So the last step for SSRS (and should be done for the Excel and PerformancePoint as well) is to give the service account permissions to the databases in the web applications.&nbsp; I also need to give permissions to other locations such as SSAS cubes or SQL databases you will be accessing, but that&rsquo;s a bit out of scope for this discussion.&nbsp; Run the following to give the permissions:</span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">$w = Get-SPWebApplication -Identity http://dragonlair&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">$w.GrantAccessToProcessIdentity("campbushnell\svcSQLSSRS")</span></span></li>
</ul>
<p><span style="font-size: small;"><span style="font-family: Calibri;">So now that SSRS is done I can move on to Claims to Windows Token Service (C2WTS).&nbsp; There are a couple things to do before getting started&hellip; Permissions and local security policy (so if I have a group policy in place that overrides what is changed it can cause issues &ndash; SharePoint is &ldquo;special&rdquo; so I typically try to set it up without a group policy and then enforce/lock down after).&nbsp; On SPApp2013 I add the C2WTS to the local administrators group where PerformancePoint is running and grant the account the following permissions in the local security policy:</span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Act as part of the operating system</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Impersonate a client after authentication</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Log on as a service</span></span></li>
</ul>
<p><span style="font-family: Calibri;">Next I need to add the WPS_WPG Windows Group to the c2wtshost.exe.config file.&nbsp; The file is located \Program Files\Windows Identity Foundation\v3.5\c2wtshost.exe.config</span></p>
<p><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/7245.C2WTSConfig.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/7245.C2WTSConfig.gif"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/7245.C2WTSConfig.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/250x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/7245.C2WTSConfig.gif" alt="" border="0" /></a></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Once I do that I go to the services running in Windows and set the Claims to Windows Token Service to Automatic.&nbsp; Don&rsquo;t start it here because SharePoint will just stop it as SharePoint services are really controlled from timer jobs and the settings in the configuration database.&nbsp;&nbsp; Instead, I navigate to Manger Services on Server in Central Admin and start the service on SPApp2013.&nbsp; Once it is started an IIS reset or server reboot is required.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Next I move on to the Service Principle Names (SPNs) and Delegations.&nbsp; Because I want to pass credentials through SharePoint/SSRS to the data source I need to make the web application Kerberos as well.&nbsp; Before I make the change in SharePoint I need to have the SPNs and Delegations in place or the web application will not allow access.&nbsp; Earlier I mapped out the Services I need to setup Kerberos for and the service accounts I will use.&nbsp; The syntax for the SPNs (2008 or greater domain controllers) is:&nbsp; SetSPN &ndash;S ServiceClass/Host:Port Domain\ServiceAccount.&nbsp; So for this environment I setup (don&rsquo;t forget to also do FQDN):</span></span></p>
<ul>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S HTTP/dragonlair Campbushnell\svcSPWADragon</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S HTTP/dragonlair.campbushnell.lcl Campbushnell\svcSPWADragon</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S MSSQLSvc/SQL2012:1433 Campbushnell\svcSQLEng</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S MSSQLSvc/SQL2012.campbushnell.lcl:1433 Campbushnell\svcSQLEng</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S MSSQLSvc/SPSQL:1433 Campbushnell\svcSQLEng</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S MSSQLSvc/SPSQL.campbushnell.lcl:1433 Campbushnell\svcSQLEng</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S SP/C2WTS Campbushnell\svc_SPC2WTS</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S SP/SSRS Campbushnell\svcSQLSSRS</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S SP/PPS Campbushnell\svcSPPerfPnt</span></span></li>
<li><span style="font-size: small;"><span style="font-family: Calibri;">Setspn -S SP/Excel Campbushnell\svcSPExcel</span></span></li>
</ul>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Once the SPNs are in place I can access the delegations tab for the service accounts.&nbsp; I generally like to map it out first so it looks like: </span></span></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Account:</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Service:</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Account Running Service:</span></span></p>
</td>
</tr>
<tr>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svc_SPC2WTS</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">MSSQLSvc Service</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">campbushnell\svcSQLEng</span></span></p>
</td>
</tr>
<tr>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSQLSSRS</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">MSSQLSvc Service</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">campbushnell\svcSQLEng</span></span></p>
</td>
</tr>
<tr>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSPExcel</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">MSSQLSvc Service</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">campbushnell\svcSQLEng</span></span></p>
</td>
</tr>
<tr>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">Campbushnell\svcSPPerfPnt</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">MSSQLSvc Service</span></span></p>
</td>
<td valign="top">
<p><span style="font-size: small;"><span style="font-family: Calibri;">campbushnell\svcSQLEng</span></span></p>
</td>
</tr>
</tbody>
</table>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Notice there is a lack of OLAP or other database server in this example.&nbsp; In non-test environments often connecting to an OLAP cube or other database server is done.&nbsp; For those instances I just add the appropriate SPNs and add the applicable delegations.&nbsp; In Active Directory the delegations look as like the picture for all the service accounts listed in the table above.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/3872.DelegationExample.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/3872.DelegationExample.gif"><img style="border: 0px currentColor;" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/3872.DelegationExample.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/3872.DelegationExample.gif" alt="" width="300" /></a></span></span><span style="font-size: small;"><span style="font-family: Times New Roman;"><br clear="ALL" /></span><span style="font-family: Calibri;">After Kerberos is setup from the Active Directory side I have to setup the web application to use Kerberos rather than NTLM.&nbsp; To do so I navigate to Manage Web Applications in Central Admin, select the web application then Authentication Providers from the ribbon.&nbsp; The dialog to choose the zone appears and I select default.&nbsp; Then scroll down to Claims Authentication Types and change the Integrated Windows Authentication to Negotiate (Kerberos).&nbsp; IIS Reset is always a good step on all SharePoint servers at this point.&nbsp; Then I test to ensure I can still get into my web application.&nbsp; If not, I did something incorrect with Kerberos and need to troubleshoot it.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/4807.WebAppAuthType.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/4807.WebAppAuthType.gif"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/4807.WebAppAuthType.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/4807.WebAppAuthType.gif" alt="" border="0" /></a></span></span></p>
<p>&nbsp;</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Once all of that is done I can start my testing to ensure SSRS can pass my credentials to the database server and bring a report back and render it to me as a user.&nbsp; The first step to that is ensuring I have read access to the database.&nbsp; I change that at the SQL Server database that I am trying to access in this case but that will be more defined in real world scenarios.&nbsp; After that I will start Report Builder (for testing purposes I do that on SPApp2013) to create a SSRS report and data source which I will upload into a document library in SharePoint.&nbsp; Below shows the location of report builder in case you are testing the same way.&nbsp; </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/3531.ReportBuilder.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/3531.ReportBuilder.gif"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/3531.ReportBuilder.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/3531.ReportBuilder.gif" alt="" border="0" /></a></span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Once I create the report I save it to a SharePoint document library where the Report Server Integration feature is enabled.&nbsp; Typically I don&rsquo;t open the report to test if Kerberos is passing credentials, but that is a way as long as you are sure the report works properly.&nbsp; I usually go into the data source (Manage Data Sources) for the report and click Test connection.&nbsp; If it comes back with a Test Successful message I am good and the report should work without an issue.&nbsp;&nbsp;</span></span>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/5670.SSRSConnectionTest.gif" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/5670.SSRSConnectionTest.gif"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/98/90/5670.SSRSConnectionTest.gif" original-url="http://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-98-90/5670.SSRSConnectionTest.gif" alt="" border="0" /></a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>