<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SharePoint IT Pro</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/scottstewart/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/scottstewart/feed.xml</link>
    <description>This site are the ramblings of an Ex-PFE and now a Program Manager specializing in SharePoint, PowerShell for SharePoint, SharePoint Administration and Business Intelligence in SharePoint.</description>
    <lastBuildDate>Thu, 12 Oct 2017 20:07:03 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>User Profile Service fails to start ('ERR_CONFIG_DB' / SynchronizeMIIS encounters an exception)</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/user-profile-service-fails-to-start-err_config_db-synchronizemiis-encounters-an-exception</link>
      <pubDate>Wed, 20 Jan 2016 11:59:05 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/?p=331</guid>
      <description><![CDATA[For all those people that have spent an extensive amount of time trying to get the User Profile...]]></description>
      <content:encoded><![CDATA[For all those people that have spent an extensive amount of time trying to get the User Profile Service started.

You have all followed Spencer's fantastic article https://www.harbar.net/articles/sp2010ups.aspx as well TechNet https://technet.microsoft.com/en-us/library/ee721049.aspx and yet your User profile service fails to start i.e. status returns to "Stopped".

<span style="text-decoration: underline">You will see errors in the ULS as below:</span>
User Profile Application: SynchronizeMIIS encounters an exception: System.NullReferenceException: Object reference not set to an instance of an object.

or

ILM Configuration: Error 'ERR_CONFIG_DB'.

The farm I have been working on is Server 2012 R2, SharePoint 2013 (with the latest CU's installed) and SQL 2012.

The fix I applied was to take it back to the basics and make sure that all Pre-Requisites are correct.
What I found was that I have SQL 2012 Native client (to match my version of SQL) installed but the pre-requisites clearly say <strong>SQL 2008 R2 Native client is required</strong>.

<strong>I installed SQL 2008 R2 Native Client</strong> as a side by side to SQL 2012 Native client i.e. both are now installed on all servers in the farm and I then successfully started the User Profile Sync Service.

I have managed to replicate this on several farms.]]></content:encoded>
    </item>
    <item>
      <title>Which Server is being accessed via the Load Balancer / NLB</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/which-server-is-being-accessed-via-the-load-balancer-nlb</link>
      <pubDate>Mon, 07 Dec 2015 08:11:22 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2015/12/07/which-server-is-being-accessed-via-the-load-balancer-nlb/</guid>
      <description><![CDATA[I was asked this question today and tried the following solution which seemed the...]]></description>
      <content:encoded><![CDATA[I was asked this question today and tried the following solution which seemed the simplest.
<ol>
	<li>Create a <strong>shared folder</strong> on each Web Front (WFE) Server.
Name it the <strong>name</strong> of the server (or a friendly name you want to use to identify a server e.g. WFE01) and grant it full read rights to"everyone".</li>
	<li>Open the URL, e.g. <a href="https://intranet.stealth.com">https://intranet.stealth.com</a> in the browser as normal and let the page load.</li>
	<li>Now open file explorer and put the same URL (without https://) you normally access the load balancer with e.g. \\intranet.stealth.com</li>
</ol>
You should now see a folder share which should show you the shared folder representing the server name.

This is the server you are being directed to by the load balancer.

NB: This will only work if you have network or single affinity configured on the NLB.

This will give you a starting point to troubleshoot issues i.e. Performance or erratic behavior with multiple WFE's.]]></content:encoded>
    </item>
    <item>
      <title>Add or Modify SharePoint 2013 / 2016 Search Topology using a PowerShell built User Interface</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/powershell-ui-to-modify-sharepoint-search-topology</link>
      <pubDate>Wed, 29 Apr 2015 03:32:56 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2015/04/29/powershell-ui-to-modify-sharepoint-search-topology/</guid>
      <description><![CDATA[Welcome to the SharePoint Search Topology Add / Modification Sample tool

PLEASE NOTE THAT THIS...]]></description>
      <content:encoded><![CDATA[<strong><span style="font-size: small">Welcome to the SharePoint Search Topology Add / Modification Sample tool</span></strong>

<span style="color: #ff0000">PLEASE NOTE THAT THIS CODE IS PROVIDED AS SAMPLE CODE TO MODIFY THE SEARCH TOPOLOGY.</span>
Please read the disclaimer in the PowerShell source code.

<span style="color: #ff0000"><strong>Updated to V2_8_3 to accommodate updates from Nov 2016 (MinRole changes) and includes the Cloud SSA flag option.</strong></span><span style="color: #ff0000"><strong>
</strong></span><strong><span style="text-decoration: underline"></span></strong>

If you choose to create a Cloud Search Service Application (Cloud SSA) then you will need to review the guidance https://blogs.msdn.microsoft.com/spses/2015/09/15/cloud-hybrid-search-service-application/
This script has the option (unchecked by default) to allow you to create a Cloud SSA but it is not the primary purpose of the script.

<strong><span style="text-decoration: underline">Intro
</span></strong>From SharePoint 2013 onwards there is no User Interface to modify the Search topology and you are only able to create it either via PowerShell or via the UI where you are able to create a Search Service Application on a single server in the farm.
Any modifications to the Topology will require a fairly decent knowledge of the Search Topology as well as PowerShell.
To help with this I decided to write a PowerShell script that utilizes Windows Forms and provides you a UI to view, add and modify the topology.

<strong>The code can be safely run as no changes are executed until you instruct the code to do so and you will be prompted to confirm again before it starts.
Simply scroll to the end of the blog and download via the link from the TechNet Gallery.</strong>

<strong><span style="text-decoration: underline">
Special Thanks
</span></strong>To get this version out a few thanks need to go out to <strong>Koos Botha</strong> (Helping me with some of the Forms Code in PowerShell) and <strong>Neil Hodgkinson</strong> (His endless sharing of knowledge on Search).
There are also 2 extracts from <strong>Joe Rodgers</strong> that are highlighted in the code. https://blogs.msdn.com/b/josrod/
Thanks to <strong>Brian Pendergrass</strong> for his input on understanding how components flow as well as storage locations.
There were a few other inputs as well, particularly when I was looking for the ".Name" property (Paul) of one of the PowerShell commands and they know who they are.

<strong><span style="text-decoration: underline">
This Release</span></strong>

<strong><span style="color: #ff0000">This script <span style="text-decoration: underline">does not support multiple index partitions</span> but does allow multiple Index servers (Replicas), Index moves i.e. location changes and changing of Index servers.</span></strong>

This release (V2_8_3):
<ul>
 	<li>KB for Admin Issue included,</li>
 	<li>SP2016 supported for TAP Customers and min role changes,</li>
 	<li>Index location bug fix with multiple index servers and where 'CreatorOwner' permissions have been explicitly removed for server lockdown and hardening,</li>
 	<li>Search Service Applications can be created,</li>
 	<li>Broken Search Topologies can often be repaired (Simply select a Broken Search Service Application and choose alternate servers for the broken Components),</li>
 	<li>It Reads in the existing the Search Service Application Topology (There is no Server number limit in this code but remember a single Search Service application is limited to <a href="https://technet.microsoft.com/en-us/library/cc262787.aspx#Search">https://technet.microsoft.com/en-us/library/cc262787.aspx#Search</a>),</li>
 	<li>It Displays and allows Moving any components to any servers in the farm (Servers will be automatically shown and made available to the Search if they exist in the Farm).</li>
 	<li>Support to handle multiple Search Service Applications,</li>
 	<li>Support for moving the Index location including deleting the previous location if not the default. It also creates the new location for you on all servers in the farm (Remote PowerShell to be enabled but it checks for that too).</li>
</ul>
<span style="color: #0000ff">NB - Make sure all servers are Online - if a server in the farm is off or not available it will still allow it to be added to the Topology (it will be marked with a <span style="color: #ff0000">red cross</span>) and it will come online as soon as the server is available again.</span>

<strong><span style="text-decoration: underline">Testing
</span></strong>As usual <strong><span style="color: #ff0000">please test this out in your Dev and Test environments</span> </strong>and of course no liability can be accepted for any issues experienced or possibly caused by running the code.

<span style="text-decoration: underline"><strong>How to Use it</strong>
</span>
<ol>
 	<li>Log on to the SharePoint Server as a Farm Administrator (Local Admin is required on all SharePoint Servers as well by SharePoint when a User is added as the Farm Admin),</li>
 	<li><strong>Scroll to the bottom of the article, Click on the link to download and Save the file <span style="color: #0000ff">AddModifySearchTopologyV2_8_3.ps1</span> to one of your<span style="color: #ff0000"> SharePoint Servers</span>,</strong></li>
 	<li>Open the file in PowerShell ISE (<span style="color: #ff0000">Select Run as Administrator</span>) or in a Standard SharePoint PowerShell window (<span style="color: #ff0000">Run as Administrator</span>),</li>
 	<li>If you opened it in PowerShell ISE then simply click run otherwise if you opened it in the SharePoint PowerShell window simply navigate to where you saved it and run<span style="color: #0000ff"> .\AddModifySearchTopologyV2_8_3.ps1</span></li>
 	<li>Follow the on screen messages i.e. <span style="color: #0000ff">Import, Create Now and Modify using the CheckBoxes</span> and when ready click <span style="color: #0000ff">Create Now</span> or <span style="color: #0000ff">Modify Topology</span> to start
<span style="color: #ff0000"><span style="color: #000000">(</span><strong>Remember this can take a long time to Run as the new Topology is being activated - A message will display to show when it's compete.</strong></span>)</li>
</ol>
<span style="text-decoration: underline"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/23/2260.Search_V2.JPG"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/23/2260.Search_V2.JPG" border="0" /></a></span>

<span style="text-decoration: underline"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/23/Search_CreateSA-V2.JPG"><img width="550" height="433" style="width: 403px;height: 317px" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/02/23/Search_CreateSA-V2.JPG" border="0" /></a>
</span>

<strong><span style="text-decoration: underline">How does it Work?</span></strong>

It exports the current Topology to an XML file, reads in the details and displays your current topology in the Top List boxes.
It then automatically selects your Current Topology in the New Topology section below to make editing easier.
Simply click on the server names in the different component sections to make changes.

Once complete click Create Now or Modify Topology to start the process.

The code first clones the Topology, then deletes any Components you have removed and then adds any new Components to the Cloned Topology. It then Sets the new Topology as the Active Topology and removes the old, now inactive Topology.

There are some conditions in topology modification for SharePoint and some require a 2 step process i.e. Changing all Index Components.

One careful item to note is that SharePoint Search Index Component cannot just be replaced in 1 modification i.e. once it is created at least 1 Index Component must remain so basically if "Server A" is hosting the Index and you would like to move it to "Server B" then you have to add "Server B" to the Index first and apply the changes. This version now does the multi-modification for you.

Donwload the file directly from the TechNet Gallery.
<a href="https://gallery.technet.microsoft.com/Add-or-Modify-SharePoint-c7d83c93">https://gallery.technet.microsoft.com/Add-or-Modify-SharePoint-c7d83c93</a>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Search - Clean up inactive Topologies</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/sharepoint-2013-search-clean-up-inactive-topologies</link>
      <pubDate>Wed, 21 Jan 2015 04:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2015/01/21/sharepoint-2013-search-clean-up-inactive-topologies/</guid>
      <description><![CDATA[If you have ever had to change or reconfigure your SharePoint 2013 search you probably don't know...]]></description>
      <content:encoded><![CDATA[If you have ever had to change or reconfigure your SharePoint 2013 search you probably don't know that you have not cleaned up inactive topologies.

For those interested in cleaning up their Search Service Application copy and paste the PowerShell script below and <span style="color:#0000ff;">open PowerShell ISE as Admin</span> and <span style="color:#0000ff;">execute</span>.

<span style="color:#ff0000;">NB: AS USUAL ALL POWERSHELL IS EXECUTED AT YOUR OWN RISK AND SHOULD BE TESTED IN A DEV AND TEST ENVIRONMENT FIRST</span>

#----<span style="color:#0000ff;"> PowerShell Starts here</span> -----------------------------------------------------------------------------------

#===========================================================================<br># Add the SharePoint Snapin<br>#===========================================================================<br>&nbsp;Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue

#==================================================================================<br># Get the Search Service Application<br>#==================================================================================<br>&nbsp; <br>$ssa = Get-SPEnterpriseSearchServiceApplication

#==================================================================================<br># Clean out inactive topologies<br>#==================================================================================

&nbsp;$oldTopologies = $ssa.Topologies | Where {$_.State -eq "Inactive"}<br>&nbsp;if ($oldTopologies -ne $null)<br>&nbsp;{<br>&nbsp; Write-Host "Removing old Topologies" <br>&nbsp; foreach ($oldTopology in $oldTopologies)<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; Write-Host "Deleting "$oldTopology.TopologyId.ToString()<br>&nbsp;&nbsp;&nbsp;&nbsp; $oldTopology.Delete()<br>&nbsp;&nbsp; }<br>&nbsp;}

#----- <span style="color:#0000ff;">PowerShell Ends here</span> -------------------------------------------------]]></content:encoded>
    </item>
    <item>
      <title>Change from multiple web applications to Host Named Site Collections in an existing farm</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/change-from-multiple-web-applications-to-host-named-site-collections-in-an-existing-farm</link>
      <pubDate>Tue, 20 Jan 2015 05:23:00 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2015/01/20/change-from-multiple-web-applications-to-host-named-site-collections-in-an-existing-farm/</guid>
      <description><![CDATA[This is far simpler than one might think and will help you align to the SharePoint Product Line...]]></description>
      <content:encoded><![CDATA[This is far simpler than one might think and will help you align to the SharePoint Product Line Architecture as well as to how Office 365 - SharePoint Online is configured.

<strong><span style="color:#ff0000;">NB: TEST THIS ON YOUR DEV OR TEST ENVIRONMENT FIRST </span></strong>

<strong><span style="color:#ff0000;">You must schedule downtime during this process and whilst I have tested this extensively all actions are at your own risk.<br></span></strong>

<span style="color:#ff0000;">Make sure you have some PowerShell experience or understanding as Host Named Site Collections can only be managed from PowerShell.</span><strong><span style="color:#ff0000;"><br></span></strong>

<strong><span style="color:#ff0000;"><span style="color:#0000ff;"><span style="text-decoration:underline;"><span style="color:#000000;text-decoration:underline;">Pre-Steps Required:</span></span><br></span></span></strong>

<ol>
<li><span style="color:#000000;">Perform a full farm backup<br></span></li>
<li><span style="color:#000000;">Back-up all Site Collections using the backup-spsite PowerShell command e.g.</span><span style="color:#0000ff;"> backup-spsite <a href="https://intranet.contoso.com"><span style="color:#0000ff;">https://intranet.contoso.com</span></a> -path c:\backup\intranet.bak<br><span style="color:#000000;">REPEAT this for each Site Collection in your farm except for Central Admin</span><br></span></li>
<li>Now comes the risky part and it is at your own risk so test the process first.<br>Once ALL Site Collection back ups have completed successfully&nbsp;<br><span style="color:#0000ff;">Delete all&nbsp;Site Collections and Web Applications from SharePoint Central Admin</span> (DO NOT DELETE THE CENTRAL ADMIN WEB APPLICATION OR SITE COLLECTION)<br><span style="color:#ff0000;">NB: You cannot restore a Site Collection backup onto a farm where you backed up the original Site Collection whilst it still exists as the Site Collection ID will ORPHAN your existing Site Collection (You have to remove the site collection you want to restore first)</span><span style="color:#0000ff;"><br></span></li>
<li>Create a new default web application on port 80 and name it "<span style="color:#0000ff;">Default</span>" with<span style="color:#0000ff;"> no Host header</span> specifying a new content database (Use your own naming convention) e.g. <span style="color:#0000ff;">WSS_Content_DEFAULT</span></li>
<li>Create a new Site collection on the new "<span style="color:#0000ff;">Default</span>" web application and name it "<span style="color:#0000ff;">Default Root</span>" (This must not be edited or used for any Site Collection)</li>
<li>Create new Content databases under the new default web application naming each database according to which Site Collections you would like to create in them e.g. <span style="color:#0000ff;">WSS_Content_Intranet, WSS_Content_HR, WSS_content_BI</span></li>
</ol>

<strong><span style="text-decoration:underline;">Restore-Steps Required</span></strong>

<ol>
<li>Open PowerShell ISE as Administrator i.e. "Run as Admin" and use the following example to restore each Site Collection to their new respective databases<br><span style="color:#0000ff;">e.g. Restore-SPSite 'https://<span style="color:#ff0000;">intranet.contoso.com</span>' -HostHeaderWebApplication 'https://<span style="color:#ff0000;">default.contoso.com</span>' -DatabaseName "<span style="color:#ff0000;">WSS_Content_Intranet</span>" -Path <span style="color:#ff0000;">C:\backup\intranet.bak</span><br></span><span style="color:#0000ff;"><br></span></li>
<li>Go to DNS and ensure that you have an entry for&nbsp;each URL you&nbsp;have&nbsp;specified using the above command&nbsp;and make sure&nbsp;it is pointing to your Network Load Balancer or to your Web Front End Server if you only have one<br>If you are using a Network Load Balancer (Hardware or Software) then you need to make sure that it is configured to direct traffic to your Web Front End Servers and the IP used in DNS must be the Network Load Balancer IP address.</li>
</ol>

Once all Site Collections have been restored through PowerShell and all DNS entries for all URL's have been added then you have completed your migration from individual web applications to Host Named Site Collections.

Depending on your network DNS replication may take some time but if you would like to hurry it along simply open a command prompt as admin on your PC and run <span style="color:#0000ff;">IPConfig /FlushDNS</span> and it will force the replication to happen on your PC.

In order to use Host Named Site Collections correctly you may only have 1 Web Application with all Site Collections residing under it as Host Named Site Collections.

This will also allow you to make use of the new Request Management Service in SharePoint 2013 which is designed for use with 1 web application.

What you will also notice is that we<span style="color:#0000ff;"> do not touch IIS</span> and we <span style="color:#0000ff;">do not add host headers in IIS</span> at all.

We also <span style="color:#0000ff;">do not add Alternate Access Mappings</span> in SharePoint either so it simplifies management in one way and complicates it in another because it can only be managed via PowerShell.]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 - User Profile Service Stuck on Starting</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/sharepoint-2013-user-profile-service-stuck-on-starting</link>
      <pubDate>Thu, 30 Oct 2014 02:27:00 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2014/10/30/sharepoint-2013-user-profile-service-stuck-on-starting/</guid>
      <description><![CDATA[There are really fantastic and well known articles on User Profile Configuration and Stuck on...]]></description>
      <content:encoded><![CDATA[<strong>There are really fantastic and well known articles on User Profile Configuration and Stuck on Starting issues. </strong>(These are applicable to SP2010 and SP2013)

These are listed below but can be located on Spencer Harbar's Site <a href="https://www.harbar.net">https://www.harbar.net</a>

<a href="https://www.harbar.net/articles/sp2010ups.aspx">https://www.harbar.net/articles/sp2010ups.aspx</a> (User Profile Configuration)

<a href="https://www.harbar.net/articles/sp2010ups2.aspx">https://www.harbar.net/articles/sp2010ups2.aspx</a> (Stuck on Starting - detailing why and how to reset it)

<a href="https://www.harbar.net/articles/sp2010ups2.aspx#ups14">https://www.harbar.net/articles/sp2010ups2.aspx#ups14</a> <strong>(How to reset the Sync status)</strong>

<strong><span style="color: #0000ff">You need to follow his reset procedure first and as He has also stated, it is best to delete the User Profile Service application and create a new one from scratch.</span></strong>

<span style="color: #0000ff">Make sure that if you have installed Updates that all updates have been applied successfully on all servers before you create the new User Profile Service Application.</span>

I decided to write up a very basic script as even after running the reset script detailed in Spencer's article the service still remained stuck on "Starting" and the status of the Service Instance remained as "Provisioning".

This therefore blocked starting the service on any other server and left the server I tried to start it on in a partial state as the Sync Service can only be started on 1 server in a farm.

The details below simply get a reference to your server and service instance and force it to be un-provisioned.

<strong><span style="color: #0000ff">Copy out the following code below and run it in an Administrative PowerShell or PowerShell ISE window. (NB: This code is sample code and is run at your own risk - test on Dev and QA environments first)</span></strong>

########################################

<span style="font-size: small">Add-PSSnapin Microsoft.SharePoint.Powershell</span>
<span style="font-size: small">$TypeName = "User Profile Synchronization Service"</span>
<span style="font-size: small">$ServerName = "<span style="color: #ff0000">SERVERNAME</span>" #<span style="color: #ff0000">Replace with your server name where the service is stuck on Starting</span></span>
<span style="font-size: small">$Serviceinstance = Get-SPServiceInstance | where-object {$_.TypeName -eq $TypeName -and $_.Server.Address -eq $ServerName}</span>
<span style="font-size: small">$Serviceinstance.Unprovision()</span>

#######################################

<span style="color: #0000ff">Make sure that the user you are logged in as is a Farm Administrator.</span>]]></content:encoded>
    </item>
    <item>
      <title>Warm-up Script for Web Front End Servers (WFE) in Load Balanced SharePoint Farms</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/warm-up-script-for-web-front-end-servers-wfe-in-load-balanced-sharepoint-farms</link>
      <pubDate>Mon, 29 Sep 2014 06:43:47 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2014/09/29/warm-up-script-for-web-front-end-servers-wfe-in-load-balanced-sharepoint-farms/</guid>
      <description><![CDATA[There are many PowerShell scripts available to warm up SharePoint environments but they do not all...]]></description>
      <content:encoded><![CDATA[<span style="color:#0000ff;"><span style="color:#000000;">There are many PowerShell scripts available to warm up SharePoint environments but they do not all handle "warming-up" multiple WFE Servers.</span><br></span>

<span style="color:#0000ff;"><span style="color:#000000;">Below is a combination of a few scripts I found:<br></span></span>

<span style="color:#0000ff;"><span><span style="color:#000000;">One from Bram</span> <a href="https://bramnuyts.be/tag/warmup-script/">https://bramnuyts.be/tag/warmup-script/</a></span></span>

<span style="color:#0000ff;"><span style="color:#000000;">and one from Todd&nbsp;<a href="https://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=404">https://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=404</a> which makes use of the new V3 PowerShell changes but does not cater for a Load Balancer unless you edit the Hosts file on the server to point to itself.</span></span>

<span style="color:#0000ff;"><span style="color:#000000;">&nbsp;</span></span>

<span style="color:#0000ff;"><span style="color:#000000;">The below script should be scheduled after your app pools have recycled and should be setup through a windows task schedule and <span style="color:#ff0000;"><strong>must be run as a User&nbsp;that has at least&nbsp;Read access to all Site</strong> Collections.<span style="color:#000000;"></span></span></span></span><span style="color:#0000ff;"><span style="color:#000000;"><span style="color:#ff0000;"><br></span></span></span>

<span style="color:#0000ff;"><span style="color:#000000;"><span style="color:#ff0000;">Make sure the DisableLoopbackCheck is configured as per Method 1 <a href="https://support2.microsoft.com/kb/896861">https://support2.microsoft.com/kb/896861</a> on production environments or one of my posts <a href="https://blogs.technet.com/b/scottstewart/archive/2014/09/15/disableloopbackcheck-when-routing-through-a-load-balancer-powershell-sample-included.aspx">https://blogs.technet.com/b/scottstewart/archive/2014/09/15/disableloopbackcheck-when-routing-through-a-load-balancer-powershell-sample-included.aspx</a> </span></span></span>

<span style="color:#0000ff;"><span style="color:#000000;"><span style="color:#ff0000;">&nbsp;</span></span></span>

<span style="color:#0000ff;"><span style="color:#000000;"><span style="color:#ff0000;"><span style="color:#000000;">I suggest either creating an account and adding the User to each Web App User Policy or make sure your Site Collection Admin has access to each Site Collection.<br></span></span></span></span>

<span style="color:#000000;"><span>STEPS<br></span></span>

<ol>
<li><span style="color:#000000;">OPEN POWERSHELL ISE OR POWERSHELL AS A FARM ADMIN</span></li>
<li><span style="color:#000000;">COPY AND PASTE THE POWERSHELL BELOW (Between the "<span style="color:#0000ff;">#--------------------------</span>")</span></li>
<li><span style="color:#000000;">TEST THE SCRIPT TO ENSURE NO ERRORS OCCUR</span></li>
<li><span style="color:#000000;">SAVE THE FILE AS A .PS1 TYPE IN A DESIGNATED LOCATION e.g. c:\powershell\warmupscript.ps1</span></li>
<li><span style="color:#000000;"><span>SCHEDULE A WINDOWS TASK TO RUN AFTER THE LAST APPLICATION POOL IS RECYCLED (4am should be safe)</span></span></li>
</ol>

<span style="color:#0000ff;">&nbsp;</span>

<span style="color:#0000ff;">## PowerShell Starts here</span>

<span style="color:#0000ff;">#--------------------------------------------------</span>

Add-PsSnapin Microsoft.SharePoint.PowerShell -erroraction silentlycontinue<br>&nbsp;&nbsp; <br>&nbsp;function get-webpage([string]$url,[System.Net.NetworkCredential]$cred=$null)<br>&nbsp;{<br>&nbsp;&nbsp; $bypassonlocal = $false<br>&nbsp;&nbsp; $proxyuri = "https://" + $env:COMPUTERNAME<br>&nbsp;&nbsp; $proxy = New-Object system.Net.WebProxy($proxyuri, $bypassonlocal)<br>&nbsp;&nbsp; $wc = new-object net.webclient<br>&nbsp;&nbsp; $wc.Proxy = $proxy<br>&nbsp;&nbsp; if($cred -eq $null)<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; $cred = [System.Net.CredentialCache]::DefaultCredentials;<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp; $wc.credentials = $cred;<br>&nbsp;&nbsp; return $wc.DownloadString($url);<br>&nbsp;}<br>&nbsp; <br>&nbsp;$cred = [System.Net.CredentialCache]::DefaultCredentials;

## This can be used if required to force using certain credentials<br>&nbsp;#$cred = new-object System.Net.NetworkCredential("username","password","machinename")<br>&nbsp; <br>#Get the Web Apps<br>&nbsp;$apps = get-spwebapplication # -includecentraladministration (Central admin is not included as it is not running on my WFE Server)<br>&nbsp; <br>&nbsp;foreach ($app in $apps) {<br>&nbsp;&nbsp; #Get the Site Collections<br>&nbsp;&nbsp; $sites = get-spsite -webapplication $app.url -Limit All<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; ### <span style="color:#0000ff;">UNCOMMENT THE 2 LINES BELOW IF YOU ONLY WANT TO USE THIS AT SITE COLLECTION LEVEL - Not required if Sites are warmed up.</span><br>&nbsp;&nbsp; #write-host $app.Url;<br>&nbsp;&nbsp; #$html=get-webpage -url $app.Url -cred $cred;

&nbsp;&nbsp; <br>&nbsp;&nbsp; ###<span style="color:#0000ff;">COMMENT OUT BETWEEN THE "=======" IF THERE ARE TOO MANY WEBs i.e. Sites and you don't want to&nbsp;warm them up.</span><br>&nbsp;&nbsp; #==================<br>&nbsp;&nbsp;&nbsp; foreach ($site in $sites) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreach ($web in $site.AllWebs) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #get the webs i.e. Sites<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; write-host $web.Url;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $html=get-webpage -url $web.Url -cred $cred;<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; #=================<br>&nbsp;}

<span style="color:#0000ff;">#--------------------------</span>

<span style="font-family:Lucida Console;font-size:xx-small;"><span style="font-family:Lucida Console;font-size:xx-small;">&nbsp;</span></span>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint - PowerShell to configure SuperUser and SuperReader accounts on all Web Apps</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/sharepoint-powershell-to-configure-superuser-and-superreader-accounts-on-all-web-apps</link>
      <pubDate>Mon, 29 Sep 2014 05:23:12 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2014/09/29/sharepoint-powershell-to-configure-superuser-and-superreader-accounts-on-all-web-apps/</guid>
      <description><![CDATA[I have seen many examples but not enough that spells it out so below you can copy out the script and...]]></description>
      <content:encoded><![CDATA[I have seen many examples but not enough that spells it out so below you can copy out the script and replace the user name with your users.

Here is the link to the official article explaining SharePoint Object Cache. <a href="https://technet.microsoft.com/en-us/library/ff758656(v=office.15).aspx">https://technet.microsoft.com/en-us/library/ff758656(v=office.15).aspx</a>



If your On premise deployment is configured according to the SharePoint Product Line Architecture (PLA) then you would only have 1 web application and this would be a simple task but for many On Premise environments they have many Web applications.<br><a href="https://blogs.technet.com/b/pla/archive/2013/07/22/benefits-of-using-the-product-line-architecture.aspx">https://blogs.technet.com/b/pla/archive/2013/07/22/benefits-of-using-the-product-line-architecture.aspx</a>

<br>What you will see is that there is a check for Claims Authentication.

The reason for this is that you will notice that when User rights are granted in Central Admin via User Policy for each Web App you will see that the Claims identifier (&nbsp;<span style="color:#ff0000;">"i:0#.w|</span>") is shown (Yes, even in SharePoint 2013).

If you do not provide the<span style="color:#ff0000;"> claims identifier</span> and you implement Object cache all users will receive <span style="color:#ff0000;">"Access Denied</span>" prompts and will be denied regardless of how many times they try to login.

<span style="color:#000000;">STEPS:</span>

<ol>
<li><span style="color:#000000;">PLEASE GET YOUR AD ADMINS TO CREATE 2 NORMAL AD USER ACCOUNTS (The names and naming convention is completely up to you)</span></li>
<li>OPEN POWERSHELL ISE OR WINDOWS POWERSHELL WINDOW AS AN ADMIN i.e. FARM ADMIN</li>
<li><span style="color:#ff0000;"><span style="color:#000000;">COPY OUT THE CODE BETWEEN THE "</span><span style="color:#0000ff;">#-----" </span><span style="color:#000000;">BELOW, REPLACE THE DOMAIN AND ACCOUNT NAMES WITH YOUR DETAILS&nbsp;AND EXECUTE</span><br></span></li>
</ol>



<span style="color:#0000ff;">#PowerShell Starts Here<br></span><span style="color:#ff0000;"><span style="color:#0000ff;">##---------------------------------------------------------------------------------</span><br></span>

Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue

####SET ACCOUNT NAMES (Replace Domain and UserName)

#SUPER USER ACCOUNT - Use your own Account (NB: NOT A SHAREPOINT ADMIN)<br>$sOrigUser= "blue\SP_SuperUser"<br>$sUserName = "SP_SuperUser"

#SUPER READER ACCOUNT - Use your own Account (NB: NOT A SHAREPOINT ADMIN)<br>$sOrigRead = "blue\SP_SuperRead"<br>$sReadName = "SP_SuperRead"

<br>$apps = get-spwebapplication <br>foreach ($app in $apps) {<br>&nbsp;&nbsp; #DISPLAY THE URL IT IS BUSY WITH<br>&nbsp;&nbsp; $app.Url<br>&nbsp;&nbsp; if ($app.UseClaimsAuthentication -eq $true)<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; # IF CLAIMS THEN SET THE IDENTIFIER<br>&nbsp;&nbsp;&nbsp; $sUser = "i:0#.w|" + $sOrigUser<br>&nbsp;&nbsp;&nbsp; $sRead = "i:0#.w|" + $sOrigRead<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; else<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp; # CLASSIC AUTH USED<br>&nbsp;&nbsp;&nbsp;&nbsp; $sUser = $sOrigUser<br>&nbsp;&nbsp;&nbsp;&nbsp; $sRead = $sOrigRead<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; # ADD THE SUPER USER ACC - FULL CONTROL (Required for writing the Cache)<br>&nbsp;&nbsp; $policy = $app.Policies.Add($sUser, $sUserName)<br>&nbsp;&nbsp; $policyRole = $app.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullControl) <br>&nbsp;&nbsp; $policy.PolicyRoleBindings.Add($policyRole)

&nbsp;&nbsp; $app.Properties["portalsuperuseraccount"] = $sUser<br>&nbsp;&nbsp; $app.Update()

&nbsp;&nbsp; # ADD THE SUPER READER ACC - READ ONLY<br>&nbsp;&nbsp; $policy = $app.Policies.Add($sRead, $sReadName)<br>&nbsp;&nbsp; $policyRole = $app.PolicyRoles.GetSpecialRole([Microsoft.SharePoint.Administration.SPPolicyRoleType]::FullRead) <br>&nbsp;&nbsp; $policy.PolicyRoleBindings.Add($policyRole)

&nbsp;&nbsp; $app.Properties["portalsuperreaderaccount"] = $sRead<br>&nbsp;&nbsp; $app.Update()

&nbsp;}

<br>&nbsp;<span style="color:#0000ff;">##----PowerShell Ends Here----------------------------------------------</span>]]></content:encoded>
    </item>
    <item>
      <title>DisableLoopBackCheck when routing through a Load Balancer (PowerShell sample included)</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/disableloopbackcheck-when-routing-through-a-load-balancer-powershell-sample-included</link>
      <pubDate>Mon, 15 Sep 2014 02:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2014/09/15/disableloopbackcheck-when-routing-through-a-load-balancer-powershell-sample-included/</guid>
      <description><![CDATA[This post on this blog are provided &ldquo;AS IS&rdquo; with no warranties - Editing of the Registry...]]></description>
      <content:encoded><![CDATA[<strong>This post on this blog are provided &ldquo;AS IS&rdquo; with no warranties - Editing of the Registry is at your own risk.</strong><br>&nbsp;

<strong><span style="text-decoration:underline;">Quick Summary</span></strong>

This has been fleshed out so many times and detailed very well by

Spencer <a href="https://www.harbar.net/archive/2009/07/02/disableloopbackcheck-amp-sharepoint-what-every-admin-and-developer-should-know.aspx">https://www.harbar.net/archive/2009/07/02/disableloopbackcheck-amp-sharepoint-what-every-admin-and-developer-should-know.aspx</a> and

Bob <a href="https://blogs.technet.com/b/sharepoint_foxhole/archive/2010/06/21/disableloopbackcheck-lets-do-it-the-right-way.aspx">https://blogs.technet.com/b/sharepoint_foxhole/archive/2010/06/21/disableloopbackcheck-lets-do-it-the-right-way.aspx</a>

The only recommended approach to correctly apply this change on Production&nbsp;is as per Method 1 as per the KB article (<strong>Spencer also reminds you, DO NOT DO Method 2 on a production server</strong>)

<strong><span style="text-decoration:underline;"><br>Why do we need more Info when a Load Balancer is Involved</span></strong>

The layout of entries is important and it must include the Load Balanced URL so see below.<br>I also include a PowerShell command to add the entries - this is particularly helpful when you have a few servers and a lot of URL's.<br>Antivirus software on a Server can block you.

<strong><span style="text-decoration:underline;"></span></strong>

<strong><span style="text-decoration:underline;">What to do<br></span></strong><br>The KB support is here <a href="https://support.microsoft.com/kb/926642">https://support.microsoft.com/kb/926642</a><br>(EXTRACT FROM THE KB ARTICLE ABOVE)<span style="text-decoration:underline;"><br></span><span style="text-decoration:underline;"></span>

<span style="text-decoration:underline;">Method 1</span>: (Editing the Registry is dangerous so make sure you know what you are doing and have a back-up)

To do this, follow these steps for all the Web Front end Servers in the Farm (I complete this on all servers in the Farm in case I promote an App Server to become a WFE server)

<ol>
<li>Click <strong class="uiterm">Start</strong>, click <strong class="uiterm">Run</strong>, type <span class="userInput">regedit</span>, and then click <strong class="uiterm">OK</strong>.</li>
<li>Locate and then click the following registry subkey: <strong class="uiterm">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0</strong></li>
<li>Right-click <strong class="uiterm">MSV1_0</strong>, point to <strong class="uiterm">New</strong>, and then click <strong class="uiterm">Multi-String Value</strong>.</li>
<li>In the <strong class="uiterm">Name</strong> column, type <span class="userInput">BackConnectionHostNames</span>, and then press ENTER.</li>
<li>Right-click <strong class="uiterm">BackConnectionHostNames</strong>, and then click <strong class="uiterm">Modify</strong>.<ol>
<li>In the <strong class="uiterm">Value</strong> data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click <strong class="uiterm">OK</strong>.<br><b>Note </b>Type each host name on a separate line.<br><b>Note </b>If the BackConnectionHostNames registry entry exists as a REG_DWORD type, you have to delete the BackConnectionHostNames registry entry.</li>
</ol></li>
<li>Quit Registry Editor, and then restart the IISAdmin service.<br>(Open Services.msc and restart the IISAdmin Service - if you still have the issue then the server will need to be restarted -Schedule after hours)</li>
</ol>

<strong><span style="text-decoration:underline;">NB: My 5 cents on the above:</span></strong>

<ol><ol>
<li>Ensure the Host Names are on a separate line with no characters or spaces&nbsp;inbetween&nbsp;(My examples below)<br><span style="color:#ff0000;">mytest.sharepoint.com</span><br><span style="color:#ff0000;"> test.sharepoint.com</span></li>
<li>Make sure you add the URL that is used by the Load Balancer otherwise you will still be prompted (My example below - this is dependent on how your redirection is configured)<br><span style="color:#ff0000;font-family:arial,helvetica,sans-serif;">myloadbalancer.sharepoint.com</span></li>
</ol></ol>

<span style="text-decoration:underline;"><span style="font-family:arial,helvetica,sans-serif;font-size:small;">&nbsp;</span></span>

<span style="text-decoration:underline;"><span style="font-family:arial,helvetica,sans-serif;font-size:small;"><strong>PowerShell example to add your URL's so you don't have to add each one manually:</strong><span style="color:#ff0000;text-decoration:underline;"><br></span></span></span>

<span style="font-family:arial,helvetica,sans-serif;font-size:small;">New-ItemProperty HKLM:\System\CurrentControlSet\Control\Lsa\MSV1_0 -Name "BackConnectionHostNames" -value "<span style="color:#ff0000;">mytest.sharepoint.com</span>`r`n<span style="color:#ff0000;">test.sharepoint.com</span><span style="font-size:small;">`r`n</span><span style="color:#ff0000;">myloadbalancer.sharepoint.com</span>" -PropertyType MultiString</span>

<span><span style="font-size:small;"><br>Simply replace your URL's where mine are and add any additional URL's making sure you include the New Line and Carriage Return characters <span style="color:#ff0000;font-size:small;">&nbsp;</span><span style="font-size:small;"><span style="color:#ff0000;">`r`n</span> </span>inbetween each URL.</span><br></span>

<span style="font-family:arial,helvetica,sans-serif;font-size:small;"><span style="font-size:small;"><span style="text-decoration:underline;"></span></span></span>

<strong><span style="font-family:arial,helvetica,sans-serif;font-size:small;"><span style="font-size:small;"><span style="text-decoration:underline;">NB - ANTIVIRUS</span><br></span></span></strong>

<span style="font-family:arial,helvetica,sans-serif;font-size:small;">Some Antivirus software will block both Manual and PowerShell editing of the Registry for the root below \Lsa.<br></span><span style="font-family:arial,helvetica,sans-serif;font-size:small;">You may have to temporarily disable the Antivirus whilst making these changes.<br></span>]]></content:encoded>
    </item>
    <item>
      <title>Move PowerPivot to a dedicated server but with Kerberos configured</title>
      <link>https://docs.microsoft.com/archive/blogs/scottstewart/move-powerpivot-to-a-dedicated-server-but-with-kerberos-configured</link>
      <pubDate>Thu, 17 Apr 2014 00:43:47 GMT</pubDate>
      <dc:creator><![CDATA[Scott (Senior Program Manager ODSP)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/scottstewart/2014/04/17/move-powerpivot-to-a-dedicated-server-but-with-kerberos-configured/</guid>
      <description><![CDATA[SharePoint 2013 PowerPivot can now be configured on a standalone server i.e. not part of the...]]></description>
      <content:encoded><![CDATA[SharePoint 2013 PowerPivot can now be configured on a standalone server i.e. not part of the farm.

Whilst some may wonder why, this is a big deal from a scalability perspective as that means you can therefore have multiple servers configured to handle increased workload.

A few caveats however:

<ol>
<li>Do not try and configure PowerPivot to use SQL Clustering - SharePoint "Clusters" (Not technically correct but the same concept)&nbsp;the PowerPivot instances it is aware of,</li>
<li>Do not try and install PowerPivot as more than 1 instance on the same server (Only 1 PowerPivot instance is supported on 1 server)</li>
</ol>

Reference for installation and Configuration&nbsp;- https://technet.microsoft.com/en-us/library/dn456880(v=office.15).aspx

An interesting thing happened to me whilst moving a Customer of mine's&nbsp;PowerPivot from a SharePoint server to a dedicated server.

This article assumes that you have previously configured PowerPivot and are now simply wanting to move the installation.

Firstly the following is all that is required to move it:

<ol>
<li>Install and configure PowerPivot on a new server,</li>
<li>Open the Excel Service application settings by selecting and opening properties,</li>
<li>Add the server to Data Model list e.g. SERVER\POWERPIVOT,<br>You may add multiple servers if you have configured PowerPivot on multiple and SharePoint will round robin allocate each server for processing,</li>
<li>Remove the old server details and uninstall PowerPivot from the SharePoint server.</li>
</ol>

<span style="color:#ff6600;">You do not need to re-run the PowerPivot 2013 configuration tool to finalize the move.</span>

<span style="color:#ff0000;">IF YOU ARE LIKE ME AND YOU&nbsp;RE-RAN THE&nbsp; POWERPIVOT CONFIG TOOL WITH KERBEROS ALREADY CONFIGURED</span>

The<span style="text-decoration:underline;"> PowerPivot configuration tool succeeds</span> but you receive <span style="text-decoration:underline;">"file not found" errors</span> when opening the PowerPivot gallery then this small but important note below is for you.

I then looked in the _layouts folder on my SharePoint servers only to find that there was no PowerPivot folder yet the config tool told me it was there.

The fix is actually very simple: (KERBEROS SECURITY WILL BE TEMPORARILY "BROKEN" SO EXPECT SOME DOWNTIME)

<ol>
<li>Open the security of the web application in Central Admin and change it from Kerberos to NTLM (temporarily).</li>
<li>Re-Run the PowerPivot configuration tool and let it fix and apply settings,</li>
<li>Re-Enable Kerberos on the web application.</li>
</ol>

You should now see the PowerPivot sub-folder under the _Layouts folder on the SharePoint servers.]]></content:encoded>
    </item>
  </channel>
</rss>