<?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 Arsenal</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/acasilla/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/acasilla/feed.xml</link>
    <description>The official blog of Anthony Casillas, Microsoft SharePoint Sr. Support Escalation Engineer</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:53:47 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>The content processing component failed to process the security descriptor of the item. The input ACL is Invalid.</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/215</link>
      <pubDate>Wed, 20 Dec 2017 05:40:30 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/?p=215</guid>
      <description><![CDATA[Summary


A while back, one of my colleagues authored an internal article around this error that...]]></description>
      <content:encoded><![CDATA[<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><strong>Summary
</strong></span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">A while back, one of my colleagues authored an internal article around this error that we sometimes see in the Crawl Logs within a customer environment
</span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">That error looks like this...
</span>
<p style="padding-left: 30px"><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><a href="https://msdnshared.blob.core.windows.net/media/2017/12/CrawlLogError.png"></a><a href="https://msdnshared.blob.core.windows.net/media/2017/12/CrawlLogError.png"></a><a href="https://msdnshared.blob.core.windows.net/media/2017/12/CrawlLogError.png"><img width="981" height="132" class="alignnone wp-image-225 size-full" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/CrawlLogError.png" /></a>
</span></p>
<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">Within this article, it talks about the cause being due to some users that had claims that were migrated over at some point and there is no matching ID Provider for those claims.
</span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">While this is absolutely true, we have encountered additional cases and customers that run into this same error and it is not due to mismatch user claims.
</span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">The purpose of this article to expose that type of information and provide a method to discover those Invalid Users and to remove them
</span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><strong>More Information
</strong></span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">As I mentioned above, this is the error we will often see in the Crawl Logs, but what if your site does not have any migrated users with custom Claims or mismatched Claims? What if your site is using straight Windows Claims, but you still see this error?
</span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">What we have seen is this error can be thrown when there are users with "<span style="color: black"><em>Invalid</em><span style="color: #44546a">" ( "<span style="color: black"><em>tp_SystemID</em><span style="color: #44546a">" or "<span style="color: black"><em>SystemUserKey</em><span style="color: #44546a">" ) values..
</span></span></span></span></span></span></span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">This "<span style="color: black"><em>tp_SystemId</em><span style="color: #44546a">" is stored within the "<span style="color: black"><em>UserInfo</em><span style="color: #44546a">" table on the content database where the problematic Site\Web resides.
</span></span></span></span></span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">We are not 100% sure how these values become corrupt, but we suspect it is done by some 3<sup>rd</sup> party tool.
</span>

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">If you see this error, I would suggest doing the following:
</span>
<ul>
 	<li>
<div><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">Run the following PowerShell</span></div>
<span style="color: #ff4500;font-family: Segoe UI;font-size: small">$outputFolder</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Read-Host</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Enter a location for the output file (For Example: C:\Temp)"</span><span style="font-family: Segoe UI;font-size: small"> </span>

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small"></span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$filename</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Check-InvalidSystemUserKey.csv"</span>

<span style="color: #8b0000;font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small"></span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$outFile</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$outputFolder</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"\"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$filename</span>

<span style="color: #ff4500;font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$webAppUrl</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Read-Host</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Please enter the URL of the Web App you want to check ( Ex: http://sharepoint )"</span>

<span style="color: #8b0000;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small"></span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"SiteUrl~WebUrl~User~LoginName~InvalidSystemUserKey"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">|</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Out-File</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$outFile</span>

<span style="color: #ff4500;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small"></span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$wa</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Get-SPWebApplication</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$webAppUrl</span>

<span style="color: #ff4500;font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small"></span><span style="color: #00008b;font-family: Segoe UI;font-size: small">foreach</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$site</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">in</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$wa</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Sites)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">foreach</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">in</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$site</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">AllWebs)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">""</span>

<span style="color: #8b0000;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"></span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Checking web: "</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Url</span>

<span style="font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$SPUsers</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SiteUsers </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">|</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">?</span><span style="font-family: Segoe UI;font-size: small">{</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$_</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SystemUserKey </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-notmatch</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"c:"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-and</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$_</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SystemUserKey </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-notmatch</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"i:"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-and</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$_</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SystemUserKey </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-notmatch</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"s-1-"</span><span style="font-family: Segoe UI;font-size: small">}</span>

<span style="font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">if</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$SPUsers</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Count </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-gt</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"0"</span><span style="font-family: Segoe UI;font-size: small">)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">foreach</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">in</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$SPUsers</span><span style="font-family: Segoe UI;font-size: small">)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Write-Host</span><span style="font-family: Segoe UI;font-size: small"> (</span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Found user, "</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">DisplayName </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">", with an Invalid SystemUserKey "</span><span style="font-family: Segoe UI;font-size: small">) </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-ForegroundColor</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8a2be2;font-family: Segoe UI;font-size: small">Yellow</span>

<span style="color: #8a2be2;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"></span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Site</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Url </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"~"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Url </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"~"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">DisplayName </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"~"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">UserLogin </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"~"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SystemUserKey </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">|</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Out-File</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$outFile</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-Append</span>

<span style="color: #000080;font-family: Segoe UI;font-size: small"> </span>}

}

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">else</span>

<span style="color: #00008b;font-family: Segoe UI;font-size: small"> </span>{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Write-host</span><span style="font-family: Segoe UI;font-size: small"> (</span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"No Invalid SystemUserKey found within this set of Users... "</span><span style="font-family: Segoe UI;font-size: small">) </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-ForegroundColor</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8a2be2;font-family: Segoe UI;font-size: small">Green</span>

<span style="color: #8a2be2;font-family: Segoe UI;font-size: small"> </span>}

}

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Dispose()</span>

}

<span style="color: #ff4500;font-family: Segoe UI;font-size: small"></span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$site</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Dispose()</span>

<span style="font-family: Segoe UI;font-size: small"> </span>""

"Finished Checking Web App..."

<span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Please send the file created at '</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$outFile</span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">' to Microsoft Support" </span></li>
 	<li><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">This will prompt you for the directory ( this path, like '<span style="color: black"><em>C:\Temp</em><span style="color: #44546a">' should already exist ) you want to save your file called "<span style="color: black"><em>Check-InvalidSystemUserKeys.csv</em><span style="color: #44546a">"
</span></span></span></span></span></li>
 	<li><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">You will then get prompted for the URL of the Web App you want to check
</span></li>
 	<li><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">It will then iterate through each Site Collection and Web within the Web App and check for users that have a "<span style="color: black"><em>SystemUserKey</em><span style="color: #44546a">" that does not look conventional <span style="color: #ed7d31">( like starting with <em>"c:"</em>, <em>"i:"</em> or <em>"S-1-x"</em> )<span style="color: #44546a">
</span></span></span></span></span></li>
 	<li>
<div><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">It will output on the console as it checks each SPWeb and report if it finds any "<span style="color: black"><em>Invalid</em><span style="color: #44546a">" users..
</span></span></span></div>
<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><a href="https://msdnshared.blob.core.windows.net/media/2017/12/PSCheck1.jpg"><img width="501" height="280" class="alignnone size-full wp-image-226" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/PSCheck1.jpg" /></a>
</span></li>
 	<li>
<div><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">It will also put the info into this .csv file.. and that info will look like this:
</span></div>
<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><a href="https://msdnshared.blob.core.windows.net/media/2017/12/PSOutput1.jpg"><img width="706" height="117" class="alignnone size-full wp-image-236" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/12/PSOutput1.jpg" /></a>
</span>

<span style="color: #c00000;font-family: Segoe UI;font-size: 10pt"><strong>** Note **</strong> Often times, if a user is granted Perms at a Site Collection level ( Root Site )  and you have subsites that inherit permissions from the Root, then you will see this same user as "Invalid" throughout all the webs within that Site Collection.. <span style="color: #44546a">
</span></span></li>
 	<li><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">You can then import this file into Excel, using the <span style="color: black"><em>" ~ "</em><span style="color: #44546a"> as the delimiter and then sort and filter based on like the "<span style="color: black"><em>SiteUrl</em><span style="color: #44546a">" column if you need to..
</span></span></span></span></span></li>
 	<li>
<div><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">If you see accounts with <span style="color: black"><em>SystemUserKey</em><span style="color: #44546a"> info like above, this is likely your culprit to the errors you see in the Crawl Logs..</span></span></span></div>
<div><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><span style="color: black"><span style="color: #44546a">
</span></span></span></div>
<ul>
 	<li><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">We have also seen where the "<span style="color: black"><em>SystemUserKey</em><span style="color: #44546a">" is actually "<span style="color: black"><em>null</em><span style="color: #44546a">" or "<span style="color: black"><em>empty</em><span style="color: #44546a">".
</span></span></span></span></span></span></span></li>
 	<li><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">If this is the case, please refer to this article, because we suspect the errors in your Crawl Log and ULS logs will match this and it will fail on the <span style="color: black"><em>mssdmn.exe</em><span style="color: #44546a"> process
</span></span></span></li>
</ul>
</li>
 	<li><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">Coming back to this issue..
</span></li>
</ul>
<p style="margin-left: 18pt"><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><strong>How do we fix this?
</strong></span></p>

<ul>
 	<li>
<div><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">You can run the following PowerShell to again iterate the Web Application, looking for "<span style="color: black"><em>invalid</em><span style="color: #44546a">" accounts and if found, it will remove them..</span></span></span></div>
<span style="color: #ff4500;font-family: Segoe UI;font-size: small">$webAppUrl</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Read-Host</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Please enter the URL of the Web App you want to check ( Ex: http://sharepoint )"</span>

<span style="color: #8b0000;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small"></span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$wa</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Get-SPWebApplication</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$webAppUrl</span>

<span style="color: #ff4500;font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small"></span><span style="color: #00008b;font-family: Segoe UI;font-size: small">foreach</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$site</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">in</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$wa</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Sites)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">foreach</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">in</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$site</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">AllWebs)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">""</span>

<span style="color: #8b0000;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"></span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Checking web: "</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Url</span>

<span style="font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$SPUsers</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">=</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SiteUsers </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">|</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">?</span><span style="font-family: Segoe UI;font-size: small">{</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$_</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SystemUserKey </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-notmatch</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"c:"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-and</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$_</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SystemUserKey </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-notmatch</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"i:"</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-and</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$_</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">SystemUserKey </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-notmatch</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"s-1-"</span><span style="font-family: Segoe UI;font-size: small">}</span>

<span style="font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">if</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$SPUsers</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Count </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">-gt</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"0"</span><span style="font-family: Segoe UI;font-size: small">)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">foreach</span><span style="font-family: Segoe UI;font-size: small">(</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">in</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$SPUsers</span><span style="font-family: Segoe UI;font-size: small">)</span>

{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Write-Host</span><span style="font-family: Segoe UI;font-size: small"> (</span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Found user, "</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">DisplayName </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">", with an Invalid SystemUserKey "</span><span style="font-family: Segoe UI;font-size: small">) </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-ForegroundColor</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8a2be2;font-family: Segoe UI;font-size: small">Yellow</span>

<span style="color: #8a2be2;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"></span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Write-Host</span><span style="font-family: Segoe UI;font-size: small"> (</span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"Removing User: "</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">+</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">DisplayName) </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-ForegroundColor</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8a2be2;font-family: Segoe UI;font-size: small">DarkYellow</span>

<span style="color: #8a2be2;font-family: Segoe UI;font-size: small"> </span><span style="font-family: Segoe UI;font-size: small"></span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #0000ff;font-family: Segoe UI;font-size: small">Remove-SPUser</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-Web</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-Identity</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$user</span><span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #000080;font-family: Segoe UI;font-size: small">-Confirm:</span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$false</span>

<span style="color: #ff4500;font-family: Segoe UI;font-size: small"> </span>}

}

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #00008b;font-family: Segoe UI;font-size: small">else</span>

<span style="color: #00008b;font-family: Segoe UI;font-size: small"> </span>{

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #8b0000;font-family: Segoe UI;font-size: small">"No Invalid SystemUserKey found within this set of Users... "</span>

<span style="color: #8b0000;font-family: Segoe UI;font-size: small"> </span>}

}

<span style="font-family: Segoe UI;font-size: small"> </span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$web</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Dispose()</span>

}

<span style="color: #ff4500;font-family: Segoe UI;font-size: small"></span><span style="color: #ff4500;font-family: Segoe UI;font-size: small">$site</span><span style="color: #a9a9a9;font-family: Segoe UI;font-size: small">.</span><span style="font-family: Segoe UI;font-size: small">Dispose()</span>

<span style="font-family: Segoe UI;font-size: small"> </span>""

"Finished Checking Web App..."</li>
 	<li>
<div><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt"><span style="color: black"><span style="color: #44546a"></span></span></span><span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">After this, try your crawl again.
</span></div></li>
</ul>
&nbsp;

