<?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 in the wild</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/rycampbe/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/rycampbe/feed.xml</link>
    <description>Recommendations and advice for common challenges</description>
    <lastBuildDate>Tue, 16 Apr 2019 06:15:13 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>SharePoint 2013 - Export Index a la Crawl Log</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/sharepoint-2013-export-index-a-la-crawl-log</link>
      <pubDate>Fri, 15 Aug 2014 05:21:34 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Campbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2014/08/15/sharepoint-2013-export-index-a-la-crawl-log/</guid>
      <description><![CDATA[I ran into an issue where I was replacing a competitor&#39;s search service.&nbsp; I needed to...]]></description>
      <content:encoded><![CDATA[<p>I ran into an issue where I was replacing a competitor&#39;s search service.&nbsp; I needed to provide validation that SharePoint indexed the same data and used the crawl log to get a list of all the items in SharePoint.&nbsp; Here&#39;s the code:</p>
<p></p>
<p style="background:white;margin:0in 0in 0pt;"><span style="color:orangered;font-family:&#39;Lucida Console&#39;;font-size:9pt;">$ssa</span><span style="font-family:&#39;Lucida Console&#39;;font-size:9pt;"> <span style="color:darkgray;">=</span> <span style="color:blue;">Get-SPEnterpriseSearchServiceApplication</span></span></p>
<p style="background:white;margin:0in 0in 0pt;"><span style="color:orangered;font-family:&#39;Lucida Console&#39;;font-size:9pt;">$cl</span><span style="font-family:&#39;Lucida Console&#39;;font-size:9pt;"> <span style="color:darkgray;">=</span> <span style="color:blue;">New-Object</span> <span style="color:blueviolet;">Microsoft.Office.Server.Search.Administration.CrawlLog</span> <span style="color:orangered;">$ssa</span></span></p>
<p style="background:white;margin:0in 0in 0pt;"><span style="color:orangered;font-family:&#39;Lucida Console&#39;;font-size:9pt;">$cl</span><span style="color:darkgray;font-family:&#39;Lucida Console&#39;;font-size:9pt;">.</span><span style="font-family:&#39;Lucida Console&#39;;font-size:9pt;">GetCrawledUrls(<span style="color:orangered;">$false</span><span style="color:darkgray;">,</span><span style="color:purple;">1000000</span><span style="color:darkgray;">,</span><span style="color:darkred;">&quot;&quot;</span><span style="color:darkgray;">,</span><span style="color:orangered;">$false</span><span style="color:darkgray;">,</span><span style="color:purple;">-1</span><span style="color:darkgray;">,</span><span style="color:purple;">0</span><span style="color:darkgray;">,</span><span style="color:purple;">-1</span><span style="color:darkgray;">,[</span><span style="color:teal;">datetime</span><span style="color:darkgray;">]::</span>minvalue<span style="color:darkgray;">,[</span><span style="color:teal;">datetime</span><span style="color:darkgray;">]::</span>maxvalue) <span style="color:darkgray;">|</span> <span style="color:blue;">export-csv</span> <span style="color:navy;">-notype</span> <span style="color:blueviolet;">successes.csv </span><span style="color:#548235;">&nbsp;# This will likely be huge</span></span></p>
<p style="background:white;margin:0in 0in 0pt;"><span style="color:orangered;font-family:&#39;Lucida Console&#39;;font-size:9pt;">$cl</span><span style="color:darkgray;font-family:&#39;Lucida Console&#39;;font-size:9pt;">.</span><span style="font-family:&#39;Lucida Console&#39;;font-size:9pt;">GetCrawledUrls(<span style="color:orangered;">$false</span><span style="color:darkgray;">,</span><span style="color:purple;">1000000</span><span style="color:darkgray;">,</span><span style="color:darkred;">&quot;&quot;</span><span style="color:darkgray;">,</span><span style="color:orangered;">$false</span><span style="color:darkgray;">,</span><span style="color:purple;">-1</span><span style="color:darkgray;">,</span><span style="color:purple;">1</span><span style="color:darkgray;">,</span><span style="color:purple;">-1</span><span style="color:darkgray;">,[</span><span style="color:teal;">datetime</span><span style="color:darkgray;">]::</span>minvalue<span style="color:darkgray;">,[</span><span style="color:teal;">datetime</span><span style="color:darkgray;">]::</span>maxvalue) <span style="color:darkgray;">|</span> <span style="color:blue;">export-csv</span> <span style="color:navy;">-notype</span> <span style="color:blueviolet;">warnings.csv</span></span></p>
<p style="background:white;margin:0in 0in 0pt;"><span style="color:orangered;font-family:&#39;Lucida Console&#39;;font-size:9pt;">$cl</span><span style="color:darkgray;font-family:&#39;Lucida Console&#39;;font-size:9pt;">.</span><span style="font-family:&#39;Lucida Console&#39;;font-size:9pt;">GetCrawledUrls(<span style="color:orangered;">$false</span><span style="color:darkgray;">,</span><span style="color:purple;">1000000</span><span style="color:darkgray;">,</span><span style="color:darkred;">&quot;&quot;</span><span style="color:darkgray;">,</span><span style="color:orangered;">$false</span><span style="color:darkgray;">,</span><span style="color:purple;">-1</span><span style="color:darkgray;">,</span><span style="color:purple;">2</span><span style="color:darkgray;">,</span><span style="color:purple;">-1</span><span style="color:darkgray;">,[</span><span style="color:teal;">datetime</span><span style="color:darkgray;">]::</span>minvalue<span style="color:darkgray;">,[</span><span style="color:teal;">datetime</span><span style="color:darkgray;">]::</span>maxvalue) <span style="color:darkgray;">|</span> <span style="color:blue;">export-csv</span> <span style="color:navy;">-notype</span> <span style="color:blueviolet;">errors.csv</span></span></p>
<p><span style="font-family:Times New Roman;font-size:medium;"> </span></p>
<p></p>
<p>Then just a quick ETL to SQL for SP&#39;s index, a full outer join and done.</p>]]></content:encoded>
    </item>
    <item>
      <title>Securing SharePoint: Harden SQL Server in SharePoint Environments</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/securing-sharepoint-harden-sql-server-in-sharepoint-environments</link>
      <pubDate>Mon, 14 Oct 2013 08:25:41 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Campbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2013/10/14/securing-sharepoint-harden-sql-server-in-sharepoint-environments/</guid>
      <description><![CDATA[As more and more sensitive data is stored in SharePoint, we find ourselves with a new requirement:...]]></description>
      <content:encoded><![CDATA[<p>As more and more sensitive data is stored in SharePoint, we find ourselves with a new requirement:  how do we secure SQL Server?  Permissions and Site access are great, but the content still lives in the database and we need to insure SQL Server's security is a first class citizen in our architecture.  While we can't completely eliminate the risk, we can dramatically reduce it.
</p><p>Hardening SQL Server is done in a 3 phased approach: 
</p><ol><li>Encryption at Rest (Encrypt the data sitting on the hard drives)
</li><li>Encrypt Connections (Encrypt the data in flight on the network between servers)
</li><li>Server Isolation (Configure SQL Server's firewall to ignore requests from unauthorized servers)
</li></ol><p>
 </p><p><em>NOTE: These steps are done on a single server instance.  This blog can be used as a guide for more complex implementations including other firewall products, clustering, IPSec, VLANs, etc.  Additionally, this post assumes you've already implemented Kerberos.
</em></p><p>
 </p><h1>Encryption at Rest
</h1><p>Encryption at Rest is accomplished via Transparent Data Encryption (TDE).  TDE uses a server level certificate to do page level encryption on the raw database MDF/LDF files.  TDE uses a symmetric key stored in the master database in the form of a certificate (or an asymmetric key stored in an EKM module, but that's beyond the scope of this discussion).  Data is encrypted in AES or 3DES and the original certificate is required to access the database.
</p><p>At a high level, TDE protects us in the event the hard drives or backups are stolen/compromised; the offending user will not be able to restore or attach the databases.  SQL Server recovery tools will be nullified and only recover gibberish.  If users are unfamiliar with the concept, TDE is logically similar to Bitlocker in the OS.  
</p><p>
 </p><h2>How to set it up:
</h2><p>TDE is deployed in 2 phases:  Instance and Database Configuration.  Instance Configuration is done only once per instance, but Database Configuration will need to be repeated for each database
</p><h3>Instance Configuration:
</h3><ol><li><div>Create a master key (and Password!) that will reside in the Master Database
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">USE</span>
					<span style="color:teal">[master]</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">GO</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">CREATE</span>
					<span style="color:blue">MASTER</span>
					<span style="color:blue">KEY</span>
					<span style="color:blue">ENCRYPTION</span>
					<span style="color:blue">BY</span>
					<span style="color:blue">PASSWORD<span style="color:gray">=<span style="color:red">'P@$$w0rd'</span>
						</span></span></span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p><p>
 </p></li><li><div>Create a certificate protected with the Master Key
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">USE</span>
					<span style="color:teal">[master]</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">CREATE</span>
					<span style="color:blue">CERTIFICATE</span>
					<span style="color:teal">TDECertificate</span>
					<span style="color:blue">WITH</span>
					<span style="color:blue">SUBJECT</span>
					<span style="color:gray">=</span>
					<span style="color:red">'TDE Certificate'</span>
				</span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p><p>
 </p></li><li><div>Done!
</div><p>
 </p></li></ol><h3>Database Configuration:
</h3><ol><li><div>Get the certificate name 
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">SELECT</span>
					<span style="color:teal">name<span style="color:gray">,<span style="color:teal">pvt_key_encryption_type_desc</span>
							<span style="color:blue">FROM</span>
							<span style="color:green">sys<span style="color:gray">.<span style="color:green">certificates</span>
								</span></span></span></span></span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p><p>
 </p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/6786.101413_1526_SecuringSha1.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/6786.101413_5F00_1526_5F00_SecuringSha1.png" alt=""/><span style="color:blue; font-family:Consolas; font-size:9pt">
				</span></p><p>
 </p></li><li><div>Create a Database Encryption Key (I created a DB called "Test") using the certificate name from the previous step
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">USE</span>
					<span style="color:teal">[Test]</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">GO</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">CREATE</span>
					<span style="color:blue">DATABASE</span>
					<span style="color:blue">ENCRYPTION</span>
					<span style="color:blue">KEY</span>
					<span style="color:blue">WITH</span>
					<span style="color:blue">ALGORITHM</span>
					<span style="color:gray">=</span>
					<span style="color:blue">AES_256</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">ENCRYPTION</span>
					<span style="color:blue">BY</span>
					<span style="color:blue">SERVER</span>
					<span style="color:blue">CERTIFICATE</span>
					<span style="color:teal">TDECertificate</span>
				</span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p><p>
 </p></li><li><div>Set the Database to use Encryption
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">USE</span>
					<span style="color:teal">[master]</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">ALTER</span>
					<span style="color:blue">DATABASE</span>
					<span style="color:teal">[Test]</span>
					<span style="color:blue">SET</span>
					<span style="color:blue">ENCRYPTION</span>
					<span style="color:blue">ON
</span></span></p><p>
 </p></li><li>Done!
</li></ol><h3>Backup the Cert:
</h3><ol><li><div>You'll need the cert to restore the DB to another server.  Back up both files and save the Encryption password somewhere secure!
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">BACKUP</span>
					<span style="color:blue">CERTIFICATE</span>
					<span style="color:teal">TDECertificate</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">TO</span>
					<span style="color:blue">FILE</span>
					<span style="color:gray">=</span>
					<span style="color:red">'C:\TDECertificate.cert'</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">WITH</span>
					<span style="color:blue">PRIVATE</span>
					<span style="color:blue">KEY <span style="color:gray">(</span> FILE</span>
					<span style="color:gray">=</span>
					<span style="color:red">'C:\TDECertPrivateKey.key'<span style="color:gray">,</span>
						<span style="color:blue">ENCRYPTION</span>
						<span style="color:blue">BY</span>
						<span style="color:blue">PASSWORD</span>
						<span style="color:gray">=</span> 'P@$$w0rd1234'<span style="color:gray">)</span>
					</span>
				</span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p><p>
 </p></li><li>Done!
</li></ol><h3>Test:
</h3><ol><li><div>Backup the database
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">BACKUP</span>
					<span style="color:blue">DATABASE</span>
					<span style="color:teal">[Test]</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">TO</span>
					<span style="color:blue">DISK<span style="color:gray">=<span style="color:red">'C:\Test.bak'</span>
						</span></span></span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p></li><li><div>File copy it another instance (Instance B) and try to restore it
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">RESTORE</span>
					<span style="color:blue">DATABASE</span>
					<span style="color:teal">[Test]</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">FROM</span>
					<span style="color:blue">DISK<span style="color:gray">=<span style="color:red">'C:\Test.bak'</span>
						</span></span></span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p></li><li><div>It will fail with a message similar to
</div><p><span style="color:red; font-size:8pt"><span style="font-family:Helvetica">Msg 33111, Level 16, State 3, Line 1<span style="color:#373737"><br/><span style="color:red">Cannot find server certificate with thumbprint '…….'.<span style="color:#373737"><br/><span style="color:red">Msg 3013, Level 16, State 1, Line 1<span style="color:#373737"><br/><span style="color:red">RESTORE DATABASE is terminating abnormally.</span></span></span></span></span></span></span>
				</span></p></li><li>Success!  Users can not arbitrarily restore the database without the applicable certificates from the server and the encryption password 
</li><li><div>To properly restore the database, file copy the C:\TDECertPrivateKey.key file to Instance B and restore it
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">USE</span>
					<span style="color:blue">master</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">CREATE</span>
					<span style="color:blue">CERTIFICATE</span>
					<span style="color:teal">TDECertificate</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">FROM</span>
					<span style="color:blue">FILE</span>
					<span style="color:gray">=</span>
					<span style="color:red">'C:\TDECertificate.cert'</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">WITH</span>
					<span style="color:blue">PRIVATE</span>
					<span style="color:blue">KEY <span style="color:gray">(<span style="color:blue">FILE</span> =</span>
						<span style="color:red">'C:\TDECertPrivateKey.key'<span style="color:gray">,</span>
						</span>
					</span></span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">DECRYPTION</span>
					<span style="color:blue">BY</span>
					<span style="color:blue">PASSWORD</span>
					<span style="color:gray">=</span>
					<span style="color:red">'P@$$w0rd1234'<span style="color:gray">)</span>
					</span></span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p></li><li><div>Try to restore the database on Instance B
</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">RESTORE</span>
					<span style="color:blue">DATABASE</span>
					<span style="color:teal">[Test]</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">FROM</span>
					<span style="color:blue">DISK<span style="color:gray">=<span style="color:red">'C:\Test.bak'</span>
						</span></span></span></p><p><span style="color:blue; font-family:Consolas; font-size:9pt">GO
</span></p></li><li>Done!
</li></ol><p>
 </p><p>That finalizes our TDE setup and encrypts our data on the disks.  We're now protected from individuals grabbing the disks and/or database backups without authorization.
</p><p>
 </p><p><em>Note about Compression: Compression is done by finding patterns in the binary format of the applicable file and converting them to a smaller pattern (i.e. '12345' is represented by 'a').  Encryption removes patterns in the raw data to prevent brute force decryption.  Compression and Encryption do not coexist and TDE will effectively eliminate all gains from Compression. Enabling encryption on a compressed database will just cause a lot of useless overhead as SQL decompresses an uncompressed file.</em>
	</p><p>
 </p><h1>Encrypt Connections
</h1><p>Encrypting the Connections is accomplished via Secure Socket Layer (SSL).  SSL uses a certificate exchange process to validate the server's authenticity and encrypt the data exchanged between the servers.  
</p><p>SSL protects the environment by encrypting the information transmitted between servers.  If a malicious user was attempting reconnaissance via a wire sniffer (Netmon, WireShark or some similar tool) all the data would be encrypted and the user would get gibberish.
</p><p>
 </p><h2>How to set it up:
</h2><p><em>Note: This walkthrough assumes you've already deployed an applicable server certificate.  My VM uses a self-signed cert; a full production configuration should use a 3<sup>rd</sup> party trusted authority.
</em></p><ol><li>Open Sql Server Configuration Manager
</li><li>Expand SQL Server Network Configuration
</li><li><div>Right click on <strong><em>Protocols for &lt;Instance Name&gt;</em></strong> and select <strong><em>Properties</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/0777.101413_1526_SecuringSha2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/0777.101413_5F00_1526_5F00_SecuringSha2.png" alt=""/>
			</p><p>
 </p></li><li><div>Change <strong><em>Force Encryption</em></strong> to <strong><em>Yes</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/1832.101413_1526_SecuringSha3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/1832.101413_5F00_1526_5F00_SecuringSha3.png" alt=""/>
			</p><p>
 </p></li><li><div>Select the <strong><em>Certificates</em></strong> tab and select your applicable certificate
</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/3513.101413_1526_SecuringSha4.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/3513.101413_5F00_1526_5F00_SecuringSha4.png" alt=""/>
			</p><p>
 </p></li><li>Click OK and restart SQL Server
</li><li>Done!
</li></ol><p>
 </p><h3>Test:
</h3><ol><li><div>Execute the below command and validate <strong><em>Encrypt_Option</em></strong> is set to <strong><em>TRUE</em></strong>
			</div><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">SELECT</span>
					<span style="color:teal">net_transport<span style="color:gray">,</span> auth_scheme<span style="color:gray">,</span> encrypt_option</span>
				</span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">FROM</span>
					<span style="color:green">sys<span style="color:gray">.<span style="color:green">dm_exec_connections</span>
						</span></span></span></p><p><span style="font-family:Consolas; font-size:9pt"><span style="color:blue">WHERE</span>
					<span style="color:teal">session_id</span>
					<span style="color:gray">=</span>
					<span style="color:fuchsia">@@SPID<span style="color:gray">;
</span></span></span></p><p>
 </p></li><li>Done!
</li></ol><p>
 </p><p><em>Note: Authentication to SQL Server via NTLM/Kerberos is ALWAYS encrypted.  But transactions after encryption are clear text</em>
	</p><p>
 </p><p>
 </p><h1>Server Isolation
</h1><p>Server Isolation can be done several different ways, but the end result is the same:  configuring the server to only respond to authorized machines.  An "authorized machine" is a list controlled by a governing body (usually security team or network team).  The simplest and most cost effective way to isolate SQL is configuring the Windows Firewall with Advanced Security.  Other methods exist (VLANs, other Firewall products, etc.) but they are beyond the scope of this document.
</p><p>By isolating SQL, we reduce the attackable area of SQL server, enforcing an additional layer of security beyond network access.
</p><h2>How to set it up:
</h2><p><em>Note: This walkthrough configures the local machine's firewall.  Windows Firewall is configurable via Group Policy and should be used if you're deploying an actual production environment.
</em></p><ol><li><strong><em>Windows Firewall with Advanced Security</em></strong> from Administrative Tools
</li><li><div>Verify <strong><em>Inbound Connections that do not match a rule are blocked</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/4405.101413_1526_SecuringSha5.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/4405.101413_5F00_1526_5F00_SecuringSha5.png" alt=""/>
			</p><p>
 </p></li><li>Select <strong><em>Inbound Rules </em></strong>and choose <strong><em>New Rule</em></strong>
		</li><li>For <strong><em>Rule Type</em></strong> select <strong><em>Program</em></strong> and click <strong><em>Next</em></strong>
		</li><li><div>Select your SQL Server EXE and click <strong><em>Next</em></strong>
			</div><ol><li>Default path is C:\Program Files\Microsoft SQL Server\&lt;Instance Name&gt;\MSSQL\Binn\sqlservr.exe
</li></ol></li><li>Choose <strong><em>Allow the Connection</em></strong> and click <strong><em>Next</em></strong>
		</li><li>Choose all 3 domain types and click <strong><em>Next</em></strong>
		</li><li>Give the new rule a Friendly Name and click <strong><em>Finish</em></strong>
		</li><li><div>Select your newly created rule and select <strong><em>Properties</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/4540.101413_1526_SecuringSha6.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/4540.101413_5F00_1526_5F00_SecuringSha6.png" alt=""/>
			</p><p>
 </p></li><li><div>In the Test properties window, select <strong><em>Scope </em></strong>tab and change <strong><em>Remote IP Address</em></strong> to <strong><em>These IP Addresses</em></strong>
			</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/6507.101413_1526_SecuringSha7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/6507.101413_5F00_1526_5F00_SecuringSha7.png" alt=""/>
			</p><p>
 </p></li><li><div>Click <strong><em>Add</em></strong> and add all IP Addresses of the SharePoint Farm
</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/8270.101413_1526_SecuringSha8.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/8270.101413_5F00_1526_5F00_SecuringSha8.png" alt=""/>
			</p><p>
 </p></li><li>Click <strong><em>OK</em></strong> to close the window
</li><li>Done!
</li></ol><h3>Test:
</h3><ol><li>From an authorized machine (one of the IPs you put in the previous step), open SQL Server Management Studio and try to connect.  It should be successful.
</li><li><div>From an unauthorized machine (an IP you didn't put in the previous step), open SQL Server Management Studio and try to connect.  It should fail
</div><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/4314.101413_1526_SecuringSha9.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/4314.101413_5F00_1526_5F00_SecuringSha9.png" alt=""/>
			</p></li><li>Done!
</li></ol><p>
 </p><p>
 </p><p>
 </p><h1>Summary
</h1><p>SQL Server's security should match the information sensitivity in SharePoint.  SharePoint/Windows permissions do not apply to raw content within the database and are insufficient to protect SharePoint's data to a determined user.  There is a cost associated with each security implementation, both in server performance and O&amp;M.  Your mileage may vary, but my load tests showed +/- 15% performance degradation.  However, if security if your primary concern, these performance costs could be mitigated by scaling up SQL Server.
</p><p>While no amount of security is perfect, implementing this three phased approach will significantly reduce SQL's vulnerability to unintended data access.  
</p><p>
 </p><p>Further reading with a deeper analysis of these security approaches and additional information for Access Control can be found on the whitepaper <a href="https://download.microsoft.com/download/8/F/A/8FABACD7-803E-40FC-ADF8-355E7D218F4C/SQL_Server_2012_Security_Best_Practice_Whitepaper_Apr2012.docx">SQL Server 2012 Security Best Practices - Operational and Administrative Tasks</a>
	</p><p>
 </p><h1>Non-Default Ports and SQL Client Aliases
</h1><p>Non-Default Ports + SQL Client Aliases are obfuscation and should not be used as a sole defense strategy.  With regards to security, a Non-Default Ports implementation is limited when considering the ease and speed of current technology to scan the ~65k possible ports SQL Server could utilize.  SharePoint requires SQL Aliases in all Non-default port SQL instances, but SQL Aliases are incompatible with some business intelligence features and Diagnostic Timer Jobs.  Returning SharePoint to 100% functionality requires a combination of SQL Client aliases and DNS Aliases.  SQL-specific traffic will use the SQL Client alias, while non-SQL Traffic to the database server (i.e. WMI calls) will utilize the DNS Alias.  
</p><p>Consider the limited value of Non-Default port implementations, compared to the operational complexity of SQL Client Aliases and DNS Aliases before implementing.  Additionally, there is no security value using SQL Client Aliases in default port implementations.  
</p><p>
 </p><h1>DNS Aliases
</h1><p>DNS Aliases facilitate scale up/scale out/migration scenarios and enhance manageability.  Their value is concentrated in maintenance activities and bring little value to a defense strategy.  Their use is 100% compatible with all SharePoint functions and features.
</p>]]></content:encoded>
    </item>
    <item>
      <title>Move a Web Application to a new Application Pool</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/move-a-web-application-to-a-new-application-pool</link>
      <pubDate>Thu, 29 Aug 2013 20:01:19 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Campbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2013/08/29/move-a-web-application-to-a-new-application-pool/</guid>
      <description><![CDATA[A colleague sent me a great question today:
"Instead of consolidating application pools, how do I...]]></description>
      <content:encoded><![CDATA[<p>A colleague sent me a great question today:
</p><p>"Instead of consolidating application pools, how do I split up an application pool with too many web applications?"
</p><p>The answer is actually to modify the application pool properties of the Web Application; NOT create a new application pool and set the Web Application Property.  Here's the code:
</p><p>
 </p><p><pre><code><span style="font-size:11pt">$webApp = Get-SPWebApplication <a href="https://sp2013.lab.local"><span style="color:#0563c1; text-decoration:underline">https://sp2013.lab.local</span></a>
				</span></code></pre></p><p><pre><code><span style="font-size:11pt">$newWebAppPWD = ConvertTo-SecureString "Password"
</span></code></pre></p><p><pre><code><span style="font-size:11pt">$webApp.ApplicationPool.Username = "lab\AppPoolSvcAcct"
</span></code></pre></p><p><pre><code><span style="font-size:11pt">$webApp.ApplicationPool.Name = "New App Pool Name"
</span></code></pre></p><p><pre><code><span style="font-size:11pt">$webApp.ApplicationPool.SetPassword($webWebAppPWD)
</span></code></pre></p><p><pre><code><span style="font-size:11pt">$webApp.Provision()
</span></code></pre></p><p>
 </p><p>To check your work:
</p><p><pre><code><span style="font-size:11pt">$appPools = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.ApplicationPools
</span></code></pre></p><p><pre><code><span style="font-size:11pt">$appPools</span></code></pre></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2007 Upgrade – Identifying Customizations</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/sharepoint-2007-upgrade-identifying-customizations</link>
      <pubDate>Tue, 11 Jun 2013 11:07:00 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Campbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2013/06/11/sharepoint-2007-upgrade-identifying-customizations/</guid>
      <description><![CDATA[During an upgrade from SharePoint 2007 to 2010, knowing where custom webparts and features are...]]></description>
      <content:encoded><![CDATA[<p>During an upgrade from SharePoint 2007 to 2010, knowing where custom webparts and features are deployed can be useful for targeted testing and mitigation. Here's is some TSQL to help identify where those sites are.</p>
<p>First, from SharePoint 2007, execute the PowerShell:</p>
<pre><code>ststadm -o enumallwebs -includewebparts -includefeatures -databasename WSS_Content_YourDBName &gt; sp2007EnumWebsOutput.txt </code></pre>
<p>&nbsp;</p>
<p>This command essentially lists every web in your database and the features and webparts it's using. Compare that list with a known list of out-of-box (OOB) features and the deltas will be the customizations. I wrapped that up into a TSQL command the creates a nice pivot table with webs and customizations. To use it, copy the sp2007EnumWebsOut.txt to an instance of SQL Server and execute the attached TSQL (attached).&nbsp; The result with be 3 SQL Results with the source of the features listed (OOB, Fab40 or Custom). Copy and paste those&nbsp;to Excel and you can do whatever filtering and sorting you need to identify the sites.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9033/00/00/03/57/81/91/Identify%20Customizations%20sql.txt" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9033-00-00-03-57-81-91/Identify-Customizations-sql.txt">Identify Customizations sql.txt</a></p>]]></content:encoded>
    </item>
    <item>
      <title>SSL Sites with Hostnames in SharePoint 2010 and SharePoint 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/ssl-sites-with-hostnames-in-sharepoint-2010-and-sharepoint-2013</link>
      <pubDate>Fri, 07 Jun 2013 06:53:03 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Campbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2013/06/07/ssl-sites-with-hostnames-in-sharepoint-2010-and-sharepoint-2013/</guid>
      <description><![CDATA[As you implement SharePoint in your security-conscious enterprise, you'll run into a scalability...]]></description>
      <content:encoded><![CDATA[<p>As you implement SharePoint in your security-conscious enterprise, you'll run into a scalability issue: IIS 7.5 (Windows 2008 R2) requires dedicated IP addresses for each SSL site on each Web Front End.  Remember that SAML claims require end-to-end SSL – if you're using SAML, you're affected!
</p><p>Why is this a problem?  Consider the most basic SharePoint architecture with a single Web Application:
</p><p style="text-align: center"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/3157.060713_1716_SSLSiteswit1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/3157.060713_5F00_1716_5F00_SSLSiteswit1.jpg" alt=""/>
	</p><p>This architecture uses 4 IP address:  1 for the VIP and 3 for the Web Front Ends.  Next, you've followed the <a href="https://technet.microsoft.com/en-us/library/cc262706(v=office.14).aspx">Best practices for My Sites</a> article, and deployed MySites to a dedicated Web Application and you require SSL.  Your architecture is now:
</p><p style="text-align: center"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/8787.060713_1716_SSLSiteswit2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/8787.060713_5F00_1716_5F00_SSLSiteswit2.jpg" alt=""/>
	</p><p>
 </p><p>The IP footprint has grown from 4 to 8.  If we added another web application requiring SSL, this would need a total of 12 IP addresses and there-in lines our scalability problem:  In SharePoint on IIS 7.5 (Windows 2008 R2), the traditional IP address footprint is calculated with the formula
</p><p><pre><code>(Number of Web Servers + Number of Network Load Balancer Devices) * Number of Web Applications
</code></pre></p><p>
 </p><p>A bigger, hypothetical network of 5 servers, 3 web applications and 1 NLB, your IP footprint would be a whopping 18 IP Addresses!  In a non-SSL environment, you would just configure hostnames, but when you try to select the certificate in IIS 7.5, the hostname header gets grayed out:
</p><p style="text-align: center"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/2018.060713_1716_SSLSiteswit3.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/2018.060713_5F00_1716_5F00_SSLSiteswit3.jpg" alt=""/>
	</p><p>
 </p><p>So, what do we do?  NetSH.exe!  With NetSH, we can tell the machine to "encrypt traffic on &lt;x&gt; port with &lt;y&gt; certificate".  Combine it with a wildcard certificate and all IIS traffic will be encrypted with the port, but you can still use hostnames.  To execute, from an elevated command prompt, execute:
</p><p><pre><code>Certutil –store My
</code></pre></p><p>
 </p><p>Location the applicable certificate on the output and notate the hash value (we're going to need it!).  My hash is b063314fab008a45b5a1afb0f0dee45b59eb2584
</p><p style="text-align: center"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/2388.060713_1716_SSLSiteswit4.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/2388.060713_5F00_1716_5F00_SSLSiteswit4.jpg" alt=""/>
	</p><p>
 </p><p>Now execute the NETSH command:
</p><p><pre><code>netsh http <span style="color:#7030a0">add sslcert <span style="color:#c00000">ipport=0.0.0.0:443 
</span></span></code></pre></p><p><pre><code><span style="color:#5b9bd5">certhash=b063314fab008a45b5a1afb0f0dee45b59eb2584 
</span></code></pre></p><p><pre><code><span style="color:#70ad47">appid={00112233-4455-6677-8899-AABBCCDDEEFF}
</span></code></pre></p><p>
 </p><p style="text-align: center"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/5531.060713_1716_SSLSiteswit5.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/5531.060713_5F00_1716_5F00_SSLSiteswit5.jpg" alt=""/>
	</p><p>The command's breakdown:
</p><p><span style="color:#7030a0">add sslcert </span>is self-explanatory
</p><p><pre><code><span style="color:red">ipport=0.0.0.0:443</span></code></pre><span style="color:#c00000">
		</span>is telling NetSH  the command applies to <em>"all traffic from this machine on port 443"</em>
	</p><p><span style="color:#5b9bd5"><pre><code>certhash=b063314fab008a45b5a1afb0f0dee45b59eb2584</code></pre>
		</span>is the applicable certificate
</p><p><span style="color:#70ad47"><pre><code>appid={00112233-4455-6677-8899-AABBCCDDEEFF}</code></pre>
		</span>is an arbitrary GUID for identification.  Pick anything you want for this value!
</p><p>
 </p><p>Or to summarize <em>"Encrypt all traffic on port 443 with this cert"</em>.
</p><p>
 </p><p>Now we can create a web application in SharePoint, choosing an applicable host header and port 443:
</p><p style="text-align: center"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/0272.060713_1716_SSLSiteswit6.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/0272.060713_5F00_1716_5F00_SSLSiteswit6.jpg" alt=""/>
	</p><p>Create your site collection and browse it.  Pull up the Certificate and wala!  You've had the certificate applied (Note, I did NOT go into IIS and choose the certificate!).
</p><p style="text-align: center"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/6472.060713_1716_SSLSiteswit7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/6472.060713_5F00_1716_5F00_SSLSiteswit7.png" alt=""/>
	</p><p>
 </p><p>
 </p><p>
 </p><p>This approach only works if you have one-and-only-one certificate per server, usually in an extranet/intranet environment.  In a hosting environment, this may not be applicable unless all your sites are sharing an SSL certificate.  
</p><p>
 </p><p>
 </p><p><em>Question: Isn't this <a href="https://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-server-name-indication-sni-ssl-scalability">Server Name Indication</a>, newly available in Windows 2012 / IIS8?
</em></p><p>Answer: No.  SNI is a many (certificates)-to-many (sites) solution.  IIS7.5 cannot do SNI, but SNI can fulfill the same user scenario of this approach.  If you're running Windows 2012, use SNI.  If you're on Windows 2008 R2, use the above approach.
</p><p>
 </p><p><em>Question #2: I'm using dedicated IPs and want to switch to this approach.  How do I do it?
</em></p><p>Answer: If you have sites currently using 443, netsh will give you an error.  To fix it, you need to remove all your 443 bindings and re-add them without certificates.  If you use the IIS Admin GUI to do it:
</p><ol><li>Change the current port 443 binding to a new port (4433 for example)
</li><li>Create a new binding on 443 with the specified hostname (but do not select a certificate!)
</li><li>Delete the 4433 binding and proceed with your netsh commands
</li></ol><p>As an alternative, you could use APPCMD or PowerShell to do the same thing;  the end result is what's needed:  no bindings on 443 with specified certificates.
</p><p>
 </p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2010 Architecture and Disaster Recovery – when to use UPRE and when to log ship</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/sharepoint-2010-architecture-and-disaster-recovery-when-to-use-upre-and-when-to-log-ship</link>
      <pubDate>Thu, 07 Mar 2013 10:21:06 GMT</pubDate>
      <dc:creator><![CDATA[Ryan Campbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2013/03/07/sharepoint-2010-architecture-and-disaster-recovery-when-to-use-upre-and-when-to-log-ship/</guid>
      <description><![CDATA[The SharePoint 2010 Database types and descriptions TechNet article was recently updated (March 5th,...]]></description>
      <content:encoded><![CDATA[<p>The <a href="https://technet.microsoft.com/en-us/library/cc678868(v=office.14).aspx">SharePoint 2010 Database types and descriptions</a> TechNet article was recently updated (March 5<sup>th</sup>, 2013) to allow log shipping the Profile and Social databases for the User Profile Service.  This change aligns SharePoint 2010 to match the similar TechNet article for <a href="https://technet.microsoft.com/en-us/library/jj841106.aspx">SharePoint 2013</a>.  To understand the change, it's important to understand the tight correlation between Managed Metadata Service (MMS), User Profile Service (UPS), Content Databases and how User Profile Replication Engine (UPRE) works.  Our goal architecture will be a Hot Standby Farm as discussed <a href="https://technet.microsoft.com/en-us/library/ff628971(v=office.14).aspx">here</a> and <a href="https://technet.microsoft.com/en-us/library/ff628971.aspx">here</a>.  In the Hot Standby environment, we're log shipping the Content and MMS databases with matching timings (Backup, Copy and Restore Agent Jobs all happen at the same time)
</p><p>
 </p><h2>Obligatory warning…here comes the deep dive!
</h2><p>There are several fields in users' profile that leverage the MMS service.  Out of box, these include the Past Projects, Skills and Schools fields:
</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/4762.030813_1558_SharePoint21.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/4762.030813_5F00_1558_5F00_SharePoint21.png" alt=""/>
	</p><p>
 </p><p>These are free text fields and are used for a better search and social experience.  Leveraging UPS and MMS, users can identify all users with a particular skill set, or past alumni.  You can see all the terms that have been created by going to the Term Store Management:
</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/2727.030813_1558_SharePoint22.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/2727.030813_5F00_1558_5F00_SharePoint22.png" alt=""/>
	</p><p>
 </p><p>In the database, we can see the terms association across the MMS and UPS Profile databases:
</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/7360.030813_1558_SharePoint23.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/7360.030813_5F00_1558_5F00_SharePoint23.png" alt=""/>
	</p><p><span style="color:red">Note:  Do not run these on your production environment; they are only here to show the closely related the IDs and Terms across the databases.  Even with NOLOCK, it can affect the farm and put you in an unsupported state.  I crashed my MMS Service while getting these screenshots because of these queries
</span></p><p>
 </p><p>We can see the same tight association when we use an MMS column in a list in the content databases:
</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/8054.030813_1558_SharePoint24.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/8054.030813_5F00_1558_5F00_SharePoint24.png" alt=""/>
		<img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/6232.030813_1558_SharePoint25.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/6232.030813_5F00_1558_5F00_SharePoint25.png" alt=""/>
	</p><p>
 </p><p>And in the database:
</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/2072.030813_1558_SharePoint26.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/2072.030813_5F00_1558_5F00_SharePoint26.png" alt=""/>
	</p><p><span style="color:red">Note:  Do not run these on your production environment; they are only here to show the closely related the IDs and Terms across the databases.  Even with NOLOCK, it can affect the farm and put you in an unsupported state.  I crashed my MMS Service while getting these screenshots because of these queries
</span></p><p>
 </p><p>The Managed Metadata Service application uses the GUID and TermID fields to provide all MMS functionality.  The column value is added for the end user to view without the need of another join on the list item.  Keeping the Managed Metadata Service's Database, the Content Database and the User Profile's Profile Database in sync is required for proper functionality of the environment.  
</p><p>If databases get out of sync, you'll have mixed results when using any MMS driven fields.  Some of the symptoms you'll see are:  the MMS fields are read/only (it's relying on the column value to populate for the end user instead of using the ID), all MMS driven functionality will cease (workflows, content type logic, etc.).  Search will start acting up when crawling users, social tagging/notes will fail intermittently and other issues will manifest.  
</p><p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/3857.clip_image001_thumb1_0A720AD6.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/3857.clip_5F00_image001_5F00_thumb1_5F00_0A720AD6.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/2364.clip_image001_thumb1_thumb_176BEAE7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/2364.clip_5F00_image001_5F00_thumb1_5F00_thumb_5F00_176BEAE7.png" alt="" border="0"/></a>
	</p><p><em>The real problem is that you won't know this is happening until you try and use the secondary farm!</em>  Think about that for a moment:  your primary farm is offline, the secondary farm is brought online and large components of the farms are inoperable.  THAT will not be a fun day.
</p><p><strong>&lt;&lt; Obligatory warning over &gt;&gt;
</strong></p><p>
 </p><h2>The UPRE Gap: (Spoiler – UPRE is unreliable if the MMS Database is Read/Only) 
</h2><p>The key to a viable standby farm requires that the Profile Database, the Managed Metadata Database and the Content database are in sync.  Until recently, the only way to accomplish a standby farm was to log ship the Content and MMS databases, but use UPRE for the Profiles.  This kept the Content and MMS databases in sync, but Profiles (UPS) was in a constant state of flux.  Consider these scenarios:
</p><ol><li><div>Scenario: MMS log is applied during UPRE run
</div><ol><li>Outcome: all updates for that run would fail as UPRE would not be able to access the MMS Database.  
</li></ol></li><li><div>Scenario: a user adds a new MMS term to their profile and UPRE ran before the MMS log ship
</div><ol><li>UPRE will try to add the MMS term at the destination farm and fail due to the database being in Read-Only (because of log shipping)
</li></ol></li></ol><p>Traditionally, the answer has included some kind of timing solution and ignoring the UPRE errors that occur in the second scenario.  But this isn't a true hot standby; a large portion of your farm (profiles) are in a state of flux, you can't be sure of their current state.  If the hot standby has an RTO/RPO of less than an hour, but you've implemented a timing solution (for example, UPRE run every 24 hours and MMS log updates are paused) then you've already missed your RTO/RPO SLAs by your own design!
</p><p>
 </p><h2>How to choose when to UPRE and when to Log Ship:
</h2><p>The decision to UPRE or to Log Ship the Profile and Social databases is influenced by several factors:  Volume of Social Data, RPO/RTO, Disaster Recovery you're leveraging (Hot/Warm/Cold).   To guide the decision, we have to ask several questions:
</p><ol><li><div>How are we using the secondary farm?
</div><ol><li>Is it a Hot Standby?  Or another active farm that needs Profile information?
</li></ol></li><li>(Assuming it's a Hot Standby) What is the RPO and RTO times for the secondary farm?
</li><li><div>(Assuming it's a Hot Standby) Is there a difference in timing between UPRE and Log Shipping?
</div><ol><li>Can both UPRE and Log Shipping complete within the RPO and RTO window?
</li></ol></li><li>How critical are User Profiles?  Are they deemed critical enough to have the same uptime and availability as the content databases?
</li><li>What is the state of the secondary farm's MMS Database (read-write or read-only)?
</li></ol><p>Answering these questions will quickly favor UPRE or Log Shipping.  Consider these two scenarios:
</p><h3>Scenario A: 
</h3><p>Consider you have 2 regional farms deployed, one in London and one in Seattle.   Both farms are serving content to users, but Profiles from Seattle Farm are needed at the London Farm.  The answers to our questions are as follows:
</p><ol><li>How are we using the secondary farm? <span style="color:red">Another active Farm that needs Profile information</span>
		</li><li> (Assuming it's a Hot Standby) What is the RPO and RTO times for the secondary farm? <span style="color:red">N/A – it's not a Hot Standby</span>
		</li><li><div>(Assuming it's a Hot Standby) Is there a difference in timing between UPRE and Log Shipping? <span style="color:red">N/A – it's not a Hot Standby</span>
			</div><ol><li>Can both UPRE and Log Shipping complete within the RPO and RTO window? <span style="color:red">N/A – it's not a Hot Standby</span>
				</li></ol></li><li>How critical are User Profiles?  Are they deemed critical enough to have the same uptime and availability as the content databases?  <span style="color:red">No</span>
		</li><li>What is the state of the secondary farm's MMS Database (read-write or read-only)? <span style="color:red">Read-Write</span>
		</li></ol><p>Since the London Farm's MMS database is Read/Write and is an active farm requiring profile information from Seattle Farm, UPRE would be our choice.  UPRE would be able to add terms to the MMS Database and would not be susceptible to disconnection of a log restore of the MMS database.
</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/0358.030813_1558_SharePoint27.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/0358.030813_5F00_1558_5F00_SharePoint27.png" alt=""/>
	</p><p><strong>Note:  this is NOT a DR/Hot-Standby solution.  This is merely two farms that hold separate information, but the London Farm needs the Seattle Farm's profiles for a business need.
</strong></p><p>
 </p><p>
 </p><h3>Scenario B: 
</h3><p>Consider the same 2 regional farms deployment, a farm in London and a farm in Seattle.   All users access the Seattle Farm; the London farm is used if the Seattle farm is unavailable due to maintenance or downtime.  The answers to our questions are as follows:
</p><ol><li>How are we using the secondary farm? <span style="color:red">Hot-Standby</span>
		</li><li>(Assuming it's a Hot Standby) What is the RPO and RTO times for the secondary farm? <span style="color:red">45 minutes and 30 minutes</span>
		</li><li><div>(Assuming it's a Hot Standby) Is there a difference in timing between UPRE and Log Shipping? <span style="color:red">No difference in timing between UPRE and Log Shipping</span>
			</div><ol><li>Can both UPRE and Log Shipping complete within the RPO and RTO window? <span style="color:red">Yes</span>
				</li></ol></li><li>How critical are User Profiles?  Are they deemed critical enough to have the same uptime and availability as the content databases?  <span style="color:red">Yes</span>
		</li><li>What is the state of the secondary farm's MMS Database (read-write or read-only)? <span style="color:red">Read-Only</span>
		</li></ol><p>Since the London Farm's MMS database is Read/Only and is Hot-Standby of the Seattle Farm, Log Shipping the Profile and Social databases would be our choice.  Log Shipping allows us to have a consistent point-in-time on the secondary farm without being affected by the database disconnects that would plague UPRE in this same scenario.
</p><p><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/metablogapi/8244.030813_1558_SharePoint28.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33-metablogapi/8244.030813_5F00_1558_5F00_SharePoint28.png" alt=""/>
	</p><p><strong>Note:  this is a DR/Hot-Standby solution.  Seattle Farm is log shipping all the content, MMS and UPS databases to the London farm.
</strong></p><p><strong>Note:  it's critical that your databases (Content, MMS, Profile and Social) are all in sync in this scenario.  Make sure the timing on your SQL Agent Jobs all match! 
</strong></p><p>
 </p><h2>Is there ever a time to use UPRE instead of Log Shipping in a Hot Standby?
</h2><p>Absolutely!  Here are a few scenarios where UPRE could be chosen instead of Log Shipping:
</p><ul><li>UPRE gives us the flexibility to pick and choose specific profile fields to synchronize and Log Shipping is all or nothing.  If there was a business or security need to reduce the properties to a smaller subset, then UPRE would be a better decision.
</li><li>If we are space constrained on the secondary farm, UPRE would be a better decision; log shipping requires more space on the secondary farm to hold the backup of the transaction log.
</li><li><div>If the 3 SQL Agent Jobs associated with Log Shipping exceed the RTO/RPO SLAs, UPRE would be the better decision
</div><ul><li>This can happen if you are heavily using SharePoint's social features.  
</li></ul></li></ul><p>
 </p><h2>Summary:
</h2><p>With the option to Log Ship the Profile and Social databases, we have greater flexibility to meet the business' needs to provide a reliable and consistent user experience.  Choosing when to Log Ship and when to UPRE, as well as the pros and cons of each, is critical to ensure your architecture is working as expected.</p>]]></content:encoded>
    </item>
    <item>
      <title>Find all list items with multiple values used</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/find-all-list-items-with-multiple-values-used</link>
      <pubDate>Thu, 26 Jul 2012 10:28:00 GMT</pubDate>
      <dc:creator><![CDATA[BigTallCampbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2012/07/26/find-all-list-items-with-multiple-values-used/</guid>
      <description><![CDATA[&nbsp;
I was working with Russ today and an interesting question came up:&nbsp; If a user had a...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p>I was working with Russ today and an interesting question came up:&nbsp; If a user had a list with a multivalue column, how do we find all the list items with more than 1 value selected?</p>
<p>&nbsp;</p>
<p>After much trial and error, LINQ was the simplest to implement.&nbsp; Here's the list we used:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/7701.List.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/7701.List.JPG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/7701.List.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/7701.List.JPG" border="0" /></a></p>
<p>&nbsp;</p>
<p>Testcol is a multi value column and thus our expected result was to return the Recipe #2 and Recipe #4 items.&nbsp; Returning #3 or #1 was a fail.</p>
<p>&nbsp;</p>
<p>On the backend, SharePoint splits it's values with a #; combination.&nbsp; We can see this using the u2u CAML builder:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/8228.u2u.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/8228.u2u.JPG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/8228.u2u.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/8228.u2u.JPG" border="0" /></a></p>
<p>&nbsp;</p>
<p>So the resultant code was a LINQ query with a split on the ;# values:</p>
<p>&nbsp;</p>
<p><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">using</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> (</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SPSite</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> oSite = </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">new</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> </span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SPSite</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">(</span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">"https://VM-SP2010/"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">))</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">using</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> (</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SPWeb</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> oWeb = oSite.RootWeb)</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br /><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SPList</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> oList = oWeb.Lists[</span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">"TestList"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">];</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">List</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">&lt;</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SPListItem</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">&gt; items = (</span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">from</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> l </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">in</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> oList.Items.OfType&lt;</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SPListItem</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">&gt;() </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">where</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> l[</span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">"Testcol"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">].ToString().Split(</span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">new</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">[] { </span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">";#"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> }, </span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">StringSplitOptions</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.None).Length &gt; 3 </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">select</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> l).ToList&lt;</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SPListItem</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">&gt;();</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">foreach</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> (</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">SPListItem</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> item </span></span><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff"><span style="color: #0000ff; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#0000ff">in</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"> items)</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">Console</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.WriteLine(item.DisplayName);</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">Console</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.WriteLine(</span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515"><span style="color: #a31515; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#a31515">"All done!"</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">);</span></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;" face="Consolas" size="2" color="#2b91af">Console</span></span></span><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2">.ReadLine(); </span></span></p>
<p><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"></span></span>&nbsp;</p>
<p><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"><span style="font-family: Consolas; font-size: x-small;" face="Consolas" size="2"></span></span>&nbsp;</p>
<p>And the final result:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/1030.Result.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/1030.Result.JPG"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/1030.Result.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/1030.Result.JPG" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Hyper-V Slow Host Network - How to Fix</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/hyper-v-slow-host-network-how-to-fix</link>
      <pubDate>Mon, 11 Jun 2012 10:50:00 GMT</pubDate>
      <dc:creator><![CDATA[BigTallCampbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2012/06/11/hyper-v-slow-host-network-how-to-fix/</guid>
      <description><![CDATA[Last week I installed the latest version of Windows 8 RP;&nbsp; I was really excited to see Hyper-V...]]></description>
      <content:encoded><![CDATA[<p>Last week I installed the latest version of Windows 8 RP;&nbsp; I was really excited to see Hyper-V and a desktop OS together.&nbsp; It's been running great, but I noticed a peculiar issue:&nbsp; whenever my VM-DC virtual machine (which hosts AD, DNS and DHCP) was running, my host DNS requests would creep and every request added 5 seconds.&nbsp; I suspected my VM-DC machine was getting the request first and rejecting it (VM-DC has no internet access), but I couldn't figure out why.</p>
<p>&nbsp;</p>
<p>To validate, I started WireShark and made an nslookup DNS request.&nbsp; Sure enough, VM-DC got the request first, returned back a bad hostname and then my normal DNS server got the request.&nbsp; From there, I went to make sure my DNS entry didn't get into my External NIC configuration:</p>
<p><em>Ethernet adapter vEthernet (External LAN):</em></p>
<p></p>
<p><em>&nbsp;&nbsp; Connection-specific DNS Suffix&nbsp; . : </em><br /><em>&nbsp;&nbsp; Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2</em><br /><em>&nbsp;&nbsp; Physical Address. . . . . . . . . : D0-67-E5-38-18-8C</em><br /><em>&nbsp;&nbsp; DHCP Enabled. . . . . . . . . . . : Yes</em><br /><em>&nbsp;&nbsp; Autoconfiguration Enabled . . . . : Yes</em><br /><em>&nbsp;&nbsp; Link-local IPv6 Address . . . . . : fe80::c0c1:ae76:bdbe:5c9e%19(Preferred) </em><br /><em>&nbsp;&nbsp; IPv4 Address. . . . . . . . . . . : 192.168.10.1(Preferred) </em><br /><em>&nbsp;&nbsp; Subnet Mask . . . . . . . . . . . : 255.255.255.0</em><br /><em>&nbsp;&nbsp; Lease Obtained. . . . . . . . . . : Monday, June 11, 2012 12:09:00 PM</em><br /><em>&nbsp;&nbsp; Lease Expires . . . . . . . . . . : Tuesday, June 19, 2012 12:08:59 PM</em><br /><em>&nbsp;&nbsp; Default Gateway . . . . . . . . . : 192.168.10.254</em><br /><em>&nbsp;&nbsp; DHCP Server . . . . . . . . . . . : 192.168.10.254</em><br /><em>&nbsp;&nbsp; DHCPv6 IAID . . . . . . . . . . . : 399534053</em><br /><em>&nbsp;&nbsp; DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-5A-B2-7C-D0-67-E5-38-18-8C</em><br /><em>&nbsp;&nbsp; DNS Servers . . . . . . . . . . . : 192.168.10.254</em><br /><em>&nbsp;&nbsp; NetBIOS over Tcpip. . . . . . . . : Enabled</em></p>
<p></p>
<p><em>Ethernet adapter vEthernet (External WiFi):</em></p>
<p></p>
<p><em>&nbsp;&nbsp; Media State . . . . . . . . . . . : Media disconnected</em><br /><em>&nbsp;&nbsp; Connection-specific DNS Suffix&nbsp; . : gateway.2wire.net</em><br /><em>&nbsp;&nbsp; Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3</em><br /><em>&nbsp;&nbsp; Physical Address. . . . . . . . . : 00-24-D7-C8-20-34</em><br /><em>&nbsp;&nbsp; DHCP Enabled. . . . . . . . . . . : Yes</em><br /><em>&nbsp;&nbsp; Autoconfiguration Enabled . . . . : Yes</em></p>
<p></p>
<p><em>Ethernet adapter vEthernet (Internal LAN):</em></p>
<p></p>
<p><em>&nbsp;&nbsp; Connection-specific DNS Suffix&nbsp; . : VM.local</em><br /><em>&nbsp;&nbsp; Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4</em><br /><em>&nbsp;&nbsp; Physical Address. . . . . . . . . : 00-15-5D-01-4C-00</em><br /><em>&nbsp;&nbsp; DHCP Enabled. . . . . . . . . . . : Yes</em><br /><em>&nbsp;&nbsp; Autoconfiguration Enabled . . . . : Yes</em><br /><em>&nbsp;&nbsp; Link-local IPv6 Address . . . . . : fe80::2c1d:8047:d6a:f39b%21(Preferred) </em><br /><em>&nbsp;&nbsp; IPv4 Address. . . . . . . . . . . : 192.168.250.101(Preferred) </em><br /><em>&nbsp;&nbsp; Subnet Mask . . . . . . . . . . . : 255.255.255.0</em><br /><em>&nbsp;&nbsp; Lease Obtained. . . . . . . . . . : Monday, June 11, 2012 1:19:24 PM</em><br /><em>&nbsp;&nbsp; Lease Expires . . . . . . . . . . : Tuesday, June 19, 2012 1:19:23 PM</em><br /><em>&nbsp;&nbsp; Default Gateway . . . . . . . . . : </em><br /><em>&nbsp;&nbsp; DHCP Server . . . . . . . . . . . : 192.168.250.1</em><br /><em>&nbsp;&nbsp; DHCPv6 IAID . . . . . . . . . . . : 805311837</em><br /><em>&nbsp;&nbsp; DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-5A-B2-7C-D0-67-E5-38-18-8C</em><br /><em>&nbsp;&nbsp; DNS Servers . . . . . . . . . . . : 192.168.250.1</em><br /><em>&nbsp;&nbsp; NetBIOS over Tcpip. . . . . . . . : Enabled</em></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>As you can see, VM-DC (192.168.250.1) is definitely not on my External LAN NIC.&nbsp; So why is it still getting the initial DNS request?&nbsp; Next I went into the Network Adapters, hit ALT, looked at the binding settings and EUREKA:&nbsp; my Internal LAN NIC was listed before my External LAN NIC.&nbsp; A quick reorder to give my External LAN priority and solved the DNS latency problem.&nbsp; Now my host browses the internet as fast with and without my VM-DC booted.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/7506.Advanced%20Network%20Settings.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/7506.Advanced-Network-Settings.jpg"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/7506.Advanced%20Network%20Settings.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/7506.Advanced-Network-Settings.jpg" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>BEFORE:</p>
<p><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0167.NIC-Before.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0167.NIC_2D00_Before.jpg"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0167.NIC-Before.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0167.NIC_2D00_Before.jpg" border="0" /></a></p>
<p>&nbsp;</p>
<p>AFTER:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0537.NIC-After.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0537.NIC_2D00_After.jpg"><img alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0537.NIC-After.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0537.NIC_2D00_After.jpg" border="0" /></a></p>
<p><br />&nbsp;</p>
<p>I'm not sure what set my Internal NIC with higher priority than my External NIC, but if it happens to you, this'll help!</p>
<p>&nbsp;</p>
<p></p>
<p></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Database Attach breaks Alerts and the fix!</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/database-attach-breaks-alerts-and-the-fix</link>
      <pubDate>Tue, 03 Jan 2012 12:17:26 GMT</pubDate>
      <dc:creator><![CDATA[BigTallCampbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2012/01/03/database-attach-breaks-alerts-and-the-fix/</guid>
      <description><![CDATA[I got a query from a colleague about Alerts and went to test it.&nbsp; To my surprise, my test...]]></description>
      <content:encoded><![CDATA[<p>I got a query from a colleague about Alerts and went to test it.&nbsp; To my surprise, my test Alerts weren't working and after some troubleshooting I discovered it was due to my upgrade.</p>
<p>The fix is pretty quick - just download the txt file, rename to PS1 and call it with the WebApp url.&nbsp; It does little move than change the title of all alerts and changes it back.&nbsp; This triggers the alert to be rewritten and handled correctly in 2010.</p>
<p>&nbsp;</p>
<p>For my example, my 2007 DB was attached and upgraded to <a href="https://VM-SP2010A">https://VM-SP2010A</a>, so my call was:</p>
<p>&nbsp;</p>
<p>.\AlertFix.ps1 <a href="https://VM-SP2010A">https://VM-SP2010A</a></p>
<p>&nbsp;</p>
<p>HTH</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/9033/00/00/03/47/37/73/AlertFix.txt" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-9033-00-00-03-47-37-73/AlertFix.txt">AlertFix.txt</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Post June 2011 CU Move-SPProfileManagedMetadataProperty BUG - and the workaround</title>
      <link>https://docs.microsoft.com/archive/blogs/rycampbe/post-june-2011-cu-move-spprofilemanagedmetadataproperty-bug-and-the-workaround</link>
      <pubDate>Tue, 22 Nov 2011 08:38:00 GMT</pubDate>
      <dc:creator><![CDATA[BigTallCampbell]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/rycampbe/2011/11/22/post-june-2011-cu-move-spprofilemanagedmetadataproperty-bug-and-the-workaround/</guid>
      <description><![CDATA[If you're upgrading from SharePoint 2010 and following the post upgrade steps from Perform...]]></description>
      <content:encoded><![CDATA[<p>If you're upgrading from SharePoint 2010 and following the post upgrade steps from <strong><a title="Perform post-upgrade steps for a database attach upgrade (SharePoint Server 2010)" href="https://technet.microsoft.com/en-us/library/cc263286.aspx">Perform post-upgrade steps for a database attach upgrade (SharePoint Server 2010)</a></strong>, you'll need to upgrade your multi string values from your old 2007 SSP to 2010 MMS.&nbsp;</p>
<p>&nbsp;</p>
<p>Let's have a little background on why we have this. Here's a screenshot of the old values in the Responsibilities Field:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0167.Capture.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0167.Capture.JPG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0167.Capture.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0167.Capture.JPG" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>In previous 2007, I'd have to free text search for "SharePoint 2007" and again for "Migration" if I wanted to find this user.&nbsp; If I wanted to search for both, our results could get skewed as users could have those terms in different order.&nbsp; Is it possible?&nbsp; Yes.&nbsp; Is it easy?&nbsp; No.&nbsp; New with 2010 is the Managed Metadata service which eliminates this problem.&nbsp; With the individual fields set to metadata, we enable the search refiners in SharePoint 2010 and the order is no longer an issue.&nbsp; Is it simpler?&nbsp; Absolutely.</p>
<p>&nbsp;</p>
<p>While upgrading, there is a Powershell script to migrate the flat text field of the SSP 2007 to MMS in your new SharePoint 2010 environment called <em>Move-SPProfileManagedMetadataProperty</em>.&nbsp; Unfortunately, if you are post June CU, there's a bug where you'll get this error message:</p>
<p><strong>Move-SPProfileManagedMetadataProperty -ProfileServiceApplicationProxy&nbsp;&lt;GUID&gt; -Identity&nbsp;&lt;Name of Field&gt;&nbsp;-AvailableForTagging -TermSetName Responsibility</strong><br /><span style="color: #ff0000;"><em>Move-SPProfileManagedMetadataProperty : UPDATE failed because the following SET options have incorrect settings: 'QUOTED_IDENTIFIER'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.</em></span><br /><span style="color: #ff0000;">At line:1 char:38</span><br /><span style="color: #ff0000;">+ Move-SPProfileManagedMetadataProperty &lt;&lt;&lt;&lt;&nbsp; -ProfileServiceApplicationProxy 9</span><br /><span style="color: #ff0000;">1740c45-b8c2-4ade-85bb-344f2a4eca47 -Identity SPS-Responsibility -AvailableForT</span><br /><span style="color: #ff0000;">agging -TermSetName Responsibility</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp; + CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : InvalidData: (Microsoft.Offic...ProfileProperty:</span><br /><span style="color: #ff0000;">&nbsp;&nbsp; SPCmdletMigrate...ProfileProperty) [Move-SPProfileManagedMetadataProperty]</span><br /><span style="color: #ff0000;">&nbsp; , SqlException</span><br /><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp; + FullyQualifiedErrorId : Microsoft.Office.Server.UserProfiles.PowerShell.</span><br /><span style="color: #ff0000;">&nbsp;&nbsp; SPCmdletMigrateDataForOneTaxonomicProfileProperty</span></p>
<p><span style="color: #ff0000;"></span>&nbsp;</p>
<p><span style="color: #000000;">If you BING search, you'll find that the Quoted Identifier is used to isolate quotes (") and apostrophes (') and this flag helps protect against SQL Injection attacks in SharePoint.&nbsp; You'll also find (as stated here <a href="https://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/6fdb0ca3-5ac5-45ab-8663-af536e6dae24">https://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/6fdb0ca3-5ac5-45ab-8663-af536e6dae24)</a> that modifying the database works.&nbsp; THIS PUTS YOU IN AN UNSUPPORTED STATE AND SHOULD NOT BE DONE WITHOUT MICROSOFT SUPPORT APPROVING THE CHANGE.</span></p>
<p><span style="color: #000000;"></span>&nbsp;</p>
<p><span style="color: #000000;">"Ok Ryan, so what's the fix?"&nbsp; In short: we get around the <strong>Move-SPProfileManagedMetadataProperty </strong>bug by not using it!&nbsp; Enter the User Profile Replication Engine (from the SharePoint Administration Toolkit: <a href="https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=20022">https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=20022</a>).&nbsp; The User Profile Replication Engine (or UPRE) has a -DoUpgrade switch which migrates the 2007 strings to 2010 MMS.&nbsp; To make this work, you must have the old 2007 farm and new 2010 farm both online.&nbsp; My old 2007 MySite Host is <a href="https://vm-moss:10378/">https://vm-moss:10378/</a> and my new 2010 MySite Host is <a href="https://vm-sp2010:13965/">https://vm-sp2010:13965/</a></span></p>
<p><span style="color: #000000;"></span>&nbsp;</p>
<p><span style="color: #000000;">Here's the walkthrough (Note: my SharePoint 2010 environment is called VM-SP2010.&nbsp; My SharePoint 2007 environment is called VM-MOSS):</span></p>
<p><span style="color: #000000;"></span>&nbsp;</p>
<p><span style="color: #000000;">1) Install the SharePoint Administration Toolkit</span></p>
<p><span style="color: #000000;">2) Create an Managed Metadata Service (MMS) and User Profile Service (UPS) in the same proxy group (the same group is how the UPS knows which MMS to utilize)</span></p>
<p><span style="color: #000000;">3) Assign the proxy group to your 2010 MySite Host Web Application.&nbsp; You can see here that my Web App is "SharePoint 2007MySites - 13965" and I have the MMS and UPS assisgned</span></p>
<p><span style="color: #000000;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/4035.Capture.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/4035.Capture.JPG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/4035.Capture.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/4035.Capture.JPG" /></a></span></p>
<p><span style="color: #000000;"></span>&nbsp;</p>
<p><span style="color: #000000;">4) Make yourself an administrator and full control to the <strong>MMS and UPS</strong> at _admin/ServiceApplications.aspx </span></p>
<p><span style="color: #000000;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/4237.Capture.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/4237.Capture.JPG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/4237.Capture.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/4237.Capture.JPG" /></a></span></p>
<p><span style="color: #000000;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/4578.Capture.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/4578.Capture.JPG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/4578.Capture.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/4578.Capture.JPG" /></a></span></p>
<p></p>
<p>&nbsp;5) Start the UPRE and type in this Powershell command:</p>
<p><strong>get-spprofilepropertycollection -source&nbsp;&lt;2007 MySite Host URL&gt;&nbsp;| start-spprofileservicefullreplication -source &lt;2007 MySite Host URL&gt;&nbsp;-destination &lt;2010 MySite Host URL&gt;&nbsp; -MaxNumberOfThreads 3 -DoUpgrade</strong></p>
<p>So, for my environment, I used:</p>
<p><strong>get-spprofilepropertycollection -source <a href="https://vm-moss:10378/">https://vm-moss:10378/</a> | start-spprofileservicefullreplication -source <a href="https://vm-moss:10378/">https://vm-moss:10378/</a> -destination <a href="https://vm-sp2010:13965/">https://vm-sp2010:13965/</a>&nbsp; -MaxNumberOfThreads 3 -DoUpgrade</strong></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0876.Capture.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0876.Capture.JPG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/0876.Capture.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/0876.Capture.JPG" /></a></p>
<p>&nbsp;And hit enter.&nbsp; Wait for it to start enumerating profiles to insure you don't have any errors.&nbsp; A full replication takes quite a while (1000 users on my environment took about 5 minutes).</p>
<p>&nbsp;</p>
<p>6) Once complete, verify the multi-value property has been updated correctly by viewing a profile.&nbsp; In this case, we'll use Administrator.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/3443.Capture.JPG" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/3443.Capture.JPG"><img border="0" alt="" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/90/33/3443.Capture.JPG" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-90-33/3443.Capture.JPG" /></a></p>
<p>It works!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>And there you have it.&nbsp; If you have custom properties in 2007, you'll need to have the same custom properties in 2010.&nbsp; The easiest way to do this is backup and restore your SSP database to 2010, then use it as the name of your <strong>Profile DB </strong>when you create your UPS.&nbsp; That'll upgrade the DB to 2010 and bring your properties over.&nbsp; From there,run a full import with UPRE following the steps above.</p>
<p>&nbsp;</p>
<p>Problems with the UPRE need to be troubleshooted and then a recovery run.&nbsp; Check out <a href="https://technet.microsoft.com/en-us/library/cc663011.aspx">https://technet.microsoft.com/en-us/library/cc663011.aspx</a> for steps to do that.</p>
<p>&nbsp;</p>
<p>Hope this helps someone out there.&nbsp; Any problems, let me know!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>