<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">STO Support Team Blog - Test Blog</title><subtitle type="html">&amp;lt;meta name=&amp;quot;google-site-verification&amp;quot; content=&amp;quot;B9vE2PgOO0pn1wnf-nDLkEgmsseMb-iAOKx_3PFU2i0&amp;quot; /&amp;gt; </subtitle><id>http://blogs.msdn.com/b/msdnsto_sup/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/msdnsto_sup/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2012-12-31T03:09:00Z</updated><entry><title>txt file</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/04/17/10411982.aspx" /><link rel="enclosure" type="text/plain" length="743" href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-41-19-82/test.txt" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/04/17/10411982.aspx</id><published>2013-04-17T18:25:53Z</published><updated>2013-04-17T18:25:53Z</updated><content type="html">&lt;p&gt;txt file&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10411982" width="1" height="1"&gt;</content><author><name>Jundan Wu</name><uri>http://blogs.msdn.com/jundanwu_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>test comment on post</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/04/16/10411639.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/04/16/10411639.aspx</id><published>2013-04-16T22:03:59Z</published><updated>2013-04-16T22:03:59Z</updated><content type="html">&lt;p&gt;test comment on post&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10411639" width="1" height="1"&gt;</content><author><name>Jundan Wu</name><uri>http://blogs.msdn.com/jundanwu_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Test for blog notification via mails</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/04/11/10410484.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/04/11/10410484.aspx</id><published>2013-04-12T01:44:04Z</published><updated>2013-04-12T01:44:04Z</updated><content type="html">&lt;p&gt;if we're able to get 4 duplicate notification mails.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10410484" width="1" height="1"&gt;</content><author><name>Pan Zhang</name><uri>http://blogs.msdn.com/ven.zhang_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="notification" scheme="http://blogs.msdn.com/b/msdnsto_sup/archive/tags/notification/" /></entry><entry><title>test test test</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/03/06/10400116.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/03/06/10400116.aspx</id><published>2013-03-07T03:08:00Z</published><updated>2013-03-07T03:08:00Z</updated><content type="html">&lt;p&gt;this is a test. this is a test&lt;/p&gt;  &lt;p&gt;edit the blog via WLW to see if it affects the comment&lt;/p&gt;  &lt;p&gt;edit&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10400116" width="1" height="1"&gt;</content><author><name>Yubo. Zhang</name><uri>http://blogs.msdn.com/amyybzhang_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>drafted by Robin1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/02/11/10392671.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/02/11/10392671.aspx</id><published>2013-02-11T16:30:00Z</published><updated>2013-02-11T16:30:00Z</updated><content type="html">&lt;p&gt;drafted by Robin1&lt;/p&gt;
&lt;p&gt;Posted by Dubai&lt;/p&gt;
&lt;p&gt;edit to test&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10392671" width="1" height="1"&gt;</content><author><name>Robin_Ren</name><uri>http://blogs.msdn.com/robinrd91_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>test</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/15/10385236.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/15/10385236.aspx</id><published>2013-01-15T19:45:59Z</published><updated>2013-01-15T19:45:59Z</updated><content type="html">&lt;p&gt;tag test&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10385236" width="1" height="1"&gt;</content><author><name>Jundan Wu</name><uri>http://blogs.msdn.com/jundanwu_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author><category term="3 edit" scheme="http://blogs.msdn.com/b/msdnsto_sup/archive/tags/3+edit/" /></entry><entry><title>test for profile activity</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/14/10384729.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/14/10384729.aspx</id><published>2013-01-14T14:00:24Z</published><updated>2013-01-14T14:00:24Z</updated><content type="html">&lt;p&gt;test for profile activity&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10384729" width="1" height="1"&gt;</content><author><name>Yubo. Zhang</name><uri>http://blogs.msdn.com/amyybzhang_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>test post for deformed frame</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/09/10383594.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/09/10383594.aspx</id><published>2013-01-09T20:17:04Z</published><updated>2013-01-09T20:17:04Z</updated><content type="html">&lt;p&gt;&lt;span style="color: black;"&gt;Hello again ADAMSyncers! &lt;a href="http://blogs.msdn.com/b/askds/archive/tags/kim+nichols/"&gt;Kim Nichols&lt;/a&gt; here again with what promises to be a fun and exciting mystery solving adventure on the joys of ADAMSync and AD Recycle Bin (ADRB) for AD LDS. The goal of this post is two-fold: &lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Explain AD Recycle Bin for AD LDS and how to enable it &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Highlight an issue that you may experience if you enable AD Recycle Bin for AD LDS and use ADAMSync &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;I'll start with some background on AD Recycle Bin for AD LDS and then go through a recent mind-boggling scenario from beginning to end to explain why you may not want (or need) to enable AD Recycle Bin if you are planning on using ADAMSync. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Hold on to your hats! &lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;AD Recycle Bin for ADLDS&lt;/h1&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;If you're not familiar with AD Recycle Bin and what it can do for you, check out &lt;a href="http://blogs.msdn.com/b/askds/archive/tags/ned+pyle/"&gt;Ned's&lt;/a&gt; prior blog posts or the content available on TechNet. &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/askds/archive/2009/07/24/active-directory-recycle-bin-in-windows-server-2008-r2.aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Active Directory Recycle Bin in Windows Server 2008 R2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.msdn.com/b/askds/archive/2009/08/27/the-ad-recycle-bin-understanding-implementing-best-practices-and-troubleshooting.aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;The AD Recycle Bin: Understanding, Implementing, Best Practices, and Troubleshooting&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd392261.aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Active Directory Recycle Bin Step-by-Step Guide&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://technet.microsoft.com/en-us/library/jj574144.aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Advanced AD DS Management Using Active Directory Administrative Center (Level 200)&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="color: black;"&gt;Lots of new features in Windows Server 2012 AD Administrative Center in regard to AD Recycle Bin &lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;The short version is that AD Recycle Bin is a feature added in Windows Server 2008 R2 that allows Administrators to recover deleted objects without restoring System State backups and performing &lt;a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;840001"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;authoritative restores&lt;/span&gt;&lt;/a&gt; of those objects.&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;Requirements for AD Recycle Bin&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;To enable AD Recycle Bin (ADRB) for AD DS your forest needs to meet some basic requirements: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc733027(WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Have extended your schema to Windows Server 2008 R2.&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Have only Windows Server 2008 R2 DC's in your forest. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue;"&gt;&lt;span style="text-decoration: underline;"&gt;Raise your domain(s) functional level to Windows Server 2008 R2.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: blue;"&gt;&lt;span style="text-decoration: underline;"&gt;Raise your forest's functional level to Windows Server 2008 R2.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;What you may not be aware of is that AD LDS has this feature as well. The &lt;a href="http://technet.microsoft.com/en-us/library/dd379484(v=WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;requirements&lt;/span&gt;&lt;/a&gt; for implementing ADRB in AD LDS are the same as AD DS although they are not as intuitive for AD LDS instances. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Schema must be Windows Server 2008 R2&lt;/h2&gt;
&lt;p style="margin-left: 27pt;"&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;If your AD LDS instance was originally built as an ADAM instance, then you may or may not have extended the schema of your instance to Windows Server 2008 R2. If not, upgrading the schema is a necessary first step in order to support ADRB functionality. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;To update your AD LDS schema to Windows Server 2008 R2, run the following command from your ADAM installation directory on your AD LDS server: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin-left: 27pt;"&gt;&lt;span style="color: black; font-family: Consolas;"&gt;Ldifde.exe &amp;ndash;i &amp;ndash;f MS-ADAM-Upgrade-2.ldf &amp;ndash;s server:port &amp;ndash;b username domain password &amp;ndash;j . -$ adamschema.cat &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;You'll also want to update your configuration partition: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin-left: 27pt;"&gt;&lt;span style="color: black; font-family: Consolas;"&gt;ldifde &amp;ndash;i &amp;ndash;f ms-ADAM-Upgrade-1.ldf &amp;ndash;s server:portnumber &amp;ndash;b username domain password &amp;ndash;k &amp;ndash;j . &amp;ndash;c "CN=Configuration,DC=X" #configurationNamingContext &lt;/span&gt;&lt;/p&gt;
&lt;p style="margin-left: 27pt;"&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Information on these commands can be found on TechNet: &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc732566(v=WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Appendix B: Upgrading from ADAM to AD LDS&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd379484(v=WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Requirements for Active Directory Recycle Bin&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p style="margin-left: 27pt;"&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Decommission any Windows Server 2003 ADAM servers in the Replica set&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;In an AD DS environment, ADRB requires that all domain controllers in the forest be running Windows Server 2008 R2. Translating this to an AD LDS scenario, all servers in your replica set must be running Windows Server 2008 R2. So, if you've been hanging on to those Windows Server 2003 ADAM servers for some reason, now is the time to decommission them. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/askds/archive/tags/lanae+wade/"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;LaNae&lt;/span&gt;&lt;/a&gt;&lt;span style="color: black;"&gt;'s blog "&lt;a href="http://blogs.msdn.com/b/askds/archive/2009/10/27/how-to-decommission-an-adam-adlds-server-and-add-additional-servers.aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;How to Decommission an ADAM/ADLDS server and Add Additional Servers&lt;/span&gt;&lt;/a&gt;&lt;span style="color: blue;"&gt;&lt;span style="text-decoration: underline;"&gt;"&lt;/span&gt;&lt;span style="color: black;"&gt; explains the process for removing a replica member. The process is pretty straightforward and just involves uninstalling the instance, but you will want to check FSMO role ownership, overall instance health, and application configurations before blindly uninstalling. Now is not the time to discover applications have been hard-coded to point to your Windows Server 2003 server or that you've been unknowingly been having replication issues. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Raise the functional level of the instance&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;In AD DS, raising the domain and forest functional levels is easy; there's a UI -- AD Domains and Trusts. AD LDS doesn't have this snap-in, though, so it is a little more complicated. There's a good KB article (&lt;a href="http://support.microsoft.com/kb/322692"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;322692&lt;/span&gt;&lt;/a&gt;) that details the process of raising the functional levels of AD and gives us insight into what we need to do raise our AD LDS functional level since we can't use the AD Domains and Trusts MMC. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;AD LDS only has the concept of forest functional levels. There is no domain functional level in AD LDS. The forest functional level is controlled by the &lt;strong&gt;msDS-Behavior-Version&lt;/strong&gt; attribute on the CN=Partitions object in the Configuration naming context of your AD LDS instance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/1184.010913_5F00_1559_5F00_ADAMSyncAD1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Simply changing the value of &lt;strong&gt;msDS-Behavior-Version&lt;/strong&gt; from 2 to 4 will update the functional level of your instance from Windows Server 2003 to Windows Server 2008 R2. Alternatively, you can use Windows PowerShell to upgrade the functional level of your AD LDS instance. For AD DS, there is a dedicated Windows PowerShell cmdlet for raising the forest functional level called &lt;span style="font-family: Courier New;"&gt;Set-ADForestMode&lt;/span&gt;, but this &lt;/span&gt;cmdlet is &lt;a href="http://technet.microsoft.com/en-us/library/ee617220.aspx"&gt;not supported&lt;/a&gt; for&lt;span style="color: black;"&gt; AD LDS. To use Windows PowerShell to raise the functional level for AD LDS, you will need to use the &lt;span style="font-family: Courier New;"&gt;Set-ADObject&lt;/span&gt; cmdlet to specify the new value for the &lt;strong&gt;msDS-Behavior-Version&lt;/strong&gt; attribute. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;To raise the AD LDS functional level using Windows PowerShell, run the following command (after loading the AD module): &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin-left: 27pt;"&gt;&lt;span style="color: black; font-family: Consolas;"&gt;Set-ADObject -Identity &amp;lt;path to Partitions container in Configuration Partition of instance&amp;gt; -Replace @{'msds-Behavior-Version'=4} -Server &amp;lt;server:port&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;For example in my environment, I ran: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin-left: 27pt;"&gt;&lt;span style="color: black; font-family: Consolas;"&gt;Set-ADObject -Identity 'CN=Partitions,CN=Configuration,CN={A1D2D2A9-7521-4068-9ACC-887EDEE90F91}' -Replace @{'msDS-Behavior-Version'=4} -Server 'localhost:50000' &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/0027.010913_5F00_1559_5F00_ADAMSyncAD2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;As always, before making changes to your production environment: &lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Test in a TEST or DEV environment &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Have good back-ups &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Verify the general health of the environment (check replication, server health, etc) &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Now we're ready to enable AD Recycle Bin! &lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;Enabling AD Recycle Bin for AD LDS&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;For Windows Server 2008 R2, the process for enabling &lt;a href="http://technet.microsoft.com/en-us/library/dd379481(WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;ADRB in AD LDS&lt;/span&gt;&lt;/a&gt; is nearly identical to that for AD DS. Either Windows PowerShell or LDP can be used to enable the feature. Also, there is no UI for enabling ADRB for AD LDS in Windows Server 2008 R2 or Windows Server 2012. Windows Server 2012 does add the ability to enable ADRB and restore objects through the AD Administrative Center for AD DS (you can read about it &lt;a href="http://technet.microsoft.com/en-us/library/hh831702.aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;here&lt;/span&gt;&lt;/a&gt;), but this UI does not work for AD LDS instances on Windows Server 2012. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;&lt;strong&gt;Once the feature is enabled, it cannot be disabled. So, before you continue, be certain you really want to do this. (Read this whole post to help you decide.)&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;The ADRB can be enabled in both AD DS and AD LDS using a PowerShell cmdlet, but the syntax is slightly different between the two. The difference is fully documented in &lt;a href="http://technet.microsoft.com/en-us/library/dd379481(WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;TechNet&lt;/span&gt;&lt;/a&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;In my lab, I used the PowerShell cmdlet to enable the feature rather than using LDP. Below is the syntax for AD LDS: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p style="margin-left: 27pt;"&gt;&lt;span style="color: black; font-family: Consolas;"&gt;Enable-ADOptionalFeature 'recycle bin feature' -Scope ForestOrConfigurationSet -Server &amp;lt;server:port&amp;gt; -Target &amp;lt;DN of configuration partition&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Here's the actual cmdlet I used and a screenshot of the output. The cmdlet asks you confirm that you want to enable the feature since this is an &lt;strong&gt;irreversible process&lt;/strong&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/6864.010913_5F00_1559_5F00_ADAMSyncAD3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;You can verify that the command worked by checking the &lt;strong&gt;msDS-EnabledFeature&lt;/strong&gt; attribute on the Partitions container of the Configuration NC of your instance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/8037.010913_5F00_1559_5F00_ADAMSyncAD4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Seemed like a good idea at the time. . .&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Now, on to what prompted this post in the first place. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Once ADRB is enabled, there is a change to how deleted objects are handled when they are removed from the directory. Prior to enabling ADRB when an object is deleted, it is moved to the Deleted Objects container within the application partition of your instance (CN=Deleted Objects, DC=instance1, DC=local or whatever the name of your instance is) and most of the attributes are deleted. Without Recycle Bin enabled, a user object in the Deleted Object container looks like this in LDP: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/4237.010913_5F00_1559_5F00_ADAMSyncAD5.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;After enabling ADRB, a deleted user object looks like this in LDP: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/7455.010913_5F00_1559_5F00_ADAMSyncAD6.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Notice that after enabling ADRB, &lt;strong&gt;givenName&lt;/strong&gt;, &lt;strong&gt;displayName&lt;/strong&gt;, and several other attributes including &lt;strong&gt;userPrincipalName&lt;/strong&gt; (UPN) are maintained on the object while in the Deleted Objects container. This is great if you ever need to restore this user: most of the data is retained and it's a pretty simple process &lt;a href="http://technet.microsoft.com/en-us/library/dd379509(WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;using LDP&lt;/span&gt;&lt;/a&gt; or &lt;a href="http://technet.microsoft.com/en-us/library/dd379509(WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;PowerShell&lt;/span&gt;&lt;/a&gt; to reanimate the object without the need to go through the authoritative restore process. But, retaining the UPN attribute specifically can cause issues if ADAMSync is being used to synchronize objects from AD DS to AD LDS since the &lt;strong&gt;userPrincipalName&lt;/strong&gt; attribute must be unique within an AD LDS instance. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;In general, the recommendation when using ADAMSync, is to perform all user management (additions/deletions) on the AD DS side of the sync and let the synchronization process handle the edits in AD LDS. There are times, though, when you may need to remove users in AD LDS in order to resolve synchronization issues and this is where having ADRB enabled will cause problems. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;For example: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Let's say that you discover that you have two users with the same &lt;strong&gt;userPrincipalName&lt;/strong&gt; in AD and this is causing issues with ADAMSync: the infamous ATT_OR_VALUE_EXISTS error in the ADAMSync log. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-family: Courier New;"&gt;==================================================== &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-family: Courier New;"&gt;Processing Entry: Page 67, Frame 1, Entry 64, Count 1, USN 0 Processing source entry &amp;lt;guid=fe36238b9dd27a45b96304ea820c82d8&amp;gt; Processing in-scope entry fe36238b9dd27a45b96304ea820c82d8. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-family: Courier New;"&gt;Adding target object CN=BillyJoeBob,OU=User Accounts,dc=fabrikam,dc=com. Adding attributes: sourceobjectguid, objectClass, sn, description, givenName, instanceType, displayName, department, sAMAccountName, userPrincipalName, Ldap error occurred. ldap_add_sW: Attribute Or Value Exists. Extended Info: 0000217B: AtrErr: DSID-03050758, #1: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-family: Courier New;"&gt;0: 0000217B: DSID-03050758, problem 1006 (&lt;span style="background-color: yellow;"&gt;ATT_OR_VALUE_EXISTS&lt;/span&gt;), data 0, Att 90290 (&lt;span style="background-color: yellow;"&gt;userPrincipalName&lt;/span&gt;) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-family: Courier New;"&gt;. Ldap error occurred. ldap_add_sW: Attribute Or Value Exists. Extended Info: 0000217B: AtrErr: DSID-03050758, #1: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-family: Courier New;"&gt;0: 0000217B: DSID-03050758, problem 1006 (ATT_OR_VALUE_EXISTS), data 0, Att 90290 (userPrincipalName) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-family: Courier New;"&gt;=============================================== &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Upon further inspection of the users, you determine that at some point a copy was made of the user's account in AD and the UPN was not updated. The old account is not needed anymore but was never cleaned up either. To get your ADAMSync working, you: &lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Delete the user account that synced to AD LDS. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Delete the extra account in AD (or update the UPN on one of the accounts). &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Try to sync again &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;BWAMP! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;The sync still fails with the ATT_OR_VALUE_EXISTS error on the same user. This doesn't make sense, right? You deleted the extra user in AD and cleaned up AD LDS by deleting the user account there. There should be no duplicates. The ATT_OR_VALUE_EXISTS error is not an ADAMSync error. ADAMSync is making LDAP calls to the AD LDS instance to create or modify objects. This error is an LDAP error from the AD LDS instance and is telling you already have an object in the directory with that same &lt;strong&gt;userPrincipalName&lt;/strong&gt;. For what it's worth, I've never seen this error logged if the duplicate isn't there. It is there; you just have to find it! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;At this point, it's not hard to guess where the duplicate is coming from, since we've already discussed ADRB and the attributes maintained on deletion. The duplicate &lt;strong&gt;userPrincipalName&lt;/strong&gt; is coming from the object we deleted from the AD LDS instance and is located in the Deleted Objects container. The good news is that LDP allows you to browse the container to find the deleted object. If you've never used LDP before to look through the Deleted Objects container, TechNet provides information on how to &lt;a href="http://technet.microsoft.com/en-us/library/dd379509(WS.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;browse for deleted objects via LDP&lt;/span&gt;&lt;/a&gt;. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;It's great that we know why we are having the problem, but how do we fix it? Now that we're already in this situation, the only way to fix it is to eliminate the duplicate UPN from the object in CN=Deleted Objects. To do this: &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/dd379509(v=ws.10).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Restore the deleted object&lt;/span&gt;&lt;/a&gt;&lt;span style="color: black;"&gt; in AD LDS using LDP or PowerShell &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;After the object is restored, modify the UPN to something bogus that will never be used on a real user &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Delete the object again &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Run ADAMSync again &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Now your sync should complete successfully! &lt;/span&gt;&lt;/p&gt;
&lt;h1&gt;Not so fast, you say . . .&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;So, I was feeling pretty good about myself on this case. I spent hours figuring out ADRB for AD LDS and setting up the repro in my lab and proving that deleting objects with ADRB enabled could cause ATT_OR_VALUE_EXISTS errors during ADAMSync. I was already patting myself on the back and starting my victory lap when I got an email back from my customer stating the &lt;strong&gt;msDS-BehaviorVersion&lt;/strong&gt; attribute on their AD LDS instance was still set to 2. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Huh?! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;I'll admit it, I was totally confused. How could this be? I had LDP output from the customer's AD LDS instance and could see that the &lt;strong&gt;userPrincipalName&lt;/strong&gt; attribute was being maintained on objects in the Deleted Objects container. I knew from my lab that this is not normal behavior when ADRB is disabled. So, what the heck is going on? &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;I know when I'm beat, so decided to use one of my "life lines" . . . I emailed &lt;a href="http://social.technet.microsoft.com/Search/en-US?query=%22linda%20taylor%22&amp;amp;beta=0&amp;amp;rn=Ask+the+Directory+Services+Team&amp;amp;rq=site:blogs.technet.com/b/askds/&amp;amp;ac=8"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Linda Taylor&lt;/span&gt;&lt;/a&gt;. Linda is an Escalation Engineer in the UK Directory Services team and has been working with ADAM and AD LDS much longer than I have. This is where I should include a picture of Linda in a cape because she came to the rescue again! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Apparently, there is more than one way for an attribute to be maintained on deletion. The most obvious was that ADRB had been enabled. The less obvious requires a better understanding of what actually happens when an object is deleted. &lt;a href="http://msdn.microsoft.com/en-us/library/dd340097(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;Transformation into a Tombstone&lt;/span&gt;&lt;/a&gt; documents this process in more detail. The part that is important to us is: &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Segoe UI; font-size: 10pt;"&gt;All attribute values are removed from the object, with the following exceptions:&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc220993(v=prot.20).aspx"&gt;&lt;span style="color: blue; font-family: Segoe UI; font-size: 10pt; text-decoration: underline;"&gt;nTSecurityDescriptor&lt;/span&gt;&lt;/a&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Segoe UI; font-size: 10pt;"&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220120(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;attributeID&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220122(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;attributeSyntax&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219845(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;dNReferenceUpdate&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219848(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;dNSHostName&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219902(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;flatName&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219949(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;governsID&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219962(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;groupType&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219986(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;instanceType&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220057(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;lDAPDisplayName&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220061(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;legacyExchangeDN&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220639(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;mS-DS-CreatorSID&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220443(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;mSMQOwnerID&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220926(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;nCName&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc221012(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;objectClass&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219839(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;distinguishedName&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc221017(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;objectGUID&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc221018(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;objectSid&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc221022(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;oMSyntax&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220776(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;proxiedObjectName&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220701(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;name&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220804(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;replPropertyMetaData&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220838(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;sAMAccountName&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220854(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;securityIdentifier&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220887(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;sIDHistory&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220904(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;subClassOf&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220919(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;systemFlags&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220953(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;trustPartner&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220951(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;trustDirection&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220955(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;trustType&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220947(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;trustAttributes&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220972(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;userAccountControl&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220985(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;uSNChanged&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc220986(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;uSNCreated&lt;/span&gt;&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/cc221005(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;whenCreated&lt;/span&gt;&lt;/a&gt; attribute values are retained.&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Segoe UI; font-size: 10pt;"&gt;In AD LDS, the &lt;a href="http://msdn.microsoft.com/en-us/library/cc221203(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;msDS-PortLDAP&lt;/span&gt;&lt;/a&gt; attribute is also retained.&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Segoe UI; font-size: 10pt;"&gt;The attribute that equals the &lt;a href="http://msdn.microsoft.com/en-us/library/cc228401(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;rdnType&lt;/span&gt;&lt;/a&gt; of the object (for example, &lt;a href="http://msdn.microsoft.com/en-us/library/cc219764(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;cn&lt;/span&gt;&lt;/a&gt; for a &lt;a href="http://msdn.microsoft.com/en-us/library/cc221822(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;user&lt;/span&gt;&lt;/a&gt; object) is retained.&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;&lt;span style="font-family: Segoe UI; font-size: 10pt; background-color: yellow;"&gt;Any attribute that has fPRESERVEONDELETE flag set in its &lt;a href="http://msdn.microsoft.com/en-us/library/cc220851(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;searchFlags&lt;/span&gt;&lt;/a&gt; is retained, except &lt;a href="http://msdn.microsoft.com/en-us/library/cc221011(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;objectCategory&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/cc220839(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;sAMAccountType&lt;/span&gt;&lt;/a&gt;, which are always removed, regardless of the value of their &lt;a href="http://msdn.microsoft.com/en-us/library/cc220851(v=prot.20).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;searchFlags&lt;/span&gt;&lt;/a&gt;.&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;The Schema Management snap-in doesn't allow us to see attributes on attributes, so to verify the value of &lt;strong&gt;searchFlags&lt;/strong&gt; on the &lt;strong&gt;userPrincipalName&lt;/strong&gt; attribute we need to ADSIEdit or LDP. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;&lt;strong&gt;WARNING: Modifying the schema can have unintended consequences. Please be certain you really need to do this before proceeding and always test first!&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;By default, the &lt;strong&gt;searchFlags&lt;/strong&gt; attribute on &lt;strong&gt;userPrincipalName&lt;/strong&gt; should be set to 0x1 (INDEX). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/6886.010913_5F00_1559_5F00_ADAMSyncAD7.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;My customer's &lt;strong&gt;searchFlags&lt;/strong&gt; attribute was set to 0x1F (31 decimal) = (INDEX |CONTAINER_INDEX |ANR |&lt;span style="background-color: yellow;"&gt;PRESERVE_ON_DELETE&lt;/span&gt; |COPY). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/5710.010913_5F00_1559_5F00_ADAMSyncAD8.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Apparently these changes to the schema had been made to improve query efficiency when searching on the &lt;strong&gt;userPrincipalName&lt;/strong&gt; attribute. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;&lt;strong&gt;Reminder: Manually modifying the schema in this way is not something you should doing unless are certain you know what you are doing or have been directed to by Microsoft Support. &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;The &lt;strong&gt;searchFlags&lt;/strong&gt; attribute is a bitwise attribute containing a number of different options which are outlined &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms679765(v=vs.85).aspx"&gt;&lt;span style="color: blue; text-decoration: underline;"&gt;here&lt;/span&gt;&lt;/a&gt;. This attribute can be zero or a combination of one or more of the following values: &lt;/span&gt;&lt;/p&gt;
&lt;div style="margin-left: 24pt;"&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 119px;" /&gt;&lt;col style="width: 481px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;1 (0x00000001)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;Create an index for the attribute.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;2 (0x00000002)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;Create an index for the attribute in each container.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;4 (0x00000004)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;Add this attribute to the Ambiguous Name Resolution (ANR) set. This is used to assist in finding an object when only partial information is given. For example, if the LDAP filter is (ANR=JEFF), the search will find each object where the first name, last name, email address, or other ANR attribute is equal to JEFF. Bit 0 must be set for this index take affect.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;&lt;span style="background-color: yellow;"&gt;8 (0x00000008)&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;&lt;span style="background-color: yellow;"&gt;Preserve this attribute in the tombstone object for deleted objects.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;16 (0x00000010)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;Copy the value for this attribute when the object is copied.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;32 (0x00000020)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;Supported beginning with Windows Server 2003. Create a tuple index for the attribute. This will improve searches where the wildcard appears at the front of the search string. For example, (sn=*mith).&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;64(0x00000040)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding: 3px 4px; border: currentColor;"&gt;
&lt;p&gt;Supported beginning with ADAM. Creates an index to greatly help VLV performance on arbitrary attributes.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;To remove the PRESERVE_ON_DELETE flag, we subtracted 8 from customer's value of 31, which gave us a value of 23 (INDEX | CONTAINER | ANR | COPY).&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Once we removed the PRESERVE_ON_DELETE flag, we created and deleted a test account to confirm our modifications changed the tombstone behavior of the &lt;strong&gt;userPrincipalName&lt;/strong&gt; attribute. UPN was no longer maintained! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;Mystery solved!! I think we all deserve a Scooby Snack now! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/1581.010913_5F00_1559_5F00_ADAMSyncAD9.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black; font-size: 8pt;"&gt;Nom nom nom! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Lessons learned&lt;/h1&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;ADRB is a great feature for AD. It can even be useful for AD LDS if you aren't synchronizing with AD. If you are synchronizing with AD, then the benefits of ADRB are limited and in the end it can cause you more problems than it solves. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;Manually modifying the schema can have unintended consequences. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;PowerShell for AD LDS is not as easy as AD &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;AD Administrative Center is for AD and not AD LDS &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="color: black;"&gt;LDP Rocks! &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;This wraps up the "More than you really ever wanted to know about ADAMSync, ADRB &amp;amp; searchFlags" Scooby Doo edition of AskDS. Now, go enjoy your Scooby Snacks! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt; &lt;br /&gt;- Kim "That Meddling Kid" Nichols &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: black;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10383594" width="1" height="1"&gt;</content><author><name>Robin_Ren</name><uri>http://blogs.msdn.com/robinrd91_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Test for video</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/03/10382043.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2013/01/03/10382043.aspx</id><published>2013-01-03T12:34:05Z</published><updated>2013-01-03T12:34:05Z</updated><content type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10382043" width="1" height="1"&gt;</content><author><name>Wang Huang</name><uri>http://blogs.msdn.com/a874785_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Test for publication time</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/msdnsto_sup/archive/2012/12/31/10378983.aspx" /><id>http://blogs.msdn.com/b/msdnsto_sup/archive/2012/12/31/10378983.aspx</id><published>2012-12-31T11:09:00Z</published><updated>2012-12-31T11:09:00Z</updated><content type="html">&lt;p&gt;test test&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10378983" width="1" height="1"&gt;</content><author><name>Yubo. Zhang</name><uri>http://blogs.msdn.com/amyybzhang_4000_hotmail.com/ProfileUrlRedirect.ashx</uri></author></entry></feed>