<span style="color: #44546a;font-family: Segoe UI;font-size: 10pt">I hope this helps in resolving your issue!
</span>]]></content:encoded>
    </item>
    <item>
      <title>Collect SharePoint ULS Logs quicker || Say “No” to Merge-SPLogFile</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/collect-sharepoint-uls-logs-quicker-say-no-to-merge-splogfile</link>
      <pubDate>Wed, 15 Nov 2017 14:20:26 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/?p=165</guid>
      <description><![CDATA[As a SharePoint Support Engineer, we often need to collect ULS logs from a single server or several...]]></description>
      <content:encoded><![CDATA[<span style="font-family: Segoe UI;font-size: 10pt">As a SharePoint Support Engineer, we often need to collect ULS logs from a single server or several servers to help identify our customer's issues. Russ Maxwell has a great <a href="https://blogs.msdn.microsoft.com/russmax/2017/03/23/collecting-sharepoint-uls-logs-faster/">blog</a> and script that helps collect ULS on a more "real-time" approach and collects from all servers in the farm from the time you execute the script to the time to terminate that script. ( Jeff shared this out in an email a few weeks back ). We contemplated writing and releasing this, but we wanted to spin the Log Collection process in slightly different direction that we also felt could be useful and more efficient for Admins when "Microsoft" asks them to go grab ULS logs from specific servers. The intent of this script is not to take anything away from Russ' work, just another method to collect ULS logs.
</span>

<span style="font-family: Segoe UI;font-size: 10pt">I am sure you may be asking, why not just use "Merge-SPLogFile"?
</span>

<span style="font-family: Segoe UI;font-size: 10pt">This is a valid question and I will tell you why I am not a fan of this command. I work specifically on the "SharePoint Search" team and when we have a customer turn up logging to VerboseEx ( just for Search categories), so that we can capture critical information within the crawling, indexing, querying process, this can generate some really large ULS logs. On top of that, we may not need ULS from ALL servers. We may only need them from 3 or 4 servers, like the Crawl or Content Processing Components. We have seen where customers just run a "Merge-SPLogFile" between specific time frames and it generates log files anywhere from 2GB - 70GB in size. If you have ever tried to parse files of this size, you will find that it can take you half a day using tools like "logparser" to split these files out into something that is easier to work with.
</span>

<span style="font-family: Segoe UI;font-size: 10pt">My colleague, Jeremy Walker, and I took Russ' concepts and decided to create a PowerShell script to collect ULS logs from a set of defined Servers, between a span of time, and copy them to a location of your choice and then zip them up. We felt this would make an Admin's job a bit easier of having to go grab those files themselves and zip them up. With that, I wanted to present the usage of this script..
</span>

<span style="font-family: Segoe UI;font-size: 10pt"><strong>Script Location:
</strong></span>

<a href="https://gallery.technet.microsoft.com/Collect-ULS-logs-from-2d31fd19"><span style="font-family: Segoe UI;font-size: 10pt">https://gallery.technet.microsoft.com/Collect-ULS-logs-from-2d31fd19</span></a><span style="font-family: Segoe UI;font-size: 10pt">
</span>

<span style="font-family: Segoe UI;font-size: 10pt"><strong>Usage:
</strong></span>
<ul>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">Let's say that you have 4 servers in your SharePoint Farm and of those 4, 2 of them belong to my search topology and my Topo looks something like this:
</span></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/111517_1427_CollectShar1.png" /><span style="font-family: Segoe UI;font-size: 10pt">
</span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">For my example here, I am troubleshooting a query related issue so I want to collect ULS logs from "</span><span style="color: #2e74b5;font-family: Segoe UI Light">ajcnsv5app</span><span style="font-family: Segoe UI">" and "</span><span style="color: #2e74b5;font-family: Segoe UI Light">ajcnsv5app1</span><span style="font-family: Segoe UI">" from earlier in the day ( 11/14/2017 ) between like 12:30 PM and 1:30 PM
</span></span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">I have put this script on one of my servers, which has ample space, in a path like "</span><span style="color: #2e74b5;font-family: Segoe UI Light">D:\PowerShell</span><span style="font-family: Segoe UI">"
</span></span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">I open the SharePoint Management Shell, or PowerShell ISE, and I change paths to "</span><span style="color: #2e74b5;font-family: Segoe UI Light">D:\PowerShell</span><span style="font-family: Segoe UI">"
</span></span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">The command will be ran like: ( a few comments below about usage )
</span></div>
<span style="font-family: Segoe UI"><span style="font-size: 9pt"><span style="color: blue">.\Get-UlsLogs.ps1 </span><span style="color: navy">-Servers </span><span style="color: blueviolet">ajcnsv5app<span style="color: darkgray">,</span> ajcnsv5app1 </span><span style="color: navy">-startTime </span><span style="color: darkred">"11/14/2017 12:30PM" </span><span style="color: navy">-endTime </span><span style="color: darkred">"11/14/2018 13:30"</span></span><span style="font-size: 10pt">
</span></span>
<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">You can pass in any array of servers you have. If you leave the "-Servers" switch off, it will grab ULS from All your SharePoint servers in the farm.
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">If you do not append the "startTime\endTime" in the command, it will prompt you for each parameter as we consider these mandatory parameters
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">In the example above, the time can be AM\PM or 24-hour format and you can wrap it in single or double quotes.
</span></li>
</ul>
</li>
</ul>
<ul>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">It will prompt you for a location you want to save these files:
</span></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/111517_1427_CollectShar2.png" /><span style="font-family: Segoe UI;font-size: 10pt">
</span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">As you can see I chose </span><span style="color: #2e74b5;font-family: Segoe UI Light">"D:\Temp"</span><span style="font-family: Segoe UI"> since I have plenty of space on my server to store these..
</span></span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">The next thing it will do is check to see if the </span><span style="color: #2e74b5;font-family: Segoe UI Light">D:\Temp</span><span style="font-family: Segoe UI"> exists, if not, it will tell you and you will be prompted again for a path to store the files.
</span></span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">When you hit Enter, it will begin working through the servers you defined and do the following:
</span></div>
<ul>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">Create a temp directory @ "</span><span style="color: #2e74b5;font-family: Segoe UI Light">D:\Temp\ajcnsv5app</span><span style="font-family: Segoe UI">"
</span></span></li>
 	<li><span style="font-family: Segoe UI"><span style="font-size: 10pt">Look for ULS logs that match the startTime\endTime criteria </span><span style="color: #ed7d31;font-size: 9pt">( we don't actually crack the ULS logs open and pull those specific times. We utilize the "CreationTime" property of the file and manipulate the startTime a little by substracting some minutes from the time entered. We did this to ensure we grabbed the ULS log that would contain the timeframe we are looking for. )</span><span style="font-size: 10pt">
</span></span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">It will copy the files that we matched on into this temp path @ "</span><span style="color: #2e74b5;font-family: Segoe UI Light">D:\Temp\ajcnsv5app</span><span style="font-family: Segoe UI">"
</span></span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">It will then zip those Log files up for you
</span></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/111517_1427_CollectShar3.png" /><span style="font-family: Segoe UI;font-size: 10pt">
</span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">It will also clean up the Temp Paths it creates for each server so that all you have left is the Zip files created:
</span></div>
<img alt="" src="https://msdnshared.blob.core.windows.net/media/2017/11/111517_1427_CollectShar4.png" /><span style="font-family: Segoe UI;font-size: 10pt">
</span></li>
</ul>
<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">You can then upload these Zipped ULS logs to the Workspace that Microsoft provides for you.
</span></li>
</ul>
</li>
</ul>
<span style="font-family: Segoe UI;font-size: 10pt">I hope this is useful for those who choose to use this and we appreciate any feedback or questions you may have!</span>]]></content:encoded>
    </item>
    <item>
      <title>Crawling Site\Web fails with “System.ArguementException *** Message: An item with the same key has already been added.”</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/crawling-siteweb-fails-with-system-arguementexception-message-an-item-with-the-same-key-has-already-been-added</link>
      <pubDate>Tue, 13 Jun 2017 12:56:49 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/?p=115</guid>
      <description><![CDATA[When we see this error, generally on the mssdmn.exe process with a EventID =...]]></description>
      <content:encoded><![CDATA[<ul>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">When we see this error, generally on the mssdmn.exe process with a EventID = dm1k
</span></div>
<span style="font-size: 10pt"><span style="color: #c00000;font-family: Segoe UI Light">System.ArgumentException *** Message : An item with the same key has already been added.</span><span style="font-family: Segoe UI">
</span></span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">This means it has probably failed in the "</span><span style="font-family: Segoe UI Light"><strong><em>ParseGroupCollection</em></strong></span><span style="font-family: Segoe UI">" method within the SiteData call for the "</span><span style="font-family: Segoe UI Light"><strong>Site</strong></span><span style="font-family: Segoe UI">", or </span><span style="font-family: Segoe UI Light"><strong>SiteCollection</strong></span><span style="font-family: Segoe UI">, object
</span></span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">In the ULS, if you were to filter where you see that error, by the ThreadID, you would see something like this:</span></div>
<div><span style="font-family: Segoe UI;font-size: 10pt">
</span></div>
<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">06/07/2017 09:40:56.23 mssdmn.exe (0x3124) 0x2F28 SharePoint Server Search Connectors:SharePoint ac3jn Verbose <strong>GetContent</strong> CorrelationID 393ef99d-174e-b0b4-a06f-97dc29dd8957 ObjectType <strong>SiteCollection</strong> Url <span style="background-color: yellow">https://foo/_vti_bin/sitedata.asmx</span> Search RequestDuration 449 SPIISLatency 0 SP RequestDuration 339 57ec8c92-d753-42c2-b636-a1280b8b9e6c
</span>

<span style="color: #5b9bd5;font-size: 10pt"><span style="font-family: Segoe UI Light">06/07/2017 09:40:56.37 mssdmn.exe (0x3124) 0x2F28 SharePoint Server Search Connectors:SharePoint dm1k Medium Exception Type: <span style="color: #c00000">System.ArgumentException *** Message : An item with the same key has already been added.<span style="color: #5b9bd5"> *** StackTrace: at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.ParseGroupCollection(XmlReader groupReader) at Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.InitSite(String strSiteUrl) at Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.GetSite(String strSiteUrl, sSite3&amp; site) 57ec8c92-d753-42c2-b636-a1280b8b9e6c</span></span></span><span style="font-family: Segoe UI">
</span></span></li>
</ul>
<ul>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">We can utilize PowerShell to emulate this </span><span style="font-family: Segoe UI Light"><strong>sitedata.asmx</strong></span><span style="font-family: Segoe UI"> call on the </span><span style="font-family: Segoe UI Light"><strong>SiteCollection</strong></span><span style="font-family: Segoe UI"> Object.
</span></span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">I suggest doing this, so we can investigate the XML and\or use it for reference later.
</span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">You can see in the ULS sample above that we called the "</span><span style="font-family: Segoe UI Light"><strong>SiteCollection</strong></span><span style="font-family: Segoe UI">" object on <a href="https://foo/_vti_bin/sitedata.asmx"></a></span></span><span style="color: #5b9bd5"><em>https://foo/_vti_bin/sitedata.asmx</em></span><span style="font-family: Segoe UI;font-size: 10pt"> ( if it were another SiteCollection, you would see the URL in this ULS entry )
</span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">In order to get this XML, you can run this <span style="color: #ed7d31">( when prompted for creds, you want to use the Default Content Access Account credentials ) </span>
</span></div>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">########################################################################################</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">## Set SiteData Web Service Object ### Use the Content Access Account for the $creds variable </span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">########################################################################################</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$creds </span><span style="color: darkgray">= </span><span style="color: blue">Get-Credential</span>
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$url </span><span style="color: darkgray">= </span><span style="color: darkred">"https://foo"</span>
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$wsUrl = </span><span style="color: orangered">$url </span><span style="color: darkgray">+ </span><span style="color: darkred">"/_vti_bin/sitedata.asmx?wsdl"</span>
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$sitedataWS </span><span style="color: darkgray">= </span><span style="color: blue">New-WebServiceProxy </span><span style="color: navy">-Uri</span>
<span style="color: orangered">$wsUrl </span><span style="color: navy">-Credential </span><span style="color: orangered">$creds
</span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered"></span></span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">########################################################################################</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">## SiteCollection Object - ObjectType = 2 ##</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">########################################################################################</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$int </span><span style="color: darkgray">= </span><span style="color: darkgray">[<span style="color: teal">int<span style="color: darkgray">]<span style="color: purple">2</span>
</span></span></span></span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$xmlinput </span><span style="color: darkgray">=</span>
<span style="color: darkred">"&lt;GetContent&gt;&lt;ObjectType&gt;2&lt;/ObjectType&gt;&lt;ObjectId /&gt;&lt;FolderUrl /&gt;&lt;ItemId /&gt;&lt;RetrieveChildItems&gt;False&lt;/RetrieveChildItems&gt;&lt;SecurityOnly&gt;False&lt;/SecurityOnly&gt;&lt;LastItemIdOnPage /&gt;&lt;AllowRichText&gt;False&lt;/AllowRichText&gt;&lt;RequestLoad&gt;100&lt;/RequestLoad&gt;&lt;RemoveInvalidXmlChars&gt;True&lt;/RemoveInvalidXmlChars&gt;&lt;/GetContent&gt;"</span> </span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$xml </span><span style="color: darkgray">= </span><span style="color: orangered">$sitedataWS<span style="color: darkgray">.</span>GetContentEx($int<span style="color: darkgray">,<span style="color: orangered">$xmlinput</span>)
</span></span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$xml </span><span style="color: darkgray">| </span><span style="color: blue">Out-File </span><span style="color: darkred">"<span style="background-color: yellow">C:\Temp\SiteCollection.xml</span>"
</span></span></p>
</li>
</ul>
<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">Once you collect the XML, we can parse it through additional PowerShell
</span></li>
 	<li>
<div><span style="font-size: 10pt"><span style="font-family: Segoe UI">Some time back, we created some PowerShell that would try to mimic this "</span><span style="font-family: Segoe UI Light"><strong><em>ParseGroupCollection</em></strong></span><span style="font-family: Segoe UI">" and try to identify duplicate "Groups" within the returned XML.
</span></span></div></li>
</ul>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#the attributes that are in the group element/node</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$attributes </span><span style="color: darkgray">= </span><span style="color: darkred">"ID"<span style="color: darkgray">,<span style="color: darkred">"Name"<span style="color: darkgray">,<span style="color: darkred">"OwnerID"<span style="color: darkgray">,<span style="color: darkred">"OwnerIsUser"<span style="color: darkgray">,<span style="color: darkred">"Description"</span>
</span></span></span></span></span></span></span></span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#the object array of custom objects we will use to return data</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$results </span><span style="color: darkgray">=</span> @()
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#setup the xml reader and get the data</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$xmlReader </span><span style="color: darkgray">= </span><span style="color: darkgray">[<span style="color: teal">System.Xml.XmlReader<span style="color: darkgray">]::</span>Create(<span style="color: darkred;background-color: yellow">'C:\Temp\SiteCollection.xml'</span>)
</span></span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#read dat data</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkblue">while</span>(<span style="color: orangered">$xmlReader<span style="color: darkgray">.</span>Read())
</span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt">{
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: darkgreen">#Set things we want to check ahead of the compare operation</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: orangered">$isElementNodeType </span><span style="color: darkgray">= </span><span style="color: orangered">$xmlReader<span style="color: darkgray">.</span>NodeType <span style="color: darkgray">-eq </span><span style="color: darkgray">[<span style="color: teal">System.Xml.XmlNodeType<span style="color: darkgray">]::</span>Element</span></span></span></span><span style="font-family: Segoe UI;font-size: 9pt"> </span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$isGroupNode </span><span style="color: darkgray">= </span><span style="color: orangered">$xmlReader<span style="color: darkgray">.</span>Name <span style="color: darkgray">-eq </span><span style="color: darkred">'Group'</span>
</span></span><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: darkgreen">#Compare ALL THE THINGS!</span></span><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: darkblue">if</span>(<span style="color: orangered">$isElementNodeType </span><span style="color: darkgray">-and </span><span style="color: orangered">$xmlReader<span style="color: darkgray">.</span>HasAttributes <span style="color: darkgray">-and</span> $isGroupNode</span>)
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"> {</span><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: darkgreen">#create object to store the current group element </span></span><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: orangered">$currentGroup </span><span style="color: darkgray">= </span><span style="color: darkred">"" </span><span style="color: darkgray">| </span><span style="color: blue">Select </span><span style="color: darkred">"ID"<span style="color: darkgray">,<span style="color: darkred">"Name"<span style="color: darkgray">,<span style="color: darkred">"OwnerID"<span style="color: darkgray">,<span style="color: darkred">"OwnerIsUser"<span style="color: darkgray">,<span style="color: darkred">"Description"</span>
</span></span></span></span></span></span></span></span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#loop through attribute array set above.</span></span><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: darkblue">foreach</span>(<span style="color: orangered">$attribute </span><span style="color: darkblue">in </span><span style="color: orangered">$attributes)</span>
</span><span style="font-family: Segoe UI;font-size: 9pt">{
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#start populating data in $currentGroup by reading that attribute from current point in reader</span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$currentGroup<span style="color: darkgray">.<span style="color: orangered">$attribute</span> =</span> $xmlReader<span style="color: darkgray">.</span>GetAttribute($attribute</span>) </span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt">}
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#add current group to results</span></span><span style="font-family: Segoe UI;font-size: 9pt">
<span style="color: orangered">$results </span><span style="color: darkgray">+= </span><span style="color: orangered">$currentGroup</span>
</span><span style="font-family: Segoe UI;font-size: 9pt">}
</span><span style="font-family: Segoe UI;font-size: 9pt">}
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$resultcount </span><span style="color: darkgray">= </span><span style="color: orangered">$results<span style="color: darkgray">.</span>Count
</span></span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: blue">Write-Host </span><span style="color: darkred">"There are <span style="color: orangered">$resultcount<span style="color: darkred"> group elements"</span>
</span></span></span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">##see the items easily</span>
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#$results | Select Id, Name | Out-GridView</span>
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkgreen">#group items and then look for items when </span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$results </span><span style="color: darkgray">| </span><span style="color: blue">group </span><span style="color: navy">-Property </span><span style="color: blueviolet">name </span><span style="color: darkgray">| </span><span style="color: blue">?</span> {<span style="color: orangered">$_<span style="color: darkgray">.</span>count <span style="color: darkgray">-gt</span><span style="color: purple">1</span>} <span style="color: darkgray">| </span><span style="color: blue">select </span><span style="color: blueviolet">count<span style="color: darkgray">,</span> name</span>
</span></span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$results </span><span style="color: darkgray">| </span><span style="color: blue">group </span><span style="color: navy">-Property </span><span style="color: blueviolet">Id </span><span style="color: darkgray">| </span><span style="color: blue">?</span> {<span style="color: orangered">$_<span style="color: darkgray">.</span>count <span style="color: darkgray">-gt</span><span style="color: purple">1</span>} <span style="color: darkgray">| </span><span style="color: blue">select </span><span style="color: blueviolet">count<span style="color: darkgray">,</span> name</span>
</span></span></p>

<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">If there are any Duplicates, on the Name or ID, we would dump out the Name or ID with a count and the Name of the duplicate Group
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">If you get any returns on these, where count &gt; 1, then you can go find those groups in the Site Permissions of your Site and remove one of the Groups.
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">There are times that parsing through this XML doesn't yield any Duplicate Names\IDs so what do you do in that case?
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">This is where a Process Dump would be handy
</span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">We have a pre-created rule that will\should dump on the following:</span></div></li>
</ul>
<span style="color: #5b9bd5;font-family: Segoe UI;font-size: 10pt">            tag_dm1k AND message contains "An item with the same key has already been added."
</span>
<ul>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">Download "Debug Diag 2.0" from here:</span></div></li>
</ul>
<a href="https://www.microsoft.com/en-us/download/details.aspx?id=49924"><span style="font-family: Segoe UI;font-size: 10pt">https://www.microsoft.com/en-us/download/details.aspx?id=49924</span></a><span style="font-family: Segoe UI;font-size: 10pt">
</span>
<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">Install it on your Crawl Server(s)
</span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">Once you install it, open "</span><span style="color: black;font-family: Segoe UI Light"><strong>DebugDiag 2.0 Collection</strong></span><span style="font-family: Segoe UI">"
</span></span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">When the crash\hang wizard comes up, click on "Close" or Cancel
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">Then in the Lower right corner, click on the "Import" button
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">Select that "tag_dm1k_partial.ddconfig" file you saved to your Crawl Server(s)
</span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">Click OK
</span></li>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">Once the rule loads up, </span><span style="color: black;font-family: Segoe UI Light"><strong>right click the Rule &gt; Activate Rule</strong></span><span style="font-family: Segoe UI">
</span></span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">Trigger a crawl..
</span></li>
</ul>
&nbsp;
<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">This should monitor mssdmn.exe process and capture a DMP file when that EventId = dm1k is thrown, with that message in the ULS
</span></li>
</ul>
<ul>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">looking at the DMP file.
</span></div></li>
</ul>
<ul>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">i see this
</span></div>
<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0:106&gt; !threads
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">ThreadCount: 143
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">UnstartedThread: 0
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">BackgroundThread: 143
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">PendingThread: 0
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">DeadThread: 0
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">Hosted Runtime: no
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> Lock
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> ID OSID ThreadOBJ State GC Mode GC Alloc Context Domain Count Apt Exception
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> 0 1 1a60 000000338a9306f0 20220 Preemptive 0000000000000000:0000000000000000 000000338a923120 0 MTA
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> 4 2 3138 000000338a93b3e0 2b220 Preemptive 0000000000000000:0000000000000000 000000338a923120 0 MTA (Finalizer)
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> 9 3 3628 00000033a48469a0 20220 Preemptive 0000000000000000:0000000000000000 000000338a923120 0 MTA
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> 13 4 24ec 00000033ad63a0e0 28220 Preemptive 0000000000000000:0000000000000000 000000338a923120 0 MTA
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> 18 5 1be8 00000033ad63e890 28220 Preemptive 0000000000000000:0000000000000000 000000338a923120 0 MTA
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">&lt;truncated&gt;
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> 12 71 24a4 00000033b02fa880 20220 Preemptive 0000000000000000:0000000000000000 000000338a923120 0 MTA
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> 104 72 8cc 00000033b7c2b8b0 20220 Preemptive 0000000000000000:0000000000000000 000000338a923120 0 MTA
</span>

<span style="font-size: 10pt"><span style="color: #5b9bd5;font-family: Segoe UI Light"> 106 73 188c 00000033b0336fd0 20220 Preemptive 000000338DE59980:000000338DE5AFC0 000000338a923120 0 <span style="background-color: yellow">MTA System.ArgumentException 000000338de50b08</span></span><span style="font-family: Segoe UI">
</span></span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">next i dumped the Stack out
</span></li>
</ul>
<p style="margin-left: 36pt"><span style="font-size: 10pt"><span style="font-family: Segoe UI">0</span><span style="color: #5b9bd5;font-family: Segoe UI Light">:106&gt; ~k
</span></span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> # Child-SP RetAddr Call Site
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00 00000033`ab3f5ef8 00007ff7`e637d4f7 Microsoft_Office_Server_Native!ULSSendFormattedTrace [n:\src\util\ulsapi\native\trace.cpp @ 404]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">01 00000033`ab3f5f00 00007ff7`e637c265 ConnectorPH!DomainBoundILStubClass.IL_STUB_PInvoke(UInt32, UInt32, Microsoft.Office.Server.Diagnostics.ULSTraceLevel, System.String, Boolean)+0x157
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">02 00000033`ab3f6020 00007ff7`e637b095 Microsoft_Office_Server!Microsoft.Office.Server.Diagnostics.ULS.SendTraceImpl(UInt32, Microsoft.Office.Server.Diagnostics.ULSCatBase, Microsoft.Office.Server.Diagnostics.ULSTraceLevel, System.String, System.Object[])+0x125 [n:\src\otools\inc\osrv\Diagnostics\ULS.cs @ 2334]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">03 00000033`ab3f6080 00007ff7`e7392bd1 Microsoft_Office_Server!Microsoft.Office.Server.Diagnostics.ULS.SendTraceTag(UInt32, Microsoft.Office.Server.Diagnostics.ULSCatBase, Microsoft.Office.Server.Diagnostics.ULSTraceLevel, System.String, System.Object[])+0x155 [n:\src\otools\inc\osrv\Diagnostics\ULS.cs @ 2303]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">04 00000033`ab3f6120 00007ff7`e737627e Microsoft_Office_Server_Search!Microsoft.Office.Server.Search.Internal.Protocols.CProtocolHelper.HandleException(System.Exception, UInt32)+0xf1 [n:\src\search\managed\lib\OM\Protocols\util.cs @ 545]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">05 00000033`ab3f61b0 00007ff8`45ac59c5 Microsoft_Office_Server_Search!Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.GetSite(System.String, Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.sSite3 ByRef)+0x42e [n:\src\search\managed\lib\OM\Protocols\stsv3ph.cs @ 2732]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">06 00000033`ab3f6220 00007ff8`45ac58c3 clr!ExceptionTracker::CallHandler+0xc5 [f:\dd\ndp\clr\src\vm\exceptionhandling.cpp @ 3341]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">07 00000033`ab3f62c0 00007ff8`45ac42af clr!ExceptionTracker::CallCatchHandler+0x7f [f:\dd\ndp\clr\src\vm\exceptionhandling.cpp @ 535]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">08 00000033`ab3f6350 00007ff8`4e53347d clr!ProcessCLRException+0x2e6 [f:\dd\ndp\clr\src\vm\exceptionhandling.cpp @ 1067]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">09 00000033`ab3f6430 00007ff8`4e4f5405 ntdll!RtlpExecuteHandlerForUnwind+0xd [d:\blue\minkernel\ntos\rtl\amd64\xcptmisc.asm @ 252]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0a 00000033`ab3f6460 00007ff8`45ac4348 ntdll!RtlUnwindEx+0x385 [d:\blue\minkernel\ntos\rtl\amd64\exdsptch.c @ 1006]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0b 00000033`ab3f6b40 00007ff8`45ac4304 clr!ClrUnwindEx+0x40 [f:\dd\ndp\clr\src\vm\exceptionhandling.cpp @ 4328]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0c 00000033`ab3f7060 00007ff8`4e5333fd clr!ProcessCLRException+0x2b2 [f:\dd\ndp\clr\src\vm\exceptionhandling.cpp @ 1032]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0d 00000033`ab3f7140 00007ff8`4e4f4847 ntdll!RtlpExecuteHandlerForException+0xd [d:\blue\minkernel\ntos\rtl\amd64\xcptmisc.asm @ 131]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0e 00000033`ab3f7170 00007ff8`4e53258a ntdll!RtlDispatchException+0x197 [d:\blue\minkernel\ntos\rtl\amd64\exdsptch.c @ 535]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0f 00000033`ab3f7840 00007ff8`4b6b871c ntdll!KiUserExceptionDispatch+0x3a [d:\blue\minkernel\ntos\rtl\amd64\trampoln.asm @ 715]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">10 00000033`ab3f7f50 00007ff8`45ac5294 KERNELBASE!RaiseException+0x68 [d:\blue\minkernel\kernelbase\xcpt.c @ 828]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">11 00000033`ab3f8030 00007ff8`45ac508e clr!RaiseTheExceptionInternalOnly+0x2fe [f:\dd\ndp\clr\src\vm\excep.cpp @ 3134]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">12 00000033`ab3f8130 00007ff8`453daacf clr!IL_Throw+0x11b [f:\dd\ndp\clr\src\vm\jithelpers.cpp @ 5017]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">13 00000033`ab3f8300 00007ff7`e737cdc2 mscorlib_ni!<span style="background-color: lime">System.Collections.Generic.Dictionary</span>`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].Insert(System.__Canon, System.__Canon, Boolean)+0xdd274f [f:\dd\ndp\clr\src\BCL\System\Collections\Generic\Dictionary.cs @ 314]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">14 00000033`ab3f8390 00007ff7`e737660e <strong>Microsoft_Office_Server_Search!Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.<span style="background-color: yellow">ParseGroupCollection</span></strong>(System.Xml.XmlReader)+0x192 [n:\src\search\managed\lib\OM\Protocols\stsv3ph.cs @ 2642]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">15 00000033`ab3f8410 00007ff7`e7375ef2 Microsoft_Office_Server_Search!Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.InitSite(System.String)+0x2ae [n:\src\search\managed\lib\OM\Protocols\stsv3ph.cs @ 2628]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">16 00000033`ab3f84b0 00007ff7`e7375af9 Microsoft_Office_Server_Search!Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.GetSite(System.String, Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.sSite3 ByRef)+0xa2 [n:\src\search\managed\lib\OM\Protocols\stsv3ph.cs @ 2704]
</span></p>
<p style="margin-left: 36pt"><span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">&lt;truncated&gt;
</span></p>

<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">We can see our function in here...
</span></li>
</ul>
<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">ParseGroupCollection(System.Xml.XmlReader)
</span>
<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">the <span style="background-color: lime">line</span> above is the hashtable\collection
</span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">so i dumped that Stack Object out:
</span></div></li>
</ul>
<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">0:106&gt; !dso 00000033`ab3f8300
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">OS Thread Id: 0x188c (106)
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">RSP/REG Object Name
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">rbx 000000338de594e8 System.String Exception Type: <span style="color: #c00000"><span style="background-color: yellow">System.ArgumentException *** Message : An item with the same key has already been added.</span>
<span style="color: #5b9bd5">*** StackTrace: at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
</span></span></span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> at Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.ParseGroupCollection(XmlReader groupReader)
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> at Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.InitSite(String strSiteUrl)
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt"> at Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper.GetSite(String strSiteUrl, sSite3&amp; site)
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">r12 000000338c634130 Microsoft.Office.Server.Diagnostics.ULSCat
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">r13 000000338c73add8 System.String Exception Type: {0} *** Message : {1} *** StackTrace: {2}
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">r14 000000338de50e08 System.Object[] (System.Object[])
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8300 000000338d241d58 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[Microsoft.Office.Server.Search.Internal.Protocols.sSecurityUser[], Microsoft.Office.Server.Search]]
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8320 000000338d241d58 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[Microsoft.Office.Server.Search.Internal.Protocols.sSecurityUser[], Microsoft.Office.Server.Search]]
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8330 000000338de50970 Microsoft.Office.Server.Search.Internal.Protocols.sSecurityUser[]
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8338 000000338de11038 System.String <span style="background-color: yellow"><strong>1031479 Precision breeding for piglet survival PhD studentship Owners</strong></span>
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8358 000000338d242000 System.String https://foo
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8370 000000338c7694c0 System.Xml.XmlSubtreeReader
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8378 000000338d241cd0 Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8380 000000338de4fe80 System.Xml.XmlSubtreeReader
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8390 000000338de4fe80 System.Xml.XmlSubtreeReader
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8398 000000338be97090 System.Globalization.CultureInfo
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F83B0 000000338de4fdb0 System.String <span style="background-color: yellow"><strong>1031479 Precision breeding for piglet survival PhD studentship Owners</strong></span>
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F83B8 000000338de4fe58 System.String <span style="background-color: yellow"><strong>10058</strong></span>
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F83C8 000000338de50970 Microsoft.Office.Server.Search.Internal.Protocols.sSecurityUser[]
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F83D0 000000338de4fdb0 System.String <span style="background-color: yellow"><strong>1031479 Precision breeding for piglet survival PhD studentship Owners</strong></span>
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F83D8 000000338de4fe58 System.String <span style="background-color: yellow"><strong>10058</strong></span>
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F83E8 000000338c7660a8 System.Xml.XmlTextReaderImpl
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F83F8 000000338d241cd0 Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8400 000000338c7694c0 System.Xml.XmlSubtreeReader
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8548 000000338de50b08 System.ArgumentException
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F85B0 000000338d241cd0 Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F85B8 000000338d242000 System.String https://foo
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F85E0 000000338d242000 System.String https://foo
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F8780 000000338d241cd0 Microsoft.Office.Server.Search.Internal.Protocols.SharePoint2006.CSTS3Helper
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F96B0 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F96C0 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9740 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9770 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9780 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9810 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9820 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9848 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9878 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9880 000000338be91420 System.String
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">00000033AB3F9890 000000338be91420 System.String
</span>
<ul>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">this group is of interest to me:
</span></div></li>
</ul>
<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">1031479 Precision breeding for piglet survival PhD studentship Owners
</span>

<span style="color: #5b9bd5;font-family: Segoe UI Light;font-size: 10pt">10058
</span>
<ul>
 	<li><span style="font-size: 10pt"><span style="font-family: Segoe UI">so i went back to my </span><span style="font-family: Segoe UI Light"><strong><em>SiteCollection.xml</em></strong></span><span style="font-family: Segoe UI"> we had collected..
</span></span></li>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">i changed the PS a bit to dump the $results object from the Previous PS
</span></li>
</ul>
&nbsp;
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">              $results </span><span style="color: darkgray">| </span><span style="color: blue">Select </span><span style="color: blueviolet">Id<span style="color: darkgray">,</span> Name </span><span style="color: darkgray">| </span><span style="color: blue">Out-GridView
</span></span></p>

<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">and then I filtered where Name contains "Precision"
</span></li>
 	<li>
<div><span style="font-family: Segoe UI;font-size: 10pt">i see these entries here:
</span></div></li>
</ul>
<div style="margin-left: 46pt">
<table style="border-collapse: collapse" border="0"><colgroup> <col style="width: 52px" /> <col style="width: 517px" /></colgroup>
<tbody valign="top">
<tr style="height: 20px;background: #4472c4">
<td valign="bottom" style="border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none;padding: 1px 7px 1px 7px"><span style="color: white"><strong>ID</strong></span></td>
<td valign="bottom" style="border-top: solid black 1.0pt;border-left: none;border-bottom: solid black 1.0pt;border-right: none;padding: 1px 7px 1px 7px"><span style="color: white"><strong>Name</strong></span></td>
</tr>
<tr style="height: 20px;background: #d9d9d9">
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px">
<p style="text-align: right"><span style="color: black;font-family: Segoe UI;font-size: 10pt">9972</span></p>
</td>
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px"><span style="color: black;font-family: Segoe UI;font-size: 10pt">1031479 <span style="background-color: yellow">_x0009_</span>Precision breeding for piglet survival PhD studentship Owners</span></td>
</tr>
<tr style="height: 20px">
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px">
<p style="text-align: right"><span style="color: black;font-family: Segoe UI;font-size: 10pt">9973</span></p>
</td>
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px"><span style="color: black;font-family: Segoe UI;font-size: 10pt">1031479 <span style="background-color: yellow">_x0009_</span>Precision breeding for piglet survival PhD studentship Members</span></td>
</tr>
<tr style="height: 20px;background: #d9d9d9">
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px">
<p style="text-align: right"><span style="color: black;font-family: Segoe UI;font-size: 10pt">9974</span></p>
</td>
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px"><span style="color: black;font-family: Segoe UI;font-size: 10pt">1031479 <span style="background-color: yellow">_x0009_</span>Precision breeding for piglet survival PhD studentship Visitors</span></td>
</tr>
<tr style="height: 20px">
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px">
<p style="text-align: right"><span style="color: black;font-family: Segoe UI;font-size: 10pt">10058</span></p>
</td>
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px"><span style="color: black;font-family: Segoe UI;font-size: 10pt">1031479 Precision breeding for piglet survival PhD studentship Owners</span></td>
</tr>
<tr style="height: 20px;background: #d9d9d9">
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px">
<p style="text-align: right"><span style="color: black;font-family: Segoe UI;font-size: 10pt">10059</span></p>
</td>
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px"><span style="color: black;font-family: Segoe UI;font-size: 10pt">1031479 Precision breeding for piglet survival PhD studentship Members</span></td>
</tr>
<tr style="height: 20px">
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px">
<p style="text-align: right"><span style="color: black;font-family: Segoe UI;font-size: 10pt">10060</span></p>
</td>
<td valign="bottom" style="border: none;padding: 1px 7px 1px 7px"><span style="color: black;font-family: Segoe UI;font-size: 10pt">1031479 Precision breeding for piglet survival PhD studentship Visitors</span></td>
</tr>
</tbody>
</table>
</div>
<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">those with IDs = 9972, 9973, 9974 appear to be the Culprit here. ( somehow these entries made it into the Groups table with that funky encoded value )
</span></li>
 	<li>
<div><span style="font-size: 10pt"><span style="font-family: Segoe UI">so we used the following PowerShell "</span><span style="color: black;font-family: Segoe UI Light"><strong><em>SiteGroups</em></strong></span><span style="font-family: Segoe UI">" removed:
</span></span></div></li>
</ul>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$ids </span><span style="color: darkgray">= </span><span style="color: darkred">"9972"<span style="color: darkgray">,</span> "9973"<span style="color: darkgray">,</span> "9974"</span>
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">$w </span><span style="color: darkgray">= </span><span style="color: blue">Get-SPWeb </span><span style="color: blueviolet">https://foo</span>
</span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkblue">foreach</span>(<span style="color: orangered">$sg </span><span style="color: darkblue">in </span><span style="color: orangered">$w<span style="color: darkgray">.</span>SiteGroups <span style="color: darkgray">| </span><span style="color: blue">?</span>{$_<span style="color: darkgray">.</span>Name <span style="color: darkgray">-match </span><span style="color: darkred">"Precision breeding for piglet survival PhD Student"</span>})
</span></span><span style="font-family: Segoe UI;font-size: 9pt">{
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkblue"><span style="color: #333333"> </span>foreach</span>(<span style="color: orangered">$id </span><span style="color: darkblue">in </span><span style="color: orangered">$ids</span>)
</span><span style="font-family: Segoe UI;font-size: 9pt">{
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkblue">if</span>(<span style="color: orangered">$sg<span style="color: darkgray">.</span>Id <span style="color: darkgray">-eq</span> $id</span>)
</span><span style="font-family: Segoe UI;font-size: 9pt">{
</span><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: darkred">"Removing Group " </span><span style="color: darkgray">+ </span><span style="color: orangered">$sg<span style="color: darkgray">.</span>Name <span style="color: darkgray">+ </span><span style="color: darkred">" With ID: " </span><span style="color: darkgray">+</span> $sg<span style="color: darkgray">.</span>Id</span></span></p>
<p style="background: white"><span style="font-family: Segoe UI;font-size: 9pt"><span style="color: orangered">    $w<span style="color: darkgray">.</span>SiteGroups<span style="color: darkgray">.</span>RemoveByID($id</span>)
</span><span style="font-family: Segoe UI;font-size: 9pt">}
</span><span style="font-family: Segoe UI;font-size: 9pt">}
</span><span style="font-family: Segoe UI;font-size: 9pt">}
</span></p>

<ul>
 	<li><span style="font-family: Segoe UI;font-size: 10pt">this should get these groups out and allow the site to be crawled..</span></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Slipstream SharePoint 2013 with March PU + CU</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/slipstream-sharepoint-2013-with-march-pu-cu</link>
      <pubDate>Sun, 09 Mar 2014 14:42:00 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/2014/03/09/slipstream-sharepoint-2013-with-march-pu-cu/</guid>
      <description><![CDATA[I&nbsp;wanted to&nbsp;note that I put this out on our TechNet Wiki Page also&nbsp;and may contain...]]></description>
      <content:encoded><![CDATA[<p>I&nbsp;wanted to&nbsp;note that I put this out on our <a title="TechNet Wiki" href="http://social.technet.microsoft.com/wiki/contents/articles/23875.slipstream-sharepoint-2013-with-march-pu-cu.aspx">TechNet Wiki Page </a>also&nbsp;and may contain more current\revised data so please check there as well!</p>
<p><span style="font-size:small;">I have seen several inquiries out here on the internet, along with a few blogs where people have experienced issues when trying to slipstream SharePoint 2013 to the latest Cumulative Update, ex: </span><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2825647"><span style="font-size:small;">October 2013 CU</span></a><span style="font-size:small;">. As most of you may know, in order to get to the latest build, you must install March 2013 PU as a pre-requisite before you can get October 2013, December 2013 CU applied. In theory, the slipstreaming process consists of</span></p>
<ol>
<li><span style="font-size:small;">Downloading the PU\CU </span></li>
<li><span style="font-size:small;">Extracting the contents of the PU\CU </span></li>
<li><span style="font-size:small;">Move them into the &ldquo;<em>updates</em>&rdquo; folder in your SP installation folder and GO</span></li>
</ol>
<p><span style="font-size:small;">The problem we have seen with some of our customers in SP 2013, is they extract </span><a href="http://support.microsoft.com/kb/2767999"><span style="font-size:small;">March PU</span></a><span style="font-size:small;">, </span><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2825647"><span style="font-size:small;">October 2013 CU</span></a><span style="font-size:small;"> along with the contents of the &ldquo;<em>ubersrv_1.cab</em>&rdquo;, and then copy these into the &ldquo;updates&rdquo; folder. They then install SharePoint with the expectation that when the farm builds out, it would reflect the build of the latest update ( ex: 4551.1000 for October ) but in reality it shows the farm build to be RTM still. </span></p>
<p><span style="color:#ff8000;font-size:small;"><strong>Note</strong>: I am going to stop right here for a minute and advise that if you want to install a base install with the latest builds, I would advise to go ahead and download a slipstreamed build of &ldquo;SP 2013 with SP1&rdquo; ( from MSDN ) OR download </span><a href="http://support.microsoft.com/kb/2817429"><span style="color:#ff8000;font-size:small;">SP1</span></a><span style="color:#ff8000;font-size:small;">, extract its contents ( using &ldquo;officeserversp2013-kb2817429-fullfile-x64-en-us.exe /extract:C:\SP1_extract&rdquo; ) and just build your slipstream this way. SP1 includes all of the PU\CU updates since the release of RTM up through December 2013 CU &amp; January 2014 PU</span></p>
<p><span style="font-size:small;">If you decide you are not ready to do this and still want to slipstream March 2013 PU + &ldquo;subsequent CU&rdquo;, then I am going to outline how you can successfully do this. I would also like to preface this with the fact that this is primarily applicable if you are slipstreaming March PU + &ldquo;subsequent CU&rdquo; with the English language only. </span></p>
<p><strong><span style="font-size:small;">Here we go! ( I am using October 2013 CU as my &ldquo;subsequent CU&rdquo; in my steps here )</span></strong></p>
<p><span style="font-size:small;">I want to provide a little background on WHY just extracting and putting into &ldquo;updates&rdquo; folders will not work. Since March 2013 PU is a pre-requisite to installing CU&rsquo;s, SP must know that March PU has been applied before it can apply the October 2013 CU. This is known as a new baseline called &ldquo;<strong>SP0</strong>&rdquo; How does it know its applied when this is a brand new install? It doesn&rsquo;t, so it does not apply the updates at all and this is why you see the farm build out at RTM still. In order to get these updates to &ldquo;apply&rdquo; we have to do a little manipulation to the .msp files to &ldquo;trick&rdquo; SP into applying the March 2013 PU updates and then the later CU .msp will be applied. </span></p>
<p><span style="font-size:small;">Start By Downloading the following:</span></p>
<p><b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">March 2013 Public Update:</span></b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&nbsp;</span></p>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;"><a href="http://support.microsoft.com/kb/2767999">http://support.microsoft.com/kb/2767999</a></span></p>
<p style="margin:0 0 .0001pt .5in;"><b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">September 2013 Update:</span></b></p>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&nbsp;</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;"><a href="http://support.microsoft.com/kb/2810081">http://support.microsoft.com/kb/2810081</a></span><b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;"></span></b></p>
<p style="margin:0 0 .0001pt .5in;"><b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">October 2013 Cumulative Update:</span></b></p>
<p style="margin:0 0 .0001pt .5in;"><b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;"></span></b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;"><a href="http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2825647">http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2825647</a></span></p>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Once you have these downloaded and saved to C:\Hotfix\&lt;UpdateDir&gt;, you will want to extract each one..</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Starting with <b>March 2013 CU</b>, I run the following command to extract the msp&rsquo;s from the .exe</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">c:\Hotfix\<span style="background:yellow;">March 2013 PU</span>&gt;<i>ubersrvsp2013-kb2767999-fullfile-x64-glb.exe /extract:&quot;C:\Hotfix\March 2013 PU\extracted&quot;</i></span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Like I mentioned in a previous email, in order to get to the <b>October 2013 CU</b> or later builds, like October or December, the server needs to think it has a new baseline, what we refer to as <b>SP0</b>, before it will apply those binaries during the install.</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">In order to trick the server into thinking this, we have to do some manipulation to the <b>March 2013 PU</b> msp&rsquo;s and rename them before putting them into the &ldquo;updates&rdquo; folder..</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Once you have extracted them, there should be 16 of these files, we will want to rename them to have a &ldquo;_&rdquo; as a prefix and a &ldquo;-SP0&rdquo; as a suffix</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">I used a tool called &ldquo;Bulk Rename&rdquo; to do this, but this is what the file names should look like</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_acsrvwfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;"></span><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_coreserver-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_eduwfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_ifswfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_lpsrvwfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_oserver-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_osfserver-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_ppsmawfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_pptserver-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_sms-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_sts-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_vsrvwfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_wasrvwfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_wdsrv-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_wss-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;"></span><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">_xlsrvwfe-x-none-SP0.msp</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Once you have renamed these, you can now place them into your &ldquo;updates&rdquo; folder ( </span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">C:\Apps\SP2013\October4551\Updates </span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">)</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Next extract the <b>September 2013 Update</b></span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">c:\Hotfix\<span style="background:yellow;">September 2013 Update</span>&gt;<i>svrproofloc2013-kb2760250-fullfile-x64-glb.exe /extract:&quot;C:\Hotfix\September 2013 Update\extracted&rdquo;</i></span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Since this is English Only, we will copy the following file and place it into the &ldquo;</span><i><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">updates</span></i><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&rdquo; folder&rdquo;</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">svrproof-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Now lets move to the October 2013 CU</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Keep in mind this patch has the &ldquo;</span><b><span style="font-size:9pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">ubersrv2013-kb2825647-fullfile-x64-glb.exe</span></b><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&rdquo; but it also has a &ldquo;.com&rdquo; file and the &ldquo;</span><i><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">ubersrv_1.cab</span></i><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&rdquo; file&hellip;</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">We will want to extract the files from the &ldquo;.exe&rdquo; and the &ldquo;.cab&rdquo; file..</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">c:\Hotfix\October 2013-4551.1005&gt;<i>ubersrv2013-kb2825647-fullfile-x64-glb.exe /extract:&quot;C:\Hotfix\October 2013-4551.1005\extracted</i>&quot;</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">To extract the .cab files, just go into the cab file, select All and then extract to &quot;C:\Hotfix\October 2013-4551.1005\cab_extracted&rdquo;</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Once you have extracted all of these files, and since this is English Only, we want to go find the files ending in &ldquo;</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#ed7d31;">en-us.msp</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&rdquo; AND &ldquo;</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#ed7d31;">x-none.msp</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&rdquo;</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">From the &ldquo;</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">C:\Hotfix\<span style="background:yellow;">October 2013-4551.1005</span>\extracted&rdquo;</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">acsrvmui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">coreservermui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">edumui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">ifsmui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">lpsrvmui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">osfservermui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">ppsmamui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">pptservermui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">smsmui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">acsrvwfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">coreserver-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">eduwfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">ifswfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">lpsrvwfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">osfserver-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">ppsmawfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">pptserver-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">sms-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">sts-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">vsrvwfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">wasrvwfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">wdsrv-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">wss-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">xlsrvwfe-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">From the &ldquo;</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">C:\Hotfix\<span style="background:yellow;">October 2013-4551.1005</span>\cab_extracted</span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&rdquo;</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">acsrvmui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">wssmui-en-us.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">pptserver-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">sts-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">wdsrv-x-none.msp</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">Put these into the &ldquo;</span><i><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:black;">updates</span></i><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">&rdquo; folder</span></p>
</blockquote>
<blockquote>
<p style="text-indent:-0.25in;margin:0 0 .0001pt .5in;"><span style="font-size:10pt;font-family:symbol;color:#44546a;"><span>&middot;<span style="font:7pt &#39;Times New Roman&#39;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size:10pt;font-family:&#39;Segoe UI&#39;,&#39;sans-serif&#39;;color:#44546a;">At this point, you should have 46 files in the folder.</span></p>
</blockquote>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:small;">You should be able to install SP at this point and it reflect the correct build when the farm is built. Setting this baseline by renaming the Marm 2013 PU msp&rsquo;s is the key point here in getting this to work correctly. Our source code knows that the files with &ldquo;_&rdquo; should be installed first and then we can apply the later CU&rsquo;s. This takes a bit of work to get this done, but it can be done. Again, if you want to just download SP1, you should be able to extract these files and put them into &ldquo;updates&rdquo; or download a pre-built SP1 install. </span></p>
<p style="margin:0 0 .0001pt .5in;"><span style="font-size:small;">Hope this is helpful!</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Search Service Application: Flip “Include” FileTypes list to “Exclude”</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/search-service-application-flip-include-filetypes-list-to-exclude</link>
      <pubDate>Fri, 17 May 2013 22:57:19 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/2013/05/17/search-service-application-flip-include-filetypes-list-to-exclude/</guid>
      <description><![CDATA[It’s been a while since I have posted anything, so hello again! :) I have been meaning to post this...]]></description>
      <content:encoded><![CDATA[<p><font size="2">It’s been a while since I have posted anything, so hello again! :) I have been meaning to post this for some time, but time seems to be my enemy.</font></p> <font size="2"></font>  <p><font size="2">I worked with a customer a while back that ran into a scenario where they were using a standard “Search Service Application” within the SharePoint 2010 and they were crawling a non-SharePoint, Apache based wiki site, called “MediaWiki.” MediaWiki will allow you to create a new page with pretty much any name you would like.</font></p> <font size="2"></font>  <p><font size="2">Example:</font></p>  <p><a href="http://www.contoso.com/mediawiki/wiki.test.page">http://www.contoso.com/mediawiki/<strong>wiki.test.page</strong></a></p>  <p><font size="2">When their content source would go out and crawl this site, it would not crawl and index this new page, so it was not showing up in search results.</font></p> <font size="2"></font>  <p><font size="2">By default, within the SSA (<em>Search Service Application</em>) Administration page we have a link called “File Types”, and this page controls what File Extensions we will and will not crawl.</font> </p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/metablogapi/7870.FileTypes_0C6193E6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23-metablogapi/7870.FileTypes_5F00_0C6193E6.png"><img title="FileTypes" style="display: inline;" border="0" alt="FileTypes" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/metablogapi/3386.FileTypes_thumb_03085F63.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23-metablogapi/3386.FileTypes_5F00_thumb_5F00_03085F63.png" width="754" height="355" /></a> </p>  <p>&#160;</p>  <p><font size="2">By Default, within a SharePoint SSA, NOT FAST 4 SharePoint 2010, this “<em>File Types</em>” list is an “Include” list, so anything NOT in this list will not get crawled. Here in lies the problem for my customer. Being that end users had the capability to create a page with any name, the “extensions” could vary from anything. Trying to control what extensions will need to be in this list would be nearly impossible and require a lot of man hours to even try to maintain this!</font></p> <font size="2"></font>  <p><font size="2">Here is where my customer turned to </font><a href="http://support.microsoft.com"><font size="2">Microsoft</font></a><font size="2"> support, to look for a solution or a potential work around. The solution we provided the customer was to utilize </font><a href="http://technet.microsoft.com/en-us/library/bb978526.aspx"><font size="2">PowerShell</font></a><font size="2"> and manually “flip” this “Include” list to an “Exclude” list, so that the SSA will crawl any extension, except for what is now in the “File Types” list.</font></p> <font size="2"></font>  <p><font size="2">Here are the steps to accomplish this task:</font></p>  <p><b><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">Flip the List to an Exclude List</span></b></p>  <ul>   <li><b><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span></b><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">Open PowerShell Management Shell for SharePoint with elevated rights, or if you have PowerShell ISE, you can use this also</span></li>    <li><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">Execute the following:</span></li> </ul>  <blockquote>   <p><span style="color: purple; font-family: &quot;Courier New&quot;; font-size: 10pt;">$sa</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"> </span><span style="color: red; font-family: &quot;Courier New&quot;; font-size: 10pt;">=</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"> </span><span style="color: cadetblue; font-family: &quot;Courier New&quot;; font-size: 10pt;">Get-SPServiceApplication</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"> </span><span style="color: blue; font-family: &quot;Courier New&quot;; font-size: 10pt;">|</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"> </span><span style="color: blue; font-family: &quot;Courier New&quot;; font-size: 10pt;">where</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"> { </span><span style="color: navy; font-family: &quot;Courier New&quot;; font-size: 10pt;">$_</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: &quot;Courier New&quot;; font-size: 10pt;">ApplicationClassId </span><span style="color: red; font-family: &quot;Courier New&quot;; font-size: 10pt;">-eq</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"> </span><span style="color: maroon; font-family: &quot;Courier New&quot;; font-size: 10pt;">&quot;52547a3d-66ed-468e-b00a-8c4a3ec7d404&quot;</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"> }</span></p>    <p><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;"></span><span style="color: purple; font-family: &quot;Courier New&quot;; font-size: 10pt;">$sa</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: &quot;Courier New&quot;; font-size: 10pt;">SetIsExtensionIncludeList</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;">(</span><span style="color: purple; font-family: &quot;Courier New&quot;; font-size: 10pt;">$sa</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;">.</span><span style="color: saddlebrown; font-family: &quot;Courier New&quot;; font-size: 10pt;">GetVersion</span><span style="color: black; font-family: &quot;Courier New&quot;; font-size: 10pt;">(),0)</span><span style="color: blue; font-family: &quot;Courier New&quot;; font-size: 10pt;">;</span></p> </blockquote>  <p><span style="color: blue; font-family: &quot;Courier New&quot;; font-size: 10pt;"></span><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span></p>  <ul>   <li><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">This will flip the SSA to make it an Exclude list</span></li>    <li><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">Restart OSearch14 via services.msc console or with command line</span><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"> </span></li> </ul>  <blockquote>   <p></p>   <b><span style="color: black; font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 9pt;">net stop OSearch14</span></b>     <p><b><span style="color: black; font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 9pt;"></span></b><b><span style="color: black; font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 9pt;">net start OSearch14</span></b></p>    <p><b><span style="color: black; font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 9pt;"></span></b></p> </blockquote>  <p><font size="2">Keep in mind now that this list is now an “Exclude” so anything in here will no longer be crawled..</font></p> <font size="2"></font>  <p><font size="2">We then utilized additional PowerShell to clean out all the existing “File Types” and allowed the customer to start with a clean slate:</font></p>  <p><b><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">Remove the existing file types</span></b><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"> </span></p>  <p>&#160;</p>  <p></p>  <ul>   <li><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">Again using PowerShell Management Shell or PowerShell ISE</span></li>    <li><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">Execute the Following: </span><span style="color: rgb(228, 108, 10); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;">(make sure you replace the “SSA” with the name of your Search Service Application)</span></li> </ul>  <p><span style="color: rgb(228, 108, 10); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span></p>  <blockquote>   <p><span style="color: rgb(228, 108, 10); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span><span style="color: orangered; font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;">$ssa</span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"> <span style="color: darkgray;">=</span> <span style="color: blue;">Get-SPEnterpriseSearchServiceApplication</span> <span style="color: navy;">-Identity</span> <span style="color: darkred;">&quot;SSA&quot;</span> <span style="color: orangered;">$content</span> <span style="color: blueviolet;">=</span> <span style="color: blueviolet;">New-Object</span> <span style="color: blueviolet;">Microsoft.Office.Server.Search.Administration.Content</span>(<span style="color: orangered;">$ssa</span>) </span></p> </blockquote>  <ul>   <p></p>    <p></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="color: orangered; font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;">$extList</span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"> <span style="color: darkgray;">=</span> <span style="color: orangered;">$content</span><span style="color: darkgray;">.</span>ExtensionList </span></p>    <p></p>    <p></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="color: orangered; font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;">$list</span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"> <span style="color: darkgray;">=</span> <span style="color: blue;">New-Object</span> <span style="color: blueviolet;">System.Collections.ArrayList</span> </span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"><span style="color: darkblue;">foreach</span> (<span style="color: orangered;">$ext</span> <span style="color: darkblue;">in</span> <span style="color: orangered;">$extList</span>)</span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;">{ </span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"><span style="color: orangered;">$list</span><span style="color: darkgray;">.</span>Add(<span style="color: orangered;">$ext</span>);</span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;">}</span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"><span style="color: darkblue;">for</span> (<span style="color: orangered;">$i</span> <span style="color: darkgray;">=</span> <span style="color: purple;">0</span>; <span style="color: orangered;">$i</span> <span style="color: darkgray;">-lt</span> <span style="color: orangered;">$list</span><span style="color: darkgray;">.</span>Count; <span style="color: orangered;">$i</span><span style="color: darkgray;">++</span>)</span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;">{ </span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"><span style="color: orangered;">$ext</span> <span style="color: darkgray;">=</span> <span style="color: orangered;">$list</span><span style="color: darkgray;">[</span><span style="color: orangered;">$i</span><span style="color: darkgray;">]</span></span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"><span style="color: darkgray;"></span></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"><span style="color: orangered;">$ext</span><span style="color: darkgray;">.</span>FileExtension</span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"><span style="color: orangered;">$ext</span><span style="color: darkgray;">.</span>Delete()</span></p>    <p class="MsoNormal" style="background: white; line-height: normal; margin-bottom: 0pt; mso-layout-grid-align: none;"><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;"></span><span style="font-family: &quot;Lucida Console&quot;; font-size: 9pt; mso-bidi-font-family: &quot;Lucida Console&quot;;">} </span></p>    <p></p>    <p></p> </ul>  <p><span style="color: rgb(228, 108, 10); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span></p> <font size="2"></font>  <p><font size="2">Below is a list of Extensions that FAST includes OOB.. Feel free to add these in as needed.. I just wanted to give you a list of extensions that MS uses as “excludes”</font></p>  <p class="MsoNormal"><span style="color: rgb(31, 73, 125); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span></p> <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/metablogapi/8004.OOBExclude1_0BF7F1A2.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23-metablogapi/8004.OOBExclude1_5F00_0BF7F1A2.png"><img title="OOBExclude1" style="display: inline;" border="0" alt="OOBExclude1" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/metablogapi/3644.OOBExclude1_thumb_4DFE60E3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23-metablogapi/3644.OOBExclude1_5F00_thumb_5F00_4DFE60E3.png" width="596" height="507" /></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/metablogapi/0042.OOBExclude2_08E593AD.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23-metablogapi/0042.OOBExclude2_5F00_08E593AD.png"><img title="OOBExclude2" style="display: inline;" border="0" alt="OOBExclude2" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/metablogapi/2526.OOBExclude2_thumb_4AEC02EE.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23-metablogapi/2526.OOBExclude2_5F00_thumb_5F00_4AEC02EE.png" width="596" height="396" /></a>   <p></p>  <p><font size="2">I have tested this within our lab, using a clean slate, and it worked. Please let me know if you have any questions. Thanks!</font></p>  <p><font size="2">I believe this should transfer over to SP 2013 also…</font></p>  <p><span style="color: rgb(228, 108, 10); font-family: &quot;Segoe UI&quot;,&quot;sans-serif&quot;; font-size: 10pt;"></span></p>  <p class="MsoNormal"><b><span style="color: rgb(192, 0, 0); font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;"><font size="2">' THIS CODE AND INFORMATION IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF</font></span></b></p>  <p class="MsoNormal"><b><span style="color: rgb(192, 0, 0); font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;"><font size="2">' ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO</font></span></b></p>  <p class="MsoNormal"><b><span style="color: rgb(192, 0, 0); font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;"><font size="2">' THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A </font></span></b></p>  <p class="MsoNormal"><b><span style="color: rgb(192, 0, 0); font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;"><font size="2">' PARTICULAR PURPOSE. </font></span></b></p> <b><span style="color: rgb(192, 0, 0); font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;">     <br /><font size="2">' It is highly recommended that you FULLY understand what this code is doing        <br />' and use this code at your own risk. </font></span></b><font size="2"></font>  <p class="MsoNormal"><b><span style="color: rgb(192, 0, 0); font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;; font-size: 11pt;"><font size="2">' Copyright (C) Microsoft Corporation, 2013</font></span></b></p>]]></content:encoded>
    </item>
    <item>
      <title>Add “OpenItems” permission to the default AnonymousPermMask64, enabling opening of Office Docs within an Anonymous Accessible SharePoint site.</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/add-openitems-permission-to-the-default-anonymouspermmask64-enabling-opening-of-office-docs-within-an-anonymous-accessible-sharepoint-site</link>
      <pubDate>Sat, 01 Oct 2011 00:35:59 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/2011/10/01/add-openitems-permission-to-the-default-anonymouspermmask64-enabling-opening-of-office-docs-within-an-anonymous-accessible-sharepoint-site/</guid>
      <description><![CDATA[Hello Everyone..!! It’s been a little while since I last posted. There have been several inquiries...]]></description>
      <content:encoded><![CDATA[<p><font size="2" face="Segoe UI">Hello Everyone..!! It’s been a little while since I last posted. There have been several inquiries on this issue and it also appears to be a common query among search engines, peers, and friends in the SharePoint community.&#160; Since </font><a href="http://sharepoint.microsoft.com"><font size="2" face="Segoe UI">SharePoint 2010</font></a><font size="2" face="Segoe UI"> is growing in popularity, I am going to put emphasis on this version of the product within this blog.</font></p>  <p><font size="2" face="Segoe UI">The issue at hand is when directly linking Office Documents within your site, even though anonymous access is enabled, you are still prompted for credentials and if you cancel, an error is received:</font></p>  <blockquote>   <p><font color="#000000" size="2" face="Segoe UI">401 Unauthorized</font></p> </blockquote>  <p><font size="2" face="Segoe UI">Ideally, as an anonymous user, you should be able to open this document, without being prompted for credentials and without getting a “401 Unauthorized”</font></p>  <p><font size="2" face="Segoe UI">Initially this was a common problem when direct links were added to .xlsx files.&#160; Findings show when a Document library containing .xlsx and .xls files are directly linked to URL’s, the .xlsx fails and the .xls succeeds.</font></p>  <p><font size="2" face="Segoe UI">We are now seeing similar behavior in </font><a href="http://sharepoint.microsoft.com"><font size="2" face="Segoe UI">SharePoint 2010</font></a><font size="2" face="Segoe UI"> where </font><a href="http://office.microsoft.com/en-us/web-apps/office-web-apps-FX102750782.aspx"><font size="2" face="Segoe UI">Office Web Apps</font></a><font size="2" face="Segoe UI"> have been installed on the SharePoint servers.</font></p>  <p><strong><font size="2" face="Segoe UI">So… Why do we get this error in the first place…?</font></strong></p>  <ul>   <li><font size="2" face="Segoe UI">In SharePoint 2007 and 2010, “.xlsx” extensions are mapped to the “xlviewer.aspx” page, via a file called, “serverfilesExcelServer.xml”</font> </li>    <li><font size="2" face="Segoe UI">This page actually requires an additional permission, “OpenItems”, in order for it to successfully render a “.xlsx” file. </font></li>    <li><font size="2" face="Segoe UI">In SharePoint 2010, when you install Office Web Apps, we add additional file handlers that now map other extensions, like .doc and .docx, to pages, like “wordviewer.aspx”. </font></li>    <li><font size="2" face="Segoe UI">These pages also require the “OpenItems” permission that anonymous users do NOT have.</font> </li>    <li><font size="2" face="Segoe UI">By default, Anonymous Users do NOT have this “OpenItems” permission and this is what causes the failure to open or render the files</font> </li> </ul>  <blockquote>   <p><font face="Segoe UI"><font size="2"><font color="#000000"><strong>Note:</strong> There have been numerous postings on the web advising simply remove the mapping within the above mentioned XML file, but this will put you into an unsupported state, so it is recommended NOT to do this.</font> </font></font></p> </blockquote>  <p><font size="2" face="Segoe UI">If you were to look at the ULS logs while trying to access a directly linked document, you will see something like this:</font></p>  <blockquote>   <p><font color="#000000" size="2">09/19/2011 16:20:59.87&#160;&#160; w3wp.exe (0x3164)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 0x3DF4&#160; SharePoint Foundation&#160;&#160;&#160;&#160;&#160;&#160;&#160; General&#160;&#160; ewn8&#160;&#160;&#160;&#160;&#160; Verbose&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font style="background-color: #ffff00">OriginalPermissionMask check failed. asking for 0x00000021, have 0x1000031041</font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; f22f656c-a188-4a4c-9b41-8deeb6b934bd</font></p> </blockquote>  <p><font size="2" face="Segoe UI">And this is what the Permission Mask(s) translates to:</font></p>  <blockquote>   <p><font style="background-color: #ffff00" color="#000000" size="2">OriginalPermissionMask check failed. asking for 0x00000021, have 0x1000031041</font></p>    <p><font color="#000000"><font size="2">0x00000021 = </font><font size="2">ViewListItems, </font><font size="2">OpenItems</font></font></p>    <p><font color="#000000"><font size="2">0x1000031041 =&#160; </font><font size="2">ViewListItems, </font><font size="2">ViewVersions, </font><font size="2">ViewFormPages, </font><font size="2">Open, </font><font size="2">ViewPages, </font><font size="2">UseClientIntegration</font></font></p> </blockquote>  <p><font size="2" face="Segoe UI">As we can see, we are asking for “OpenItems” and we do not have it…</font></p>  <p><a href="http://support.microsoft.com/kb/2498047/en-us"><font size="2" face="Segoe UI">KB2498047</font></a><font size="2" face="Segoe UI"> was published to address the “.xlsx” extension, but it will also address additional Office Doc extensions. There are 3 possible work arounds, but I am going to focus on the solution provided that utilizes PowerShell to add the “OpenItems” permission to our </font><a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx"><font size="2" face="Segoe UI">SPBasePermissions</font></a><font size="2" face="Segoe UI"> for anonymous users. This PowerShell will assist in adding “OpenItems” to a single web….</font></p>  <p><font size="2" face="Segoe UI"><strong>So what if I have a Site Collection and this site collection contains 2000 + webs? </strong></font></p>  <p><font size="2" face="Segoe UI"><strong>What if some of these webs inherit permissions from the parent web, but a lot of them actually contain unique permissions?</strong> (They are still anonymous access webs, they just contain a Unique Permission Scope)</font></p>  <p><font size="2" face="Segoe UI"><strong>Do I need to execute this PowerShell for each web in my Site Collection…?</strong></font></p>  <p><font size="2" face="Segoe UI">If your Site Collection had 2000+ webs and they all inherited from the parent web, then you could execute the PowerShell at the root Site Collection, or Top-Level Site and be done. But since you may have 2000+ webs that have unique permission scopes, we would need to iterate through the entire Web Application and set this “OpenItems” permission on our </font><a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.anonymouspermmask64.aspx"><font size="2" face="Segoe UI">AnonymousPermMask64</font></a><font size="2" face="Segoe UI">.</font></p>  <p><font size="2" face="Segoe UI">We put together a PowerShell script that would do this for you as well as the script to undo that permission add:</font></p>  <blockquote>   <p><font face="Segoe UI"><font size="2"><font color="#ff0000"><b>NOTE:</b> Giving anonymous &quot;OpenItems&quot; permission allows anonymous users to have view source rights to certain files that could potentially contain sensitive info.</font></font></font></p>    <p><font face="Segoe UI"><font size="2"><font color="#ff0000"><strong>NOTE*: </strong>That you should only do this if you understand &amp; accept the security implications.</font></font></font></p> </blockquote>  <p>&#160;</p>  <p style="margin: 0in 0in 0pt" class="MsoNormal"><b><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#000000">To Set “OpenItems” across an entire Web Application:</font></font></span></b></p>  <p style="margin: 0in 0in 0pt" class="MsoNormal"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraph"><font color="#1f497d"><span style="font-family: ; color: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font face="Symbol"><font style="font-size: 10pt">·</font></font><span style="line-height: normal; font-family: "><font face="Times New Roman"><font style="font-size: 7pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></span></span><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt">Once the ps1 is saved, pass the URL as the $arg, Ex:</font></font></span></font></p>  <p style="margin: 0in 0in 0pt 0.5in" class="MsoListParagraph"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in" class="MsoListParagraph"><font face="Segoe UI"><i><span style="font-family: ; color: "><font color="#000000"><font style="font-size: 10pt">.\AnonPermMask64_OpenItems_Add.ps1</font></font></span></i><span style="font-family: ; color: "><font style="font-size: 10pt"><font color="#1f497d"> “</font><a href="http://www.somesite.com"><font color="#0000ff"><u>http://www.somesite.com</u></font></a><font color="#1f497d">”</font></font></span></font></p>  <p style="margin: 0in 0in 0pt" class="MsoNormal"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraph"><font color="#1f497d"><span style="font-family: ; color: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font face="Symbol"><font style="font-size: 10pt">·</font></font><span style="line-height: normal; font-family: "><font face="Times New Roman"><font style="font-size: 7pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></span></span><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt">Code:</font></font></span></font></p>  <p style="margin: 0in 0in 0pt 0.5in" class="MsoListParagraph"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d"></font></font></span></p>  <blockquote>   <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">Add-PSSnapin Microsoft.SharePoint.PowerShell</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">[</font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">void</font></span><font color="#000000">][System.Reflection.Assembly]::LoadWithPartialName(</font><span style="color: "><font color="#a31515">&quot;Microsoft.SharePoint&quot;</font></span><font color="#000000">)</font></font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160; $siteUrl = Get-SPWebApplication $args[0] | Get-SPSite -limit All; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160; </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">foreach</font></span><font color="#000000">($url </font><span style="color: "><font color="#0000ff">in</font></span><font color="#000000"> $siteUrl)</font></font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160; {</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; write-host $url.url;</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; $site = New-Object Microsoft.SharePoint.SPSite($url.url);</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">foreach</font></span><font color="#000000">($webs </font><span style="color: "><font color="#0000ff">in</font></span><font color="#000000"> $site.AllWebs)</font></font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $enumPerms = [Microsoft.SharePoint.SPBasePermissions]; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">if</font></span><font color="#000000"> ($webs.HasUniquePerm)</font></font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Setting Attribute for '</font></span><font color="#000000">$webs.url;</font></font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $webs.AnonymousPermMask64 = $webs.AnonymousPermMask64 -bor $enumPerms::OpenItems </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $webs.Update(); </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Attribute for '</font></span><font color="#000000">$webs.url</font><span style="color: "><font color="#a31515">' has been set'</font></span><font color="#000000">;</font></font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } </font></font><span style="color: "><font style="font-size: 9.5pt" color="#0000ff">else</font></span></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Setting Attribute for '</font></span><font color="#000000">$webs.url;</font></font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><span style="color: "><font style="font-size: 9.5pt" color="#a31515">'Site Inherits Permission from Parent'</font></span></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; $site.Dispose();</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160; }&#160; </font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160; ##end of the for each loop</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>    <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">write-host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Finished'</font></span><font color="#000000">;</font></font></font></span></p> </blockquote>  <p style="margin: 0in 0in 0pt 0.5in" class="MsoListParagraph"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt" class="MsoNormal"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt" class="MsoNormal"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt" class="MsoNormal"><b><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#000000">To Remove The “OpenItems” across the Web Application:</font></font></span></b></p>  <p style="margin: 0in 0in 0pt" class="MsoNormal"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class="MsoListParagraph"><font color="#1f497d"><span style="font-family: ; color: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><font face="Symbol"><font style="font-size: 10pt">·</font></font><span style="line-height: normal; font-family: "><font face="Times New Roman"><font style="font-size: 7pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></span></span><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt">Code:</font></font></span></font></p>  <p style="margin: 0in 0in 0pt 0.5in" class="MsoListParagraph"><span style="font-family: ; color: "><font face="Segoe UI"><font style="font-size: 10pt" color="#1f497d">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">Add-PSSnapin Microsoft.SharePoint.PowerShell</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">[</font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">void</font></span><font color="#000000">][System.Reflection.Assembly]::LoadWithPartialName(</font><span style="color: "><font color="#a31515">&quot;Microsoft.SharePoint&quot;</font></span><font color="#000000">)</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160; $siteUrl = Get-SPWebApplication $args[0] | Get-SPSite -limit All; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160; </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">foreach</font></span><font color="#000000">($url </font><span style="color: "><font color="#0000ff">in</font></span><font color="#000000"> $siteUrl)</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160; {</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; write-host $url.url;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; $site = New-Object Microsoft.SharePoint.SPSite($url.url);</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">foreach</font></span><font color="#000000">($webs </font><span style="color: "><font color="#0000ff">in</font></span><font color="#000000"> $site.AllWebs)</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $enumPerms = [Microsoft.SharePoint.SPBasePermissions]; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#0000ff">if</font></span><font color="#000000"> ($webs.HasUniquePerm)</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Setting Attribute for '</font></span><font color="#000000">$webs.url;</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $webs.AnonymousPermMask64 = </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">&quot;ViewListItems, ViewVersions, ViewFormPages, Open, ViewPages, UseClientIntegration&quot;</font></span><font color="#000000"> </font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $webs.Update(); </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Attribute for '</font></span><font color="#000000">$webs.url</font><span style="color: "><font color="#a31515">' has been set'</font></span><font color="#000000">;</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; } </font></font><span style="color: "><font style="font-size: 9.5pt" color="#0000ff">else</font></span></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Setting Attribute for '</font></span><font color="#000000">$webs.url </font><span style="color: "><font color="#a31515">'back to default BasePermissions'</font></span><font color="#000000">;</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Write-Host </font></font><span style="color: "><font style="font-size: 9.5pt" color="#a31515">'Site Inherits Permission from Parent'</font></span></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160;&#160; $site.Dispose();</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160; }&#160; </font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "><font face="Consolas"><font style="font-size: 9.5pt" color="#000000">&#160;&#160;&#160;&#160;&#160;&#160; ##end of the for each loop</font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: "></span><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font face="Consolas"><font color="#000000"><font style="font-size: 9.5pt">write-host </font></font><font style="font-size: 9.5pt"><span style="color: "><font color="#a31515">'Finished'</font></span><font color="#000000">;</font></font></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" face="Consolas"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" size="2" face="Segoe UI"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" size="2" face="Segoe UI"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" size="2" face="Segoe UI"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" size="2" face="Segoe UI"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" size="2" face="Segoe UI">I hope you found this helpful. There is some information not covered here in order to keep it concise. If you have any questions, please feel free to post and I will address them as soon as possible. Thanks!</font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" face="Consolas"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" face="Consolas"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" face="Consolas"></font></span></p>  <p style="margin: 0in 0in 0pt 0.5in; text-autospace: " class="MsoNormal"><span style="font-family: ; mso-fareast-font-family: calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: en-us; mso-fareast-language: en-us; mso-bidi-language: ar-sa"><font color="#000000" face="Consolas">&#160;</font></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Using "stsadm -o migrateuser" After deleting and re-creating an Account in Active Directory</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/using-stsadm-o-migrateuser-after-deleting-and-re-creating-an-account-in-active-directory</link>
      <pubDate>Fri, 13 May 2011 14:14:00 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/2011/05/13/using-stsadm-o-migrateuser-after-deleting-and-re-creating-an-account-in-active-directory/</guid>
      <description><![CDATA[Hello Everyone&hellip; Its been a while since I wrote a blog. I wanted to share some good...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri; color: #363636; font-size: medium;">Hello Everyone&hellip; Its been a while since I wrote a blog. I wanted to share some good information on using<b> stsadm -o migrateuser</b> after an Account has been deleted within Active Directory and then re-created with the same Account Name.</span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">Consider the following Scenario:</span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>
<ul>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">We have a user that has an account in Active Directory with account name = <b>DOMAIN\jdoe</b></span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">This user has a <b>SID = S-1-5-21-1461310-839809092-932994037-4144</b></span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">User, <b>DOMAIN\jdoe</b>, has been granted permissions to some 300 site collections</span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">Its determined that this user account is having some permission issues within the Domain so the AD account is deleted. :)</span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">The account is now re-created again within AD and given the same account name, <b>DOMAIN\jdoe</b></span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">Except now a new SID is created within AD</span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;"><b>SID = S-1-5-21-1461310-839809092-932994037-4147</b></span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">The problem we now have is that because this user already had permissions on some 300 sites that are associated with the Old SID </span></li>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">The account name may be the same but when this user tries to Access Any of the Sites, there is a SID mismatch and the user now gets an Access Denied:</span></li>
</ul>
<p><span style="color: #363636;"><span style="font-family: Calibri; font-size: medium;">&nbsp;</span>&nbsp;</span></p>
<ul>
<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/1321.AccessDenied.PNG" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23/1321.AccessDenied.PNG"><span style="color: #363636; font-size: medium;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/23/1321.AccessDenied.PNG" original-url="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-23/1321.AccessDenied.PNG" border="0" /></span></a><span style="font-family: Calibri;"><span style="color: #363636; font-size: medium;">&nbsp;</span></span> 
</ul>
<ul>
<span style="font-family: Calibri;"></span>
</ul>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;"></span></p>
<ul>
<li><span style="font-family: Calibri; color: #363636; font-size: medium;">The <b>UserInfo</b> table is the table on Each Content Database that holds the users login information as well as the SID. These are stored in the following two columns within the <b>UserInfo</b> Table</span></li>
</ul>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>
<p style="padding-left: 60px;"><span style="font-family: Calibri; color: #363636; font-size: medium;"><b>LoginName</b></span></p>
<p style="padding-left: 60px;"><span style="font-family: Calibri; color: #363636; font-size: medium;"><b>tp_systemID</b></span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>
<p><span style="color: #363636; font-size: medium;"><span style="font-family: Calibri;"></span><span style="font-family: Calibri;">So the question is&hellip;.. How do we get the new SID from AD into the <b>UserInfo</b> table. While this can be done with creating a&nbsp; temporary account in AD and doing some&nbsp; "<b>stsadm -o migrateuser</b>" flipping from Temp Account to Valid Account and vise versa,&nbsp; I have found that we can achieve this task by passing the same value for the "<strong>-oldlogin</strong>" &amp; "-<b>newlogin</b>" and setting the "-<b>ignoresidhistory</b>" switch on our "<b>stsadm -o migrateuser</b>" command. So this is basically what you would do:</span></span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>
<p><span style="color: #363636;"><span style="font-family: Calibri; font-size: medium;"></span><span style="font-family: Calibri; font-size: small;"><b>stsadm &ndash;o migrateuser &ndash;oldlogin DOMAIN\jdoe &ndash;newlogin DOMAIN\jdoe &ndash;ignoresidhistory</b></span></span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">What this should do is flip the SID, or "<b>tp_SystemId</b>" in the <b>UserInfo</b> table to be the new account SID from AD and your user should now have access to all 300+ sites again. </span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">Happy Migrating!!</span></p>
<p><span style="font-family: Calibri; color: #363636; font-size: medium;">&nbsp;</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Orphaned "Related Sites" Scope in Searchbox dropdown</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/orphaned-related-sites-scope-in-searchbox-dropdown</link>
      <pubDate>Thu, 14 Jan 2010 14:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/2010/01/14/orphaned-related-sites-scope-in-searchbox-dropdown/</guid>
      <description><![CDATA[&nbsp;&nbsp;
I have seen a couple of cases where then end users where having an issue with the...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: trebuchet ms,geneva; color: #000099;">&nbsp;</span>&nbsp;</p>
<p><span style="font-family: verdana,geneva; color: #363636; font-size: small;">I have seen a couple of cases where then end users where having an issue with the "Related Sites" search scope within a SharePoint Portal Site. By default, when you create a Collaboration Portal, the following 3 Search Scopes show up when you first load the page:</span></p>
<p><span style="color: #003366;"><span style="font-family: verdana,geneva;">This Site: Home<br />All Sites<br />People</span><span style="font-family: verdana,geneva;">&nbsp;</span>&nbsp;</span></p>
<p><span style="color: #363636; font-size: small;">These are the 3 main scopes that get pulled in from the SSP within a SharePoint farm. "This Site" would be considered a Contextual Scope and is specific to searching for content only within the context of that site. If you were to browse to the "<strong>Related Links scope settings</strong>" within a site and add an addtional search scope, based on another URL, like <a mce_href="http://microsoft.com/" href="http://microsoft.com/">http://microsoft.com</a>, and then re-compile your scopes manually or let the SSP scope compilation complete automatically (every 15 minutes by default). When you go back to the home page your site, you should see&nbsp;a "Related Sites" search scope in the drop down. This&nbsp;is all good if you&nbsp;intend to utilize this search scope, but the issue comes to surface when you decide that you no longer want to have any "Related Sites" search scopes within that site. &nbsp;So lets say you perform the following actions to remove the related links:</span></p>
<p><span style="color: #363636; font-size: small;"><span style="font-family: Verdana;">&nbsp;</span>&nbsp;</span></p>
<ul>
<li><span style="color: #363636; font-size: small;">Browse to the site you want to remove the Related Links from via, <a mce_href="http://fqdn.domain.com/_layouts/RelLinksScopeSettings.aspx" href="http://fqdn.domain.com/_layouts/RelLinksScopeSettings.aspx">http://fqdn.domain.com/_layouts/RelLinksScopeSettings.aspx</a></span></li>
<li><span style="color: #363636; font-size: small;">Click on the Selected Links you want to remove ( all in this case) and for each one, you click on "Remove"</span></li>
<li><span style="color: #363636; font-size: small;">You click on OK and suspect all is good.</span></li>
<li><span style="color: #363636; font-size: small;">Wait for the Scopes to compile on their own or manually force the compilation via <a mce_href="http://servername:6000/ssp/admin/_layouts/searchsspsettings.aspx" href="http://servername:6000/ssp/admin/_layouts/searchsspsettings.aspx">http://servername:6000/ssp/admin/_layouts/searchsspsettings.aspx</a>&nbsp;and then click on "Update Scopes"</span></li>
<li><span style="color: #363636; font-size: small;">reset IIS to clear the cache</span></li>
<li><span style="color: #363636; font-size: small;">Browse back to the site and you notice the "Related Sites" is still in the drop down.</span></li>
</ul>
<p><span style="color: #363636; font-size: small;">At this point you would expect the "Related Sites" to disappear, so you browse back to the /_layouts/RelLinksScopeSettings.aspx page and see the words "emptytext" in the "Available Links"section of the page. This gives the impression that a scope exists in the site so this is why the "Related Sites" scope is still present in the search drop down.</span></p>
<p><span style="font-family: trebuchet ms,geneva; color: #363636; font-size: small;">So you ask, how can I get rid of this at this time? It is not really causing any real problem other than maybe some confusion for the end users who are trying to search for information within this site. While there is not a direct way through the UI to remove this from the search scopes, I can provide you some sample Object Model code that you or a developer can compile and run against the site URL and get that to disappear from the drop down. Again this is Sample Code and has no warranty and is not supported by Microsoft. This code will basically identify the WebID within the content database for the site URL you want to remove the "related sites" link from and then correleate that GUID with the Scopes in the SSP&nbsp;DB and delete the item from the&nbsp;database. After this is completed, it is necessary to go ahead and update the scopes and then do an IISReset&nbsp;in order to flush the compiled&nbsp;pages&nbsp;from memory. Below is the Sample Code&nbsp;you can use&nbsp;to remove the "Related Sites" scope from a site"</span></p>
<p>&nbsp;=======================================================================</p>
<p mce_keep="true">&nbsp;</p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: black;"><span style="font-size: small;">Sample Code<o:p></o:p></span></span></b></p>
<p class="MsoNormal"><span style="font-family: Symbol; color: black; font-size: 11pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">&middot;<span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 11pt;">We basically created a Form Box&nbsp;for the GUI</span><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;"><o:p></o:p></span><span style="font-family: Symbol; color: black; font-size: 11pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">&middot;<span style="font: 7pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 11pt;">Then compile the code below:</span></p>
<p class="MsoListParagraph"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.Collections.Generic;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.ComponentModel;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.Data;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.Drawing;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.Linq;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.Text;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.Windows.Forms;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> System.Collections;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> Microsoft.SharePoint;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> Microsoft.Office.Server;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> Microsoft.Office.Server.Administration;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> Microsoft.Office.Server.Search;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">using</span><span style="font-family: 'Courier New'; font-size: 10pt;"> Microsoft.Office.Server.Search.Administration;</span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;</span><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: blue; font-size: 10pt;">namespace</span><span style="font-family: 'Courier New'; font-size: 10pt;"> scopedelete<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">{</span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;</span><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp; <span style="color: blue;">public</span> <span style="color: blue;">partial</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">Form1</span> : <span style="color: #2b91af;">Form<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">public</span> Form1()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InitializeComponent();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p>&nbsp;</o:p></span><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">private</span> <span style="color: blue;">void</span> button1_Click(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">EventArgs</span> e)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">if</span> (textBox1.Text.Trim() == <span style="color: #a31515;">""</span>)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">MessageBox</span>.Show(<span style="color: #a31515;">"Please enter the root web URL."</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">else<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">SPSite</span> site = <span style="color: blue;">new</span> <span style="color: #2b91af;">SPSite</span>(textBox1.Text);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">SPWeb</span> myweb = site.OpenWeb();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Guid</span> mywebid = myweb.ID;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: green;">//&nbsp; MessageBox.Show("webid : " + mywebid.ToString());<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: green; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Uri</span> siteuri = <span style="color: blue;">new</span> <span style="color: #2b91af;">Uri</span>(site.Url);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Microsoft.Office.Server.<span style="color: #2b91af;">ServerContext</span> myservercontext = Microsoft.Office.Server.<span style="color: #2b91af;">ServerContext</span>.GetContext(<span style="color: #a31515;">"<span style="background: yellow; mso-highlight: yellow;">SSP</span>"</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af;">SearchContext</span> scontext = <span style="color: #2b91af;">SearchContext</span>.GetContext(myservercontext);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Scopes</span> sspscopes = <span style="color: blue;">new</span> <span style="color: #2b91af;">Scopes</span>(scontext);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">ScopeCollection</span> allscopes = sspscopes.AllScopes;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Scope</span> myscope = <span style="color: blue;">null</span>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">Scope</span> MydeleteScope = <span style="color: blue;">null</span>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af;">IEnumerator</span> myscopeenum = sspscopes.AllScopes.GetEnumerator();</span><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">for</span> (<span style="color: blue;">int</span> i = 0; i &lt; allscopes.Count; i++)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">while</span> (myscopeenum.MoveNext())<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; myscope = (<span style="color: #2b91af;">Scope</span>)myscopeenum.Current;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: green;">//&nbsp; MessageBox.Show(myscope.Name);</span></span><span style="font-family: 'Courier New'; color: green; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; color: green; font-size: 10pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">if</span> (myscope.Name == mywebid.ToString())<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MydeleteScope = myscope;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">break</span>;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">if</span> (MydeleteScope == <span style="color: blue;">null</span>)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af;">MessageBox</span>.Show(<span style="color: #a31515;">"Related sites scope for site "</span> + myweb.Name + <span style="color: #a31515;">"("</span> + textBox1.Text + <span style="color: #a31515;">" ) does not exist."</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">else<o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MydeleteScope.Delete();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">MessageBox</span>.Show(<span style="color: #a31515;">"Related sites scope for site "</span> + myweb.Name + <span style="color: #a31515;">"( "</span> + textBox1.Text + <span style="color: #a31515;">" ) deleted successfully"</span>);<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">private</span> <span style="color: blue;">void</span> Form1_Load(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">EventArgs</span> e)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><span style="font-family: 'Courier New'; font-size: 10pt;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family: 'Courier New'; font-size: 10pt;">&nbsp;&nbsp; }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;"><b>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;">&nbsp;&nbsp; ** Please note that where I have highlighted &ldquo;SSP&rdquo; you will need to replace that value with the name of your SSP</span></b><b><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 11pt;"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;">'&nbsp;THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;">' ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;">' THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;">' PARTICULAR PURPOSE.<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;"><o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;">' Please stress test this code before deploying it in a production environment.<br />' This is intended as a sample of how code might be written for a<br />' similar purpose. This code has not been tested.&nbsp; This code is <br />' also not to be considered best practices or prescriptive guidance.&nbsp; <br />&nbsp;<br />' It is highly recommended that you FULLY understand what this code is doing <br />' and use this code at your own risk.<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;">' Copyright (C) Microsoft Corporation, 2009</span></b><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: #c00000; font-size: 11pt;"><o:p></o:p></span></b></p>
<p class="MsoListParagraph"><span style="font-family: Symbol; color: black; font-size: 11pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">&nbsp;</span></span>&nbsp;</p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva; color: #363636; font-size: small;"><span style="mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Once this is compiled and executed browse to your SSP Admin Site<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva; color: #363636; font-size: small;"><span style="mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Click on Search Settings:<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva; color: #363636; font-size: small;"><span style="mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Find the Scopes Section and click on &ldquo;Start Update Now&rdquo;<o:p></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva; color: #363636; font-size: small;"><span style="mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol;"><span style="mso-list: Ignore;">&middot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>Once that has been updated go into your WFE server(s) and recycle the application pools for the Web App you just executed this against.<o:p></o:p></span></p>
<p><span style="font-family: verdana,geneva; color: #363636; font-size: small; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">&nbsp;</span>&nbsp;</p>
<p><span style="font-family: verdana,geneva; color: #363636; font-size: small; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;">After the page has been rendered again, you should see that the &ldquo;Related Sites&rdquo; option is no longer present in the Search Drop Down Box</span></p>
<p mce_keep="true">&nbsp;</p>
<p>=======================================================================&nbsp;&nbsp;</p>
<p><span style="font-family: verdana,geneva; color: #000099;">&nbsp;</span>&nbsp;</p>
<p><span style="color: #363636; font-size: small;">To confirm that the scope has been deleted, you can open up SQL Server Management Studio and then run the following queries to see that the GUID for that scope has been removed from the SSP Database.</span></p>
<p><span style="color: #363636; font-size: small;"><span style="font-family: Verdana;">&nbsp;</span>&nbsp;</span></p>
<ul>
<li><span style="color: #363636; font-size: small;">First you would need to get the WebId from the content DB that you ran the code against</span></li>
<li><span style="color: #363636; font-size: small;">Open SQL Server Management Studio and create a New Query</span></li>
<li><span style="color: #363636; font-size: small;">In the drop down, next to the "execute" function in the toolbar, make sure you have the Content Database select</span></li>
<li><span style="color: #363636; font-size: small;">Then run the following:</span></li>
</ul>
<div><span style="font-family: trebuchet ms,geneva;">
<div><span style="color: #000099;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;"><span style="color: #0000ff;">select</span></span><span style="color: #000000;"> </span><span style="color: #808080;"><span style="color: #808080;">*</span></span><span style="color: #000000;"> </span><span style="color: #0000ff;"><span style="color: #0000ff;">from</span></span><span style="color: #000000;"> Webs</span></span></div>
</span><span style="color: #363636;">&nbsp;</span></div>
<ul>
<li><span style="color: #363636; font-size: small;">Identify the Id where root of that site exists. </span></li>
<li><span style="color: #363636; font-size: small;">Copy this GUID and put it into notepad</span></li>
<li><span style="color: #363636; font-size: small;">Then create a new query and this time make sure the SSP DB is selected, not the Search DB, but the SSP DB</span></li>
<li><span style="color: #363636; font-size: small;">Then run the following:</span></li>
</ul>
<p><span style="font-family: trebuchet ms,geneva;"><span style="color: #000099;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #0000ff;"><span style="color: #0000ff;">select</span></span><span style="color: #000000;"> </span><span style="color: #808080;"><span style="color: #808080;">*</span></span><span style="color: #000000;"> </span><span style="color: #0000ff;"><span style="color: #0000ff;">from</span></span><span style="color: #000000;"> MSSScopes</span></span></span></p>
<ul>
<li><span style="color: #363636; font-size: small;">If the GUID is still present in that table, then you have not successfully removed the scope. If it is no longer present, then the "Related Sites" scope should no longer be there when the Scopes are Updated and IIS has been reset. </span></li>
</ul>
<p><span style="color: #363636; font-size: small;">&nbsp;&nbsp;</span></p>
<p><span style="color: #363636; font-size: small;">&nbsp;I hope this helps in the event you want to get rid of that "Related Sites" scope within your Search Drop Down!</span></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint, InfoPath &amp; an infamous "properties.xfp" file...?</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/sharepoint-infopath-an-infamous-properties-xfp-file</link>
      <pubDate>Tue, 28 Jul 2009 15:02:00 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/2009/07/28/sharepoint-infopath-an-infamous-properties-xfp-file/</guid>
      <description><![CDATA[For anyone who is not aware, when you publish a form from InfoPath to a SharePoint Forms...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: verdana,geneva; font-size: small; color: #000066;">For anyone who is not aware, when you publish a form from InfoPath to a SharePoint Forms Library&nbsp;and promote fields from this form, these promoted fields become columns within that Forms Library. Promoted Fields can be published as "Content Types" as well&nbsp;but that is outside of the scope and&nbsp;context of this blog so I will not get into that right now.</span></p>
<p><span style="font-family: verdana,geneva; font-size: small; color: #000066;">I recently worked a case where my customer was reporting that at random, 4 columns were just disappearing from their Form Library. At first we were not able to indentify any particular event, rhyme or reason as to why these same four columns would just magically go away, until one day they were asked to create a list template of this Form Library and send it to us. After this task was done, they noticed the 4 columns were now gone. I now had the "ListTemplate.stp" file in my possession and thought that since the columns were present at the time of the list template creation that if I created a new form library based on this list template, the columns should be present in my newly created list, however; when the new library was created from this list template,&nbsp;these 4&nbsp;columns were not there. If you are not familiar with a "listtemplate.stp" file, you can actually rename the file from a .stp&nbsp;to a .cab file and then extract the contents of the file. Within any .stp file, you will find a manifest.xml file that has all the definitions of the contents of that library. In my case, I decided to dig into that manifest.xml file. When I looked at the file, I saw all the attributes of the columns that should be in my library, but were not present when I created a list from this template. I thought this was rather bizarre until I continued digging into this manifest.xml file and found a reference to a "properties.xfp" file. I decided to look into this file and I opened my form library with </span><a href="http://office.microsoft.com/en-us/sharepointdesigner/FX100487631033.aspx" target="_blank" mce_href="http://office.microsoft.com/en-us/sharepointdesigner/FX100487631033.aspx"><span style="font-family: verdana,geneva; color: #000066;">SharePoint Designer</span></a><span style="font-family: verdana,geneva; color: #000066;">. I opened this properties.xfp file and discovered that the exact columns that were appearing in my library after saving the list as a template were the columns being defined within this "xfp" file. </span></p>
<p><span style="font-family: verdana,geneva; font-size: small; color: #000066;">The "xfp" file is a file that gets created when you publish a form with InfoPath 2003 and promote fields. InfoPath makes a call to the "owssvr.dll" and pushes the file through commands via that dll. Come to find out that my customer did originally create and publish the form within InfoPath 2003 and then later down the line, upgraded to InfoPath 2007 and promoted addtional fields and then re-published the form from an InfoPath 2007 client. InfoPath 2007 handles promoted fields and column creation a bit different than InfoPath 2003 client does. It simply makes web service calls through an asmx page that checks to see if columns exist or not and then creates/deletes columns based on the web service calls to the sharepoint library. InfoPath 2007 never touches or updates this "properties.xfp" file. So new fields within InfoPath 2007 that&nbsp;had been created and published&nbsp;will go out and create the new columns. The problem you run into when you originally publish a form from InfoPath 2003&nbsp;and and then you come behind that work and re-publish and promote addtional fields with an InfoPath 2007 client, is that sharepoint will still look at this "xfp" file as a field definition&nbsp;solution and update its list's columns based on these fields within this file.&nbsp;Evidently when you save a list as a template, this is an event that triggers sharepoint to read this file and redefine it's list columns per this "xfp" file.</span></p>
<p><span style="font-family: verdana,geneva; font-size: small; color: #000066;">So you ask...&nbsp;</span></p>
<p><span style="font-family: verdana,geneva; font-size: small; color: #000066;"><strong>How Can I fix this? Do I&nbsp;have to keep track of every promoted field and update this "xfp" file...?</strong></span></p>
<p><span style="font-family: verdana,geneva; font-size: small; color: #000066;">To answer that, we need to ask a couple questions as well....</span></p>
<p><span style="font-family: verdana,geneva; font-size: small; color: #000066;"><strong>Will InfoPath 2003 client continue to be used to publish forms or will it strictly be InfoPath 2007 client publishing forms?</strong></span></p>
<p><span style="font-family: verdana,geneva; font-size: small;"><span style="font-family: verdana,geneva; color: #000066;">- If InfoPath 2007 will&nbsp;the only client&nbsp;used from this point on, you can simply browse to your forms library and delete the "properties.xfp" file. This will have no negative ramifications on your current list. To delete this file, you can do it with Windows Explorer View so that you do not have to install SharePoint Designer.</span></span></p>
<p class="MsoNormal"><b><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 11pt;"><span style="font-size: x-small;"><span style="font-family: verdana,geneva;">Actions:<o:p></o:p></span></span></span></b></p>
<p class="MsoNormal"><span style="font-family: 'Calibri','sans-serif'; color: #1f497d; font-size: 10pt;"><o:p><span style="font-family: verdana,geneva;">&nbsp;</span></o:p></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">1.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Browse to the Library&nbsp;that contains this properites.xfp file.</span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">2.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">From the &ldquo;Action&rdquo; menu, select Open in Windows Explorer<o:p></o:p></span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">3.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Once the window opens, browse into the &ldquo;forms&rdquo; folder<o:p></o:p></span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">4.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Locate the properties.xfp file<o:p></o:p></span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">5.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Delete it.<o:p></o:p></span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">6.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Close window and then browse back to the list settings<o:p></o:p></span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">7.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Now.. you can save the List as a Template<o:p></o:p></span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">8.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Once this is saved you can browse back to the list and should see the columns still intact.<o:p></o:p></span></span></p>
<p class="MsoListParagraph"><span style="font-family: verdana,geneva;"><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt; mso-fareast-font-family: Calibri;"><span style="mso-list: Ignore;">9.<span style="font: 7pt 'Times New Roman';"><span style="font-size: x-small;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span><span style="font-family: 'Calibri','sans-serif'; color: black; font-size: 10pt;">Also create a new list based off this template to confirm that all columns are still intact.<o:p></o:p></span></span></p>
<p><span style="font-family: verdana,geneva; font-size: small;"><span style="font-family: verdana,geneva; color: #000066;">- If InfoPath 2003 is still used in your environment then my recommendation would be to continue publishing the form with InfoPath 2003 until you are ready to make the change to InfoPath 2007</span> </span></p>
<p><span style="font-family: verdana,geneva; font-size: small;"><span style="font-family: verdana,geneva; color: #000066;">There is still a bit of investigation from a SharePoint Admin standpoint that I want to do but I wanted to share this for now in the event that any one experiences "columns" randomly disappearing from their sharepoint library and how you may want to look at the "properties.xfp" to see if this file exists in your library.. </span></span></p>
<p><span style="font-family: verdana,geneva; font-size: small;"><span style="font-family: verdana,geneva; color: #000066;">Chances are this is your culprit....</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Intro</title>
      <link>https://docs.microsoft.com/archive/blogs/acasilla/intro</link>
      <pubDate>Fri, 24 Apr 2009 00:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Anthony Casillas]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/acasilla/2009/04/24/intro/</guid>
      <description><![CDATA[Greetings!
&nbsp;
My name is Anthony Casillas and I am&nbsp;a Sr. Support Escalation...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal"><span style="font-family: 'Eras Demi ITC','sans-serif'; color: #0f243e; font-size: 12pt; mso-bidi-font-family: Tahoma; mso-themecolor: text2; mso-themeshade: 128; mso-fareast-font-family: 'Times New Roman';">Greetings!</span></p>
<p>&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 'Eras Demi ITC','sans-serif'; color: #0f243e; font-size: 12pt; mso-bidi-font-family: Tahoma; mso-themecolor: text2; mso-themeshade: 128; mso-fareast-font-family: 'Times New Roman';">My name is Anthony Casillas and I am&nbsp;a Sr. Support Escalation Engineer&nbsp;at Microsoft supporting SharePoint Server.&nbsp; I officially started&nbsp;in SharePoint&nbsp;on&nbsp;October 1,&nbsp;2007.&nbsp;&nbsp;</span><span style="font-family: 'Eras Demi ITC','sans-serif'; color: #0f243e; font-size: 12pt; mso-bidi-font-family: Tahoma; mso-themecolor: text2; mso-themeshade: 128; mso-fareast-font-family: 'Times New Roman';">I've been with Microsoft 5.5 years now and will continue&nbsp;immersing myself in this product and blogging on random SharePoint topics that I feel will benefit anyone outside MSFT.&nbsp; </span></p>
<p>&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 'Eras Demi ITC','sans-serif'; color: #0f243e; font-size: 12pt; mso-bidi-font-family: Tahoma; mso-themecolor: text2; mso-themeshade: 128; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span><span style="font-family: 'Eras Demi ITC','sans-serif'; color: #0f243e; font-size: 12pt; mso-bidi-font-family: Tahoma; mso-themecolor: text2; mso-themeshade: 128; mso-fareast-font-family: 'Times New Roman';">My posts will be varied&nbsp;in technical depth and totally random.&nbsp; My reasoning for doing this&nbsp;is to help&nbsp;any reader whether they are new to the product or&nbsp;have extensive experience...</span></p>
<p class="MsoNormal"><span style="font-family: 'Eras Demi ITC','sans-serif'; color: #0f243e; font-size: 12pt; mso-bidi-font-family: Tahoma; mso-themecolor: text2; mso-themeshade: 128; mso-fareast-font-family: 'Times New Roman';">&nbsp;</span>&nbsp;</p>
<p class="MsoNormal"><span style="font-family: 'Eras Demi ITC','sans-serif'; color: #0f243e; font-size: 12pt; mso-bidi-font-family: Tahoma; mso-themecolor: text2; mso-themeshade: 128; mso-fareast-font-family: 'Times New Roman';">Anthony</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>