<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Ask the Directory Services Team</title><link>http://blogs.technet.com/b/askds/</link><description>Microsoft&amp;#39;s official AD support blog</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Back to the Loopback: Troubleshooting Group Policy loopback processing, Part 2</title><link>http://blogs.technet.com/b/askds/archive/2013/05/21/back-to-the-loopback-troubleshooting-group-policy-loopback-processing-part-2.aspx</link><pubDate>Tue, 21 May 2013 22:11:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3574006</guid><dc:creator>David Beach - MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3574006</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3574006</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/05/21/back-to-the-loopback-troubleshooting-group-policy-loopback-processing-part-2.aspx#comments</comments><description>&lt;p&gt;Welcome back!&amp;nbsp; &lt;a href="http://blogs.technet.com/b/askds/archive/tags/kim+nichols/"&gt;Kim Nichols&lt;/a&gt; here once again with the much anticipated Part 2 to &lt;a href="http://blogs.technet.com/b/askds/archive/2013/02/08/circle-back-to-loopback.aspx"&gt;Circle Back to Loopback&lt;/a&gt;.&amp;nbsp; Thanks for all the comments and feedback on Part 1.&amp;nbsp; For those of you joining us a little late in the game, you'll want to check out &lt;a href="http://blogs.technet.com/b/askds/archive/2013/02/08/circle-back-to-loopback.aspx"&gt;Part 1: Circle Back to Loopback&lt;/a&gt; before reading further.&lt;/p&gt;
&lt;p&gt;In my first post, the goal was to keep it simple.&amp;nbsp; Now, we're going to go into a little more detail to help you identify and troubleshoot Group Policy issues related to loopback processing.&amp;nbsp; If you follow these steps, you should be able to apply what you've learned to any loopback scenario that you may run into (assuming that the environment is healthy and there are no other policy infrastructure issues).&lt;/p&gt;
&lt;p&gt;To troubleshoot loopback processing you need to know and understand:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The status of the loopback configuration.&amp;nbsp; Is it enabled, and if so, in which mode?&lt;/li&gt;
&lt;li&gt;The desired state configuration vs. the actual state configuration of applied policy&lt;/li&gt;
&lt;li&gt;Which settings from which GPOs are "supposed" to be applied?&lt;/li&gt;
&lt;li&gt;To whom should the settings apply or not apply?&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;The security filtering requirements when using loopback&lt;/li&gt;
&lt;li&gt;Is the loopback setting configured in the same GPO or a separate GPO from the user settings?&lt;/li&gt;
&lt;li&gt;Are the user settings configured in a GPO with computer settings?&lt;/li&gt;
&lt;/ol&gt;&lt;/ol&gt;
&lt;h2&gt;What you need to know:&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Know if loopback is enabled and in which mode&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The first step in troubleshooting loopback is to know that it is enabled.&amp;nbsp; It seems pretty obvious, I know, but often loopback is enabled by one administrator in one GPO without understanding that the setting will impact all computers that apply the GPO.&amp;nbsp; This gets back to &lt;a href="http://blogs.technet.com/b/askds/archive/2013/02/08/circle-back-to-loopback.aspx?CommentPosted=true&amp;amp;PageIndex=2#comments"&gt;Part 1&lt;/a&gt; of this blog . . . loopback processing is a &lt;span style="text-decoration: underline;"&gt;&lt;em&gt;computer&lt;/em&gt;&lt;/span&gt; configuration setting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Take a deep cleansing breath and say it again . . . Loopback processing is a &lt;em&gt;&lt;span style="text-decoration: underline;"&gt;computer&lt;/span&gt;&lt;/em&gt; configuration setting.&amp;nbsp; :-)&lt;/p&gt;
&lt;p&gt;Everyone feels better now, right?&amp;nbsp; The loopback setting configures a registry value on the computer to which it applies.&amp;nbsp; The Group Policy engine reads this value and changes how it builds the list of applicable user policies based on the selected loopback mode.&lt;/p&gt;
&lt;p&gt;The easiest way to know if loopback might be causing troubles with your policy processing is to collect a &lt;strong&gt;GPResult /h&lt;/strong&gt; from the computer. &amp;nbsp;&lt;strong&gt;Since loopback is a computer configuration setting, you will need to run GPResult from an administrative command prompt.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/0116.loopbackp1.jpg"&gt;&lt;img style="margin-right: auto; margin-left: auto; display: block;" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/0116.loopbackp1.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The good news is that the &lt;strong&gt;GPResult &lt;/strong&gt;output will show you the winning GPO with loopback enabled.&amp;nbsp; Unfortunately, it does not list all GPOs with loopback configured, just the one with the highest precedence.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If your OU structure separates users from computers, the &lt;strong&gt;GPResult &lt;/strong&gt;output can also help you find GPOs containing user settings that are linked to computer OUs.&amp;nbsp; Look for GPOs linked to computer OUs under the &lt;strong&gt;Applied GPOs &lt;/strong&gt;section of the &lt;strong&gt;User Details&lt;/strong&gt; of the &lt;strong&gt;GPResult &lt;/strong&gt;output.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Below is an example of the output of the &lt;strong&gt;GPResult /h &lt;/strong&gt;command from a Windows Server 2012 member server.&amp;nbsp; The layout of the report has changed slightly going from Windows Server 2008 to Windows Server 2012, so your results may look different, but the same information is provided by previous versions of the tool.&amp;nbsp; Notice that the link location includes the Computers OU, but we are in the User Details section of the report.&amp;nbsp; This is a good indication that we have loopback enabled in a GPO linked in the path of the computer account.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/4101.loopbackp2.jpg"&gt;&lt;img style="margin-right: auto; margin-left: auto; display: block;" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/4101.loopbackp2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;Understand the desired state vs. the actual state&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This one also sounds obvious, but in order to troubleshoot you have to know and understand exactly which settings you are expecting to apply to the user.&amp;nbsp; This is harder than it sounds.&amp;nbsp; In a lab environment where you control everything, it's pretty easy to keep track of desired configuration.&amp;nbsp; However, in a production environment with potentially multiple delegated GPO admins, this is much more difficult.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GPResult&lt;/strong&gt; gives us the actual state, but if you don't know the desired state at the setting level, then you can't reasonably determine if loopback is configured correctly (meaning you have WMI filters and/or security filtering set properly to achieve your desired configuration).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;Review security filtering on GPOs&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;Once you determine which GPOs or which settings are not applying as expected, then you have a place to start your investigation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In&amp;nbsp;our experience here in support,&lt;span style="color: #ff0000;"&gt;&lt;em&gt; loopback processing issues usually come down to incorrect security filtering&lt;/em&gt;&lt;/span&gt;&lt;strong&gt;, &lt;/strong&gt;so rule that out first.&lt;/p&gt;
&lt;p&gt;This is where things get tricky . . . If you are configuring custom security filtering on your GPOs, loopback can get confusing quickly.&amp;nbsp; As a general rule, you should try to keep your WMI and security filtering as simple as possible&amp;nbsp;- but&amp;nbsp;ESPECIALLY when loopback is involved.&amp;nbsp; You may want to consider temporarily unlinking any WMI filters for troubleshooting purposes.&amp;nbsp; The goal is to ensure the policies you are expecting to apply are actually applying.&amp;nbsp; Once you determine this, then you can add your WMI filters back into the equation.&amp;nbsp; A test environment is the best place to do this type of investigation.&lt;/p&gt;
&lt;p&gt;Setting up security filtering correctly depends on how you architect your policies:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Did you enable loopback in its own GPO or in a GPO with other computer or user settings?&lt;/li&gt;
&lt;li&gt;Are you combining user settings and computer settings into the same GPO(s) linked to the computer&amp;rsquo;sOU?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The thing to keep in mind is that if you have what I would call "mixed use" GPOs, then your security filtering has to accommodate &lt;em&gt;&lt;strong&gt;all&lt;/strong&gt;&lt;/em&gt; of those uses.&amp;nbsp; This is only a problem if you remove Authenticated Users from the security filter on the GPO containing the user settings.&amp;nbsp; If you remove Authenticated Users from the security filter, then you have to think through which settings you are configuring, in which GPOs, to be applied to which computers and users, in which loopback mode....&lt;/p&gt;
&lt;p&gt;Ouch.&amp;nbsp; That's LOTS of thinking!&lt;/p&gt;
&lt;p&gt;So, unless that sounds like loads of fun to you, it&amp;rsquo;s best to keep WMI and security filtering as simple as possible.&amp;nbsp; I know that you can&amp;rsquo;t always leave Authenticated Users in place, but try to think of alternative solutions before removing it when loopback is involved.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now to the part that everyone&amp;nbsp;always asks&amp;nbsp;about once they realize their current filter is wrong&amp;nbsp;&amp;ndash; How the heck&amp;nbsp;&lt;span style="text-decoration: underline;"&gt;&lt;em&gt;should&lt;/em&gt;&lt;/span&gt; I configure the security filter?!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Security filtering requirements:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The computer account &lt;span style="text-decoration: underline;"&gt;must &lt;/span&gt;have &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;and&lt;strong&gt; &lt;/strong&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;APPLY&lt;/span&gt;&lt;/strong&gt; permissions to the GPO that contains the loopback configuration setting.&lt;/li&gt;
&lt;li&gt;If you are configuring user settings in the same GPO as computer settings, then the user &lt;span style="text-decoration: underline;"&gt;and &lt;/span&gt;computer accounts will &lt;span style="text-decoration: underline;"&gt;both&lt;/span&gt; need &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt; &lt;/strong&gt;and&lt;strong&gt; &lt;/strong&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;APPLY&lt;/span&gt;&lt;/strong&gt; permissions to the GPO since there are portions of the GPO that are applicable to both.&lt;/li&gt;
&lt;li&gt;If the user settings are in a separate GPO from the loopback configuration setting (#1 above) and any other computer settings (#2 above), then the GPO containing the user settings requires the following permissions:&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Merge mode requirements (Vista+):&lt;/strong&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="186"&gt;
&lt;p&gt;&lt;strong&gt;User account: &lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="653"&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;APPLY&lt;/span&gt;&lt;/strong&gt; (these are the default&lt;br /&gt;&amp;nbsp; permissions that are applied when you add users to the Security Filtering&lt;br /&gt;&amp;nbsp; section of the GPO&amp;nbsp; on the Scope tab in&lt;br /&gt;&amp;nbsp; GPMC)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="186"&gt;
&lt;p&gt;&lt;strong&gt;Computer account:&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="653"&gt;
&lt;p&gt;Minimum of &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt;&lt;/strong&gt; permission&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Replace mode requirements:&lt;/strong&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="186"&gt;
&lt;p&gt;&lt;strong&gt;User account:&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="652"&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;APPLY&lt;/span&gt;&lt;/strong&gt; (these are the default&lt;br /&gt;&amp;nbsp; permissions that are applied when you add users to the Security Filtering&lt;br /&gt;&amp;nbsp; section of the GPO&amp;nbsp; on the Scope tab in&lt;br /&gt;&amp;nbsp; GPMC)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="186"&gt;
&lt;p&gt;&lt;strong&gt;Computer account:&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td valign="top" width="652"&gt;
&lt;p&gt;No permissions are required&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Tools for Troubleshooting&lt;/h2&gt;
&lt;p&gt;The number one tool for troubleshooting loopback processing is your &lt;strong&gt;GPRESULT&lt;/strong&gt; output and a solid understanding of the security filtering requirements for loopback processing in your GPO architecture (see above).&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;GPRESULT&lt;/strong&gt; will tell you which GPOs applied to the user.&amp;nbsp; If a specific GPO failed to apply, then you need to review the security filtering on that GPO and verify:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The user has &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;APPLY&lt;/span&gt; &lt;/strong&gt;permissions&lt;/li&gt;
&lt;li&gt;Depending on your GPO architecture, the computer may need &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt; &lt;/strong&gt;or it may need &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;READ&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;APPLY&lt;/span&gt;&lt;/strong&gt; if you combined computer and user settings in the same GPO.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The same strategy applies if you have mysterious policy settings applying after configuring loopback and you are not sure know why.&amp;nbsp; Use your &lt;strong&gt;GPRESULT &lt;/strong&gt;output to identify which GPO(s) the policy settings are coming from and then review the security filtering of those GPOs.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://technet.microsoft.com/en-us/library/cc749336(v=WS.10).aspx"&gt;Group Policy Operational logs&lt;/a&gt; from the computer will also tell you which GPOs were discovered and applied, but this is the same information that you will get&lt;br /&gt;from the &lt;strong&gt;GPRESULT&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;Recommendations for using loopback&lt;/h2&gt;
&lt;p&gt;After working my fair share of loopback-related cases, I've collected a list of recommendations for using loopback.&amp;nbsp; This isn&amp;rsquo;t an official list of "best practices", but rather just some personal recommendations that may make your life easier.&amp;nbsp; ENJOY!&lt;/p&gt;
&lt;p&gt;I'll start with what is fast becoming my mantra: &lt;strong&gt;Keep it Simple.&lt;/strong&gt;&amp;nbsp; Pretty much all of my recommendations can come back to this point.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. Don't use loopback&amp;nbsp; :-)&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left: 30px;"&gt;OK, I know, not realistic.&amp;nbsp; How about this . . . Don't use loopback unless you absolutely have to.&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I say this not because there is something evil about loopback, but rather because loopback complicates how you think about Group Policy processing.&amp;nbsp; Loopback tends to be configured and then forgotten about until you start seeing unexpected results.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2. Use a separate GPO for the loopback setting; ONLY include the loopback setting in this GPO, and do not include the user settings.&amp;nbsp; Name it Loopback-Merge&amp;nbsp;or Loopback-Replace depending on the mode.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This makes loopback very easy to identify in both the GPMC and in your &lt;strong&gt;GPRESULT&lt;/strong&gt; output.&amp;nbsp; In the GPMC, you will be able to see where the GPO is linked and the mode without needing to view the settings or details of any GPOS.&amp;nbsp; Your &lt;strong&gt;GPRESULT&lt;/strong&gt; output will clearly list the loopback policy in the list of applied policies and you will also know the loopback mode, without digging into the report. Using a separate policy also allows you to manage the security of the loopback GPO separately from the security on the GPOs containing the user settings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;3. Avoid custom security filtering if you can help it.&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Loopback works without a hitch if you leave Authenticated Users in the security filtering of the GPO.&amp;nbsp; Removing Authenticated Users results in a lot more work for you in the long run and makes troubleshooting undesired behaviors much more complicated.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;4. Don't enable loopback in a GPO linked at the domain level!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This will impact your Domain Controllers.&amp;nbsp; I wouldn't be including this warning, if I hadn't worked several cases where loopback had been inadvertently applied to Domain Controllers.&amp;nbsp; Again, there isn&amp;rsquo;t anything inherently wrong with applying loopback on Domain Controllers.&amp;nbsp; It is bad, however, when loopback unexpectedly applies to Domain Controllers.&lt;/li&gt;
&lt;li&gt;If you absolutely MUST enable loopback in a GPO linked at the domain level, then block inheritance on your Domain Controllers OU.&amp;nbsp; If you do this, you will need to link the Default Domain Policy back to the Domain Controllers OU making sure to have the precedence of the Default Domain Controllers policy higher (lower number) than the Domain Policy.&lt;/li&gt;
&lt;li&gt;In general, be careful with all policies linked at the at the domain level.&amp;nbsp; Yes, it may be "simpler" to manage most policy at the domain level, but it can lead&lt;br /&gt;to lazy administration practices and make it very easy to forget about the impact of seemingly minor policy changes on your DCs.&lt;/li&gt;
&lt;li&gt;Even if you are editing the security filtering to specific computers, it is still dangerous to have the loopback setting in a GPO linked at the domain level.&amp;nbsp; What if someone mistakenly modifies the security filtering to "fix" some other issue.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;TEST, TEST, TEST!!!&amp;nbsp;&lt;/strong&gt; It&amp;rsquo;s even more important to test when you&amp;nbsp;are modifying GPOs that impact domain controllers.&amp;nbsp; Making a change at the domain level&amp;nbsp;that negatively impacts a domain controller can be career altering.&amp;nbsp; Even if you have to set up a test&amp;nbsp;domain in virtual machines on your own workstation, find a way to test.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;5. Always test in a representative environment prior to deploying loopback in production.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Try to duplicate your production GPOs as closely as possible.&amp;nbsp; Export/Import is a great way to do this.&lt;/li&gt;
&lt;li&gt;Enabling loopback almost always surfaces some settings that you weren't aware of.&amp;nbsp; Unless you are diligent about disabling unused portions of GPOs and you perform periodic audits of actual configuration versus documented desired state configuration, there will typically be a few settings that are outside of your desired configuration.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Duplicating your production policies in a test environment means you will find these anomalies before you make the changes in production.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s all folks!&amp;nbsp; You are now ready to go forth and conquer all of those loopback policies!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Kim &lt;em&gt;&amp;ldquo;1.21 Gigawatts!!&amp;rdquo;&lt;/em&gt; Nichols&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3574006" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/group+policy/">group policy</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Kim+Nichols/">Kim Nichols</category></item><item><title>We're back.  Did you miss us?</title><link>http://blogs.technet.com/b/askds/archive/2013/05/17/we-re-back-did-you-miss-us.aspx</link><pubDate>Fri, 17 May 2013 20:00:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3573419</guid><dc:creator>David Beach - MSFT</dc:creator><slash:comments>17</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3573419</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3573419</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/05/17/we-re-back-did-you-miss-us.aspx#comments</comments><description>&lt;p&gt;Hey all, &lt;a href="http://blogs.technet.com/b/askds/archive/tags/David+Beach/"&gt;David&lt;/a&gt;&amp;nbsp;here.&amp;nbsp; Now that we&amp;rsquo;ve &lt;a href="http://blogs.technet.com/b/askds/archive/2013/05/07/ad-fs-2-0-claims-rule-language-part-2.aspx"&gt;broken the silence&lt;/a&gt;, we here on the DS team felt that we owed you, dear readers, an explanation of some sort.&amp;nbsp; Plus, we wanted to talk about the blog itself, some changes happening for us, and what you should hopefully be able to expect moving forward.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So, what had happened was&amp;hellip;.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As most of you know, a few months ago our &lt;a href="http://blogs.technet.com/b/askds/archive/tags/Ned+Pyle/"&gt;editor-in-chief&lt;/a&gt;&amp;nbsp;and the butt of many jokes here on the DS support team &lt;a href="http://blogs.technet.com/b/askds/archive/2012/10/12/so-long-and-thanks-for-all-the-fish.aspx"&gt;moved to a new position&lt;/a&gt;.&amp;nbsp; We have it on good authority that he is thoroughly terrorizing many of our developers in Redmond with scary words like &amp;ldquo;documentation&amp;rdquo;, &amp;ldquo;supportability&amp;rdquo;, and other Chicago-style aphorisms which are best not repeated in print.&lt;/p&gt;
&lt;p&gt;Unfortunately for us and for this blog, that left us with a little bit of a hole in the editing team!&amp;nbsp; The folks left behind might have been superheroes, but the problem with being a superhero is that you get called on to go save the world (or a customer with a crisis) all the time, and that doesn&amp;rsquo;t leave much time for picking up your cape from the dry cleaners, let alone keeping up with editing blog submissions, doing mail sacks, and generally keeping the blog going.&lt;/p&gt;
&lt;p&gt;At the same time, we had a bit of a reorganization internally.&amp;nbsp; Where we were formerly one team within support, we are now two teams &amp;ndash; DS (Directory Services) and ID (Identity).&amp;nbsp; Why the distinction?&amp;nbsp; Well, you may have heard about this Cloud thing&amp;hellip;. But that&amp;rsquo;s a story best told by technical blog posts, really.&amp;nbsp; For now, let&amp;rsquo;s just say the scope of some of what we do expanded last year from &amp;ldquo;a lot of people use it&amp;rdquo; to &amp;ldquo;internet scale&amp;rdquo;.&amp;nbsp; Pretty scary when you think about it.&lt;/p&gt;
&lt;p&gt;Just to make things even more confusing, about a month ago we were officially reunited with our long-lost (and slightly insane, but in a good way) brethren in the &lt;a href="http://blogs.technet.com/b/askpfeplat/" target="_blank"&gt;field engineering organization&lt;/a&gt;.&amp;nbsp; That&amp;rsquo;s right, our two orgs have been glommed&lt;a title="" href="#_ftn1"&gt;[1]&lt;/a&gt;&amp;nbsp;together into one giant concentration of support engineering superpower.&amp;nbsp; While it&amp;rsquo;s opening up some really cool stuff that we have always wanted to do but couldn&amp;rsquo;t before, it&amp;rsquo;s still the equivalent of waking up one day and finding out that all of those cousins you see every few years at family reunions are coming to live with you.&amp;nbsp; In your house.&amp;nbsp; Oh, and they&amp;rsquo;re bringing their dog.&lt;/p&gt;
&lt;p&gt;Either way, the net effect of all this massive change was that we sort of got quiet for a few months.&amp;nbsp; It wasn&amp;rsquo;t you, honest.&amp;nbsp; It was us.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What to Expect&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s important to us that we keep this blog current with detailed, pertinent technical info that helps you resolve issues that you might encounter, or even just helps you understand how our parts of Windows work a bit better.&amp;nbsp; So, we&amp;rsquo;re picking that torch back up and we&amp;rsquo;ll be trying to get several good technical posts up each month for you.&amp;nbsp; You may also see some shorter posts moving forward.&amp;nbsp; The idea is to break up the giant articles and try to get some smaller, useful-to-know things out there every so often. &amp;nbsp;Internally, we&amp;rsquo;re calling the little posts &amp;ldquo;DS Quickies&amp;rdquo; but no promises on whether we&amp;rsquo;ll actually give you that as a category to&amp;nbsp;search on.&amp;nbsp; Yes, we&amp;rsquo;re cruel like that.&amp;nbsp; You&amp;rsquo;ll also see the return of the mail sack at some point in the near future, and most importantly you&amp;rsquo;re going to see some new names showing up as writers.&amp;nbsp; We&amp;rsquo;ve put out the call, and we&amp;rsquo;re planning to bring you blog posts written not just by our folks in the Americas, but also in Europe and Asia.&amp;nbsp; You can probably also expect some guest posts from our kin in the PFE organization, when they have something specific to what we do that they want to talk about.&lt;/p&gt;
&lt;p&gt;At the same time, we&amp;rsquo;re keen on keeping the stuff that makes our blog useful and fun.&amp;nbsp; So you can continue to expect technical depth, detailed analysis, plain-English explanations, and occasional irreverent, snarky humor.&amp;nbsp; We&amp;rsquo;re not here to tell you why you should buy Windows clients or servers (or phones, or tablets) &amp;ndash; we have plenty of marketing websites that do that better than we ever could.&amp;nbsp; Instead, we&amp;rsquo;re here to help you understand how Windows works and how to fix problems when they occur.&amp;nbsp; Although we do reserve the right to post blatant wackiness or fun things every so often too.&amp;nbsp; Look, we don&amp;rsquo;t get out much, ok?&amp;nbsp; This is our outlet.&amp;nbsp; Just go with us on this.&lt;/p&gt;
&lt;p&gt;Finally, you&amp;rsquo;re going to see me personally posting a bit more, since I&amp;rsquo;ve taken over as the primary editor for the site.&amp;nbsp; I know - I tried to warn them what would happen, but they still gave me the job all the same.&amp;nbsp; Jokes aside, I feel like it&amp;rsquo;s important that our blog isn&amp;rsquo;t just an encyclopedia of awesome technical troubleshooting, but also that it showcases the fact that we&amp;rsquo;re real people doing our best to make the IT world a better place, as sappy as that sounds. (Except for &lt;a href="http://blogs.technet.com/b/askds/archive/tags/Dave+Fisher/"&gt;David Fisher&lt;/a&gt;&amp;ndash; I&amp;rsquo;m convinced he&amp;rsquo;s really a robot).&amp;nbsp; I have a different writing style than Ned and Jonathan, and a different sense of humor, but I promise to contain myself as much as possible.&amp;nbsp; :-)&lt;/p&gt;
&lt;p&gt;Sound good?&amp;nbsp; We hope so.&amp;nbsp; We&amp;rsquo;re going to go off and write some more technical stuff now &amp;ndash; in fact:&amp;nbsp; On deck for next week:&amp;nbsp; A followup to &lt;a href="http://blogs.technet.com/b/askds/archive/tags/kim+nichols/"&gt;Kim&amp;rsquo;s&lt;/a&gt;&amp;nbsp;blog on &lt;a href="http://blogs.technet.com/b/askds/archive/2013/02/08/circle-back-to-loopback.aspx"&gt;Loopback Policy Processing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We wanted to leave you with a funny video that&amp;rsquo;s safe for work to help kick off the weekend, but alas our bing fu was weak today.&amp;nbsp; Got a good one to share?&amp;nbsp; Feel free to link it for us in the comments!&lt;/p&gt;
&lt;hr align="left" size="1" width="33%" /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p&gt;&lt;a title="" href="#_ftnref1"&gt;[1]&lt;/a&gt;&lt;br /&gt;&amp;ldquo;Glom&amp;rdquo; is a technical term, by the way, not a managerial one.&amp;nbsp; Needless to say, hijinks are continuing to&lt;br /&gt;ensue.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-- David "Capes are cool" Beach&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3573419" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/General/">General</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Silly+Rabbit/">Silly Rabbit</category><category domain="http://blogs.technet.com/b/askds/archive/tags/David+Beach/">David Beach</category></item><item><title>AD FS 2.0 Claims Rule Language Part 2</title><link>http://blogs.technet.com/b/askds/archive/2013/05/07/ad-fs-2-0-claims-rule-language-part-2.aspx</link><pubDate>Tue, 07 May 2013 15:24:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3571171</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3571171</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3571171</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/05/07/ad-fs-2-0-claims-rule-language-part-2.aspx#comments</comments><description>&lt;p&gt;Hello, &lt;a href="http://blogs.technet.com/b/askds/archive/tags/joji+oshima/"&gt;Joji Oshima&lt;/a&gt; here to dive deeper into the Claims Rule Language for AD FS. A while back I wrote a &lt;a href="http://blogs.technet.com/b/askds/archive/2011/10/07/ad-fs-2-0-claims-rule-language-primer.aspx"&gt;getting started post&lt;/a&gt; on the claims rule language in AD FS 2.0. If you haven't seen it, I would start with that article first as I'm going to build on the claims rule language syntax discussed in that earlier post. In this post, I'm going to cover more complex claim rules using Regular Expressions (&lt;em&gt;RegEx&lt;/em&gt;) and how to use them to solve real world issues.&lt;/p&gt;
&lt;h1&gt;An Introduction to Regex&lt;/h1&gt;
&lt;p&gt;The use of RegEx allows us to search or manipulate data in many ways in order to get a desired result. Without RegEx, when we do comparisons or replacements we must look for an exact match. Most of the time this is sufficient but what if you need to search or replace based on a pattern? Say you want to search for strings that simply start with a particular word. RegEx uses pattern matching to look at a string with more precision. We can use this to control which claims are passed through, and even manipulate the data inside the claims.&lt;/p&gt;
&lt;h1&gt;Using RegEx in searches&lt;/h1&gt;
&lt;p&gt;Using RegEx to pattern match is accomplished by changing the standard double equals "==" to "=~" and by using special metacharacters in the condition statement. I'll outline the more commonly used ones, but there are &lt;a href="http://msdn.microsoft.com/en-US/library/ae5bf541(v=VS.80).aspx"&gt;good resources&lt;/a&gt; available online that go into more detail. For those of you unfamiliar with RegEx, let's first look at some common RegEx metacharacters used to build pattern templates and what the result would be when using them.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 95px;" /&gt;&lt;col style="width: 324px;" /&gt;&lt;col style="width: 486px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="height: 17px; background: #d9d9d9;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Symbol&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #bfbfbf 0.5pt; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Operation&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid #bfbfbf 0.5pt; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Example rule&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 73px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #bfbfbf 0.5pt; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;^&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;Match the beginning of a string&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;em&gt;c:[type == "http://contoso.com/role", Value =~ "^director"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt; =&amp;gt; issue (claim = c); &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass through any role claims that start with "director"&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #bfbfbf 0.5pt; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;$&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;Match the end of a string&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;em&gt;c:[type == "http://contoso.com/email", Value =~ "contoso.com$"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt; =&amp;gt; issue (claim = c); &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass through any email claims that end with "contoso.com"&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #bfbfbf 0.5pt; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;|&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;em&gt;c:[type == "http://contoso.com/role", Value =~ "^director|^manager"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt; =&amp;gt; issue (claim = c); &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass through any role claims that start with "director" or "manager"&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #bfbfbf 0.5pt; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;(?i)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;Not case sensitive&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;em&gt;c:[type == "http://contoso.com/role", Value =~ "(?i)^director"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt; =&amp;gt; issue (claim = c); &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass through any role claims that start with "director" regardless of case&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #bfbfbf 0.5pt; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;x.*y&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;"x" followed by "y"&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;em&gt;c:[type == "http://contoso.com/role", Value =~ "(?i)Seattle.*Manager"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt; =&amp;gt; issue (claim = c); &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass through any role claims that contain "Seattle" followed by "Manager" regardless of case.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #bfbfbf 0.5pt; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;+&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;Match preceding character&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;&lt;em&gt;c:[type == "http://contoso.com/employeeId", Value =~ "^0+"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt; =&amp;gt; issue (claim = c); &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass through any employeeId claims that contain start with at least one "0"&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 34px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid #bfbfbf 0.5pt; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;*&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;Match preceding character zero or more times&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid #bfbfbf 0.5pt; border-right: solid #bfbfbf 0.5pt;"&gt;
&lt;p&gt;Similar to above, more useful in RegExReplace() scenarios.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Using RegEx in string manipulation&lt;/h1&gt;
&lt;p&gt;RegEx pattern matching can also be used in replacement scenarios. It is similar to a "find and replace", but using pattern matching instead of exact values. To use this in a claim rule, we use the RegExReplace() function in the value section of the issuance statement.&lt;/p&gt;
&lt;p&gt;The RegExReplace() function accepts three parameters.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;The first is the string in which we are searching.&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;We will typically want to search the value of the incoming claim (c.Value), but this could be a combination of values (c1.Value + c2.Value).&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;The second is the RegEx pattern we are searching for in the first parameter.&lt;/li&gt;
&lt;li&gt;The third is the string value that will replace any matches found.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 695px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;em&gt;c:[type == "http://contoso.com/role"]&lt;br /&gt; =&amp;gt; issue (Type = "http://contoso.com/role", Value = RegExReplace(c.Value, "(?i)director", "Manager"); &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Pass through any role claims. If any of the claims contain the word "Director", RegExReplace() will change it to "Manager". For example, "Director of Finance" would pass through as "Manager of Finance".&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Real World Examples&lt;/h1&gt;
&lt;p&gt;Let's look at some real world examples of regular expressions in claims rules.&lt;/p&gt;
&lt;h2&gt;Problem 1:&lt;/h2&gt;
&lt;p&gt;We want to add claims for all group memberships, including distribution groups.&lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;Typically, group membership is added using the wizard and selecting Token-Groups Unqualified Names and map it to the Group or Role claim. This will only pull security groups, not distribution groups, and will not contain Domain Local groups.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/6663.050713_5F00_1624_5F00_ADFS20Claim1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;We can pull from memberOf, but that will give us the entire distinguished name, which is not what we want. One way to solve this problem is to use three separate claim rules and use RegExReplace() to remove unwanted data.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="height: 18px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 1: Pull memberOf, add to working set "phase 1"&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 82px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]&lt;br /&gt;=&amp;gt; add(store = "Active Directory", types = ("http://test.com/phase1"), query = ";memberOf;{0}", param = c.Value);&lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 18px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; "CN=Group1,OU=Users,DC=contoso,DC=com" is put into a phase 1 claim.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 2: Drop everything after the first comma, add to working set "phase 2"&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "http://test.com/phase1"]&lt;br /&gt;=&amp;gt; add(Type = "http://test.com/phase2", Value = RegExReplace(c.Value, ",[^\n]*", "")); &lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; We process the value in the phase 1 claim and put "CN=Group1" into a phase 2 claim.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Digging Deeper:&lt;/strong&gt; RegExReplace(c.Value, ",[^\n]*", "")&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;c.Value&lt;/strong&gt; is the value of the phase 1 claim. This is what we are searching in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;",[^\n]*"&lt;/strong&gt; is the RegEx syntax used to find the first comma, plus everything after it&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;""&lt;/strong&gt; is the replacement value. Since there is no string, it effectively removes any matches.&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 3: Drop CN= at the beginning, add to outgoing claim set as the standard role claim&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "http://test.com/phase2"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; issue(Type = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role", Value = RegExReplace(c.Value, "^CN=", ""));&lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; We process the value in phase 2 claim and put "Group1" into the role claim&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style="height: 17px;"&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Digging Deeper:&lt;/strong&gt; RegExReplace(c.Value, "^CN=", "")&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;c.Value&lt;/strong&gt; is the value of the phase 1 claim. This is what we are searching in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;"^CN="&lt;/strong&gt; is the RegEx syntax used to find "CN=" at the beginning of the string.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;""&lt;/strong&gt; is the replacement value. Since there is no string, it effectively removes any matches.&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Problem 2:&lt;/h2&gt;
&lt;p&gt;We need to compare the values in two different claims and only allow access to the relying party if they match.&lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;In this case we can use RegExReplace(). This is not the typical use of this function, but it works in this scenario. The function will attempt to match the pattern in the first data set with the second data set. If they match, it will issue a new claim with the value of "Yes". This new claim can then be used to grant access to the relying party. That way, if these values do not match, the user will not have this claim with the value of "Yes".&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c1:[Type == "http://adatum.com/data1"] &amp;amp;&amp;amp; &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c2:[Type == "http://adatum.com/data2"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt; =&amp;gt; issue(Type = "http://adatum.com/UserAuthorized", Value = RegExReplace(c1.Value, c2.Value, "Yes")); &lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; If there is a data1 claim with the value of "contoso" and a data2 claim with a value of "contoso", it will issue a UserAuthorized claim with the value of "Yes". However, if data1 is "adatum" and data2 is "fabrikam", it will issue a UserAuthorized claim with the value of "adatum".&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Digging Deeper:&lt;/strong&gt; RegExReplace(c1.Value, c2.Value, "Yes")&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;c1.Value&lt;/strong&gt; is the value of the data1 claim. This is what we are searching in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;c2.Value&lt;/strong&gt; is the value of the data2 claim. This is what we are searching for.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;"Yes"&lt;/strong&gt; is the replacement value. Only if c1.Value &amp;amp; c2.Value match will there be a pattern match and the string will be replaced with "Yes". Otherwise the claim will be issued with the value of the data1 claim.&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Problem 3:&lt;/h2&gt;
&lt;p&gt;Let's take a second look at potential issue with our solution to problem 2. Since we are using the value of one of the claims as the RegEx syntax, we must be careful to check for certain RegEx metacharacters that would make the comparison mean something different. The backslash is used in some RegEx metacharacters so any backslashes in the values will throw off the comparison and it will always fail, even if the values match.&lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;In order to ensure that our matching claim rule works, we must sanitize the input values by removing any backslashes before doing the comparison. We can do this by taking the data that would go into the initial claims, put it in a holding attribute, and then use RegEx to strip out the backslash. The example below only shows the sanitization of data1, but it would be similar for data2.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 1: Pull attribute1, add to holding attribute "http://adatum.com/data1holder"&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; add(store = "Active Directory", types = ("http://adatum.com/data1holder"), query = ";attribute1;{0}", param = c.Value);&lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; The value in attribute 1 is "Contoso\John" which is placed in the data1holder claim.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 2: Strip the backslash from the holding claim and issue the new data1 claim&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "http://adatum.com/data1holder", Issuer == "AD AUTHORITY"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; issue(type = "http://adatum.com/data1", Value = RegExReplace(c.Value,"\\",""); &lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; We process the value in the data1holder claim and put "ContosoJohn" in a data1 claim&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Digging Deeper:&lt;/strong&gt; RegExReplace(c.Value,"\\","")&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;c.Value&lt;/strong&gt; is the value of the data1 claim. This is what we are searching in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;"\\"&lt;/strong&gt; is considered a single backslash. In RegEx, using a backslash in front of a character makes it a literal backslash.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;""&lt;/strong&gt; is the replacement value. Since there is no string, it effectively removes any matches.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An alternate solution would be to pad each backslash in the data2 value with a second backslash. That way each backslash would be represented as a literal backslash. We could accomplish this by using RegExReplace(c.Value,"\\","\\") against a data2 input value.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Problem 4:&lt;/h2&gt;
&lt;p&gt;Employee numbers vary in length, but we need to have exactly 9 characters in the claim value. Employee numbers that are shorter than 9 characters should be padded in the front with leading zeros.&lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;In this case we can create a buffer claim, join that with the employee number claim, and then use RegEx to use the right most 9 characters of the combined string.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 1: Create a buffer claim to create the zero-padding&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; add(Type = "Buffer", Value = "000000000"); &lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 2: Pull the employeeNumber attribute from Active Directory, place it in a holding claim&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; add(store = "Active Directory", types = ("ENHolder"), query = ";employeeNumber;{0}", param = c.Value);&lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 3: Combine the two values, then use RegEx to remove all but the 9 right most characters.&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c1:[Type == "Buffer"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;amp;&amp;amp; c2:[Type == "ENHolder"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; issue(Type = "http://adatum.com/employeeNumber", Value = RegExReplace(c1.Value + c2.Value, ".*(?=.{9}$)", ""));&lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Digging Deeper:&lt;/strong&gt; RegExReplace(c1.Value + c2.Value, ".*(?=.{9}$)", "")&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;c1.Value + c2.Value&lt;/strong&gt; is the employee number padded with nine zeros. This is what we are searching in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;".*(?=.{9}$)"&lt;/strong&gt; represents the last nine characters of a string. This is what we are searching for. We could replace the 9 with any number and have it represent the last "X" number of characters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;""&lt;/strong&gt; is the replacement value. Since there is no string, it effectively removes any matches.&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Problem 5:&lt;/h2&gt;
&lt;p&gt;Employee numbers contain leading zeros but we need to remove those before sending them to the relying party.&lt;/p&gt;
&lt;h2&gt;Solution:&lt;/h2&gt;
&lt;p&gt;In this case we can pull employee number from Active Directory and place it in a holding claim, then use RegEx to use the strip out any leading zeros.&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 1: Pull the employeeNumber attribute from Active Directory, place it in a holding claim&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; add(store = "Active Directory", types = ("ENHolder"), query = ";employeeNumber;{0}", param = c.Value);&lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 773px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Phase 2: Take the value in ENHolder and remove any leading zeros.&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c:[Type == "ENHolder"] &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;=&amp;gt; issue(Type = "http://adatum.com/employeeNumber", Value = RegExReplace(c.Value, "^0*", ""));&lt;/em&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;&lt;strong&gt;Digging Deeper:&lt;/strong&gt; RegExReplace(c.Value, "^0*", "")&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;c1.Value&lt;/strong&gt; is the employee number. This is what we are searching in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;"^0*"&lt;/strong&gt; finds any leading zeros. This is what we are searching for. If we only had ^0 it would only match a single leading zero. If we had 0* it would find any zeros in the string.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;""&lt;/strong&gt; is the replacement value. Since there is no string, it effectively removes any matches.&lt;/li&gt;
&lt;/ul&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;As you can see, RegEx adds powerful functionality to the claims rule language. It has a high initial learning curve, but once you master it you will find that there are few scenarios that RegEx can't solve. I would highly recommend &lt;a href="http://www.bing.com/search?q=online+regex+tester&amp;amp;qs=n&amp;amp;form=QBRE&amp;amp;pq=online+regex+tester&amp;amp;sc=3-19&amp;amp;sp=-1&amp;amp;sk="&gt;searching&lt;/a&gt; for an online RegEx syntax tester as it will make learning and testing much easier. I'll continue to expand the TechNet wiki article so I would check there for more details on the claims rule language.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/4792.aspx"&gt;Understanding Claim Rule Language in AD FS 2.0&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/16161.ad-fs-2-0-using-regex-in-the-claims-rule-language.aspx"&gt;AD FS 2.0: Using RegEx in the Claims Rule Language&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-US/library/ae5bf541(v=VS.80).aspx"&gt;Regular Expression Syntax&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/b/askds/archive/2011/10/07/ad-fs-2-0-claims-rule-language-primer.aspx"&gt;AD FS 2.0 Claims Rule Language Primer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Until next time,&lt;/p&gt;
&lt;p&gt;Joji "Claim Jumper" Oshima&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3571171" width="1" height="1"&gt;</description></item><item><title>Circle Back to Loopback</title><link>http://blogs.technet.com/b/askds/archive/2013/02/08/circle-back-to-loopback.aspx</link><pubDate>Sat, 09 Feb 2013 00:18:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3551395</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>23</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3551395</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3551395</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/02/08/circle-back-to-loopback.aspx#comments</comments><description>&lt;p class="Publishwithline"&gt;Hello again!&amp;nbsp; &lt;a href="http://blogs.technet.com/b/askds/archive/tags/kim+nichols/"&gt;Kim Nichols&lt;/a&gt; here again.&amp;nbsp; For this post, I'm taking a break from the AD LDS discussions (hold your applause until the end) and going back to a topic near and dear to my heart - Group Policy loopback processing.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Loopback processing is not a new concept to Group Policy, but it still causes confusion for even the most experienced Group Policy administrators.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;This post is the first part of a two part blog series on User Group Policy Loopback processing.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Part 1 provides a general Group Policy refresher and introduces Loopback processing&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Part 2 covers Troubleshooting Group Policy loopback processing&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="Publishwithline"&gt;Hopefully these posts will refresh your memory and provide some tips for troubleshooting Group Policy processing when loopback is involved.&lt;/p&gt;
&lt;h1 class="Publishwithline"&gt;Part 1: Group Policy and Loopback processing refresher&lt;/h1&gt;
&lt;h2 class="Publishwithline"&gt;Normal Group Policy Processing&lt;/h2&gt;
&lt;p class="Publishwithline"&gt;Before we dig in too deeply, let's quickly cover normal Group Policy processing.&amp;nbsp; Thinking back to when we first learned about Group Policy processing, we learned that Group Policy&lt;br /&gt;applies in the following order:&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Local Group Policy&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Site&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Domain&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;OU&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p class="Publishwithline"&gt;You may have heard Active Directory &amp;ldquo;old timers&amp;rdquo; refer to this as &lt;a href="http://support.microsoft.com/kb/221930"&gt;LSDOU&lt;/a&gt;.&amp;nbsp; As a result of LSDOU, settings from GPOs linked closest (lower in OU structure) to the user take precedence over those linked farther from the user (higher in OU structure).&amp;nbsp;GPO configuration options such as &lt;strong&gt;Block Inheritance&lt;/strong&gt; and &lt;strong&gt;Enforced &lt;/strong&gt;(previously called No Override for you old school admins) can modify processing as well, but we will keep things simple for the purposes of this example.&amp;nbsp; Normal user group policy processing applies user settings from GPOs linked to the Site, Domain, and OU containing the user object regardless of the location of the computer object in Active Directory.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Let's use a picture to clarify this.&amp;nbsp; For this example, the user is the "E" OU and the computer is in the "G" OU of the contoso.com domain.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5241.Picture1.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5241.Picture1.jpg" alt="" width="269" height="309" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Following normal group policy processing rules (assuming all policies apply to Authenticated Users with no WMI filters or "Block Inheritance" or "Enforced" policies), user settings of Group Policy objects apply in the following order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Local Computer Group Policy&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policies linked to the Site&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policies linked to the Domain (contoso.com)&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policies linked to OU "A"&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policies linked to OU "B"&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policies linked to OU "E"&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p class="Publishwithline"&gt;That&amp;rsquo;s pretty straightforward, right?&amp;nbsp; Now, let&amp;rsquo;s move on to loopback processing!&lt;/p&gt;
&lt;h2 class="Publishwithline"&gt;What is loopback processing?&lt;/h2&gt;
&lt;p class="Publishwithline"&gt;Group Policy loopback is a computer configuration setting that enables different Group Policy user settings to apply based upon the computer from which logon occurs.&amp;nbsp;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Breaking this down a little more:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;It is a &lt;span style="text-decoration: underline;"&gt;computer&lt;/span&gt; configuration setting. (Remember this for later)&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;When enabled, user settings from GPOs applied to the computer apply to the logged on user.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Loopback processing changes the list of applicable GPOs and the order in which they apply to a user.&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 class="Publishwithline"&gt;Why would I use loopback processing?&lt;/h2&gt;
&lt;p class="Publishwithline"&gt;Administrators use loopback processing in kiosk, lab, and Terminal Server environments to provide a consistent user experience across all computers regardless of the GPOs linked to user's OU.&amp;nbsp;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Our recommendation for loopback is similar to our recommendations for WMI filters, Block Inheritance and policy Enforcement; use them sparingly.&amp;nbsp; All of these configuration options modify the default processing of policy and thus make your environment more complex to troubleshoot and maintain. As I've mentioned in other posts, whenever possible, keep your designs as simple as possible. You will save yourself countless nights/weekends/holidays in the office because will you be able to identify configuration issues more quickly and easily.&lt;/p&gt;
&lt;h2 class="Publishwithline"&gt;How to configure loopback processing&lt;/h2&gt;
&lt;p class="Publishwithline"&gt;The loopback setting is located under &lt;strong&gt;Computer Configuration/Administrative Templates/System/Group Policy&lt;/strong&gt; in the Group Policy Management Editor (GPME).&amp;nbsp;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Use the policy setting &lt;strong&gt;Configure user Group Policy loopback processing mode &lt;/strong&gt;to configure loopback in Windows 8 and Windows Server 2012&lt;strong&gt;.&amp;nbsp; &lt;/strong&gt;Earlier versions of Windows have the same policy setting under the name &lt;strong&gt;User Group Policy loopback processing mode.&lt;/strong&gt;&amp;nbsp; The screenshot below is from the Windows 8 version of the GPME.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5025.Picture2.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5025.Picture2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;When you enable loopback processing, you also have to select the desired mode.&amp;nbsp; There are two modes for loopback processing:&amp;nbsp; Merge or Replace.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5826.Picture3.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5826.Picture3.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 class="Publishwithline"&gt;Loopback Merge vs. Replace&lt;/h2&gt;
&lt;p class="Publishwithline"&gt;Prior to the start of user policy processing, the Group Policy engine checks to see if loopback is enabled and, if so, in which mode.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;We'll start off with an explanation of Merge mode since it builds on our existing knowledge of user policy processing.&lt;/p&gt;
&lt;h3 class="Publishwithline"&gt;Loopback Merge&lt;/h3&gt;
&lt;p class="Publishwithline"&gt;During loopback processing in merge mode, user GPOs process first (exactly as they do during normal policy processing), but with an additional step.&amp;nbsp; Following normal user policy processing the Group Policy engine applies user settings from GPOs linked to the computer's OU. &amp;nbsp;The result-- the user receives all user settings from GPOs applied to the user and all user settings from GPOs applied to the computer. The user settings from the computer&amp;rsquo;s GPOs win any conflicts since they apply last.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;To illustrate loopback merge processing and conflict resolution, let&amp;rsquo;s use a simple chart.&amp;nbsp; The chart shows us the &amp;ldquo;winning&amp;rdquo;&amp;nbsp;configuration in each of three scenarios:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;The same user policy setting is configured in GPOs linked to the user and the computer&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;The user policy setting is only configured in a GPO linked to the user&amp;rsquo;s OU&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;The user policy setting is only configured in a GPO linked to the computer&amp;rsquo;s OU&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="Publishwithline"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/1033.Picture4.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/1033.Picture4.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Now, going back to our original example, loopback processing in Merge mode applies user settings from GPOs linked to the user&amp;rsquo;s OU followed by user settings from GPOs linked to the computer&amp;rsquo;s OU.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/4670.Picture5.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/4670.Picture5.jpg" alt="" width="269" height="309" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;GPOs for the user in OU &amp;rdquo;E&amp;rdquo; apply in the following order (the first part is identical to normal user policy processing from our original example):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Local Group Policy&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policy objects linked to the Site&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policy objects linked to the Domain&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policy objects linked to OU "A"&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policy objects linked to OU "B"&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Group Policy objects linked to OU "E"&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to the Site&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to the Domain&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to OU "A" &lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to OU "C" &lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to OU "G"&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 class="Publishwithline"&gt;Loopback Replace&lt;/h3&gt;
&lt;p class="Publishwithline"&gt;Loopback replace is much easier.&amp;nbsp;During loopback processing in replace mode, the user settings applied to the computer &amp;ldquo;replace&amp;rdquo; those applied to the user.&amp;nbsp; In actuality, the Group Policy service skips the GPOs linked to the user&amp;rsquo;s OU. Group Policy effectively processes as if user object was in the OU of the computer rather than its current OU.&amp;nbsp;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;The chart for loopback processing in replace mode shows that settings &amp;ldquo;1&amp;rdquo; and &amp;ldquo;2&amp;rdquo; do not apply since all user settings linked to the user&amp;rsquo;s OU are skipped when loopback is configured in replace mode.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/6758.Picture6.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/6758.Picture6.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Returning to our example of the user in the &amp;ldquo;E&amp;rdquo; OU, loopback processing in replace mode skips normal user policy processing and only applies user settings from GPOs linked to the computer.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5873.Picture7.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5873.Picture7.jpg" alt="" width="269" height="309" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="Publishwithline"&gt;The resulting processing order is:&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Local Group Policy&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to the Site&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to the Domain&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to OU "A" &lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to OU "C" &lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;&lt;span style="color: #3366ff;"&gt;Group Policy objects linked to OU "G"&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 class="Publishwithline"&gt;Recap&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;User Group Policy loopback processing is a computer configuration setting.&lt;/div&gt;
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Loopback processing &lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;is not&lt;/strong&gt;&lt;/span&gt; specific to the GPO in which it is configured. If we think back to what an Administrative Template policy is, we know it is just configuring a registry value.&amp;nbsp; In the case of the loopback policy processing setting, once this registry setting is configured, the order and scope of user group policy processing for all users logging on to the computer is modified per the mode chosen: Merge or Replace.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Merge mode applies GPOs linked to the user object first, followed by GPOs with user settings linked to the computer object.&amp;nbsp;&lt;/div&gt;
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;The order of processing determines the precedence. GPOs with users settings linked to the computer object apply last and therefore have a higher precedence than those linked to the user object.&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Use merge mode in scenarios where you need users to receive the settings they normally receive, but you want to customize or make changes to those settings when they logon to specific computers.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;
&lt;div class="Publishwithline"&gt;Replace mode completely skips Group Policy objects linked in the path of the user and only applies user settings in GPOs linked in the path of the computer.&amp;nbsp; Use replace mode when you need to disregard all GPOs that are linked in the path of the user object.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p class="Publishwithline"&gt;Those are the basics of user group policy loopback processing. In my next post, I'll cover the troubleshooting process when loopback is enabled.&lt;/p&gt;
&lt;p class="Publishwithline"&gt;Kim &amp;ldquo;Why does it say paper jam, when there is no paper jam!?&amp;rdquo; Nichols&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3551395" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/group+policy/">group policy</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Kim+Nichols/">Kim Nichols</category></item><item><title>Distributed File System Consolidation of a Standalone Namespace to a Domain-Based Namespace</title><link>http://blogs.technet.com/b/askds/archive/2013/02/06/distributed-file-system-consolidation-of-a-standalone-namespace-to-a-domain-based-namespace.aspx</link><pubDate>Wed, 06 Feb 2013 20:51:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3550908</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3550908</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3550908</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/02/06/distributed-file-system-consolidation-of-a-standalone-namespace-to-a-domain-based-namespace.aspx#comments</comments><description>&lt;p&gt;Hello again everyone! &lt;a href="http://blogs.technet.com/b/askds/archive/tags/dave+fisher/"&gt;David&lt;/a&gt; here to discuss a scenario that is becoming more and more popular for administrators of Distributed File System Namespaces (DFSN): consolidation of one or more standalone namespaces that are referenced by a domain-based namespace. Below I detail how this may be achieved.&lt;/p&gt;
&lt;h1&gt;History: Why create interlinked namespaces?&lt;/h1&gt;
&lt;p&gt;First, we should quickly review the history of why so many administrators designed interlinked namespaces.&lt;/p&gt;
&lt;p&gt;In Windows Server 2003 (and earlier) versions of DFSN, domain-based namespaces were limited to hosting approximately 5,000 DFS folders per namespace. This limitation was simply due to how the Active Directory JET database engine stored a single binary value of an attribute. We now refer to this type of namespace as "Windows 2000 Server Mode". Standalone DFS namespaces (those stored locally in the registry of a single namespace server or server cluster) are capable of approximately 50,000 DFS folders per namespace. Administrators would therefore create thousands of folders in a standalone namespace and then &lt;a href="http://technet.microsoft.com/en-us/library/cc782417(WS.10).aspx"&gt;interlink&lt;/a&gt; (cascade) it with a domain-based namespace. This allowed for a single, easily identifiable entry point of the domain-based namespace and leveraged the capacity of the standalone namespaces.&lt;/p&gt;
&lt;p&gt;"&lt;a href="http://technet.microsoft.com/en-us/library/cc770287.aspx"&gt;Windows Server 2008 mode&lt;/a&gt;" namespaces allow for domain-based namespaces of many thousands of DFS folders per namespace (look &lt;a href="http://blogs.technet.com/b/filecab/archive/2009/08/22/windows-server-dfs-namespaces-performance-and-scalability.aspx"&gt;here&lt;/a&gt; for scalability test results). With many Active Directory deployments currently capable of supporting 2008 mode namespaces, Administrators are wishing to remove their dependency on the standalone namespaces and roll them up into a single domain-based namespace. Doing so will improve referral performance, improve fault-tolerance of the namespace, and ease administration.&lt;/p&gt;
&lt;h1&gt;How to consolidate the namespaces&lt;/h1&gt;
&lt;p&gt;Below are the steps required to consolidate one or more standalone namespaces into an existing domain-based namespace. The foremost goal of this process is to maintain identical UNC paths after the consolidation so that no configuration changes are needed for clients, scripts, or anything else that references the current interlinked namespace paths. Because so many design variations exist, you may only require a subset of the operations or you may have to repeat some procedures multiple times. If you are not concerned with maintaining identical UNC paths, then this blog does not really apply to you.&lt;/p&gt;
&lt;p&gt;For demonstration purposes, I will perform the consolidation steps on a namespace with the following configuration:&lt;/p&gt;
&lt;p style="margin-left: 36pt;"&gt;Domain-based Namespace: &lt;a href="file:///\\tailspintoys.com\data"&gt;\\tailspintoys.com\data&lt;/a&gt;&lt;br /&gt;DFS folder: "reporting" (targeting the standalone namespace "reporting" below)&lt;br /&gt;Standalone Namespace: &lt;a href="file:///\\server1\reporting"&gt;\\server1\reporting&lt;/a&gt;&lt;br /&gt;DFS folders: "report####" (totaling 10,000 folders)&lt;/p&gt;
&lt;p&gt;Below is what these namespaces look like in the DFS Management MMC.&lt;/p&gt;
&lt;p&gt;Domain Namespace DATA:&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/2772.020613_5F00_2051_5F00_Distributed1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Standalone Namespace "Reporting" hosted by server "FS1" and has 15,000 DFS folders:&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/5826.020613_5F00_2051_5F00_Distributed2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For a client to access a file in the "report8000" folder in the current DFS design, the client must access the following path: &lt;br /&gt;&lt;a href="file:///\\tailspintoys.com\data\reporting\report8000"&gt;\\tailspintoys.com\data\reporting\report8000&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/5123.020613_5F00_2051_5F00_Distributed3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Below are the individual elements of that UNC path with descriptions below each:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 127px;" /&gt;&lt;col style="width: 180px;" /&gt;&lt;col style="width: 192px;" /&gt;&lt;col style="width: 139px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: none;"&gt;
&lt;p style="text-align: center;"&gt;\\tailspintoys.com&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: none;"&gt;
&lt;p style="text-align: center;"&gt;\Data&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: none;"&gt;
&lt;p style="text-align: center;"&gt;\Reporting&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: none;"&gt;
&lt;p style="text-align: center;"&gt;\Reporting8000&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="background: white; padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;Domain&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: white; padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Domain-based Namespace&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #92d050; padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Domain-Based Namespace folder&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: none;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: none;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: none; border-right: solid 0.5pt;"&gt;&amp;nbsp;&lt;/td&gt;
&lt;td style="background: #d6e3bc; padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Standalone Namespace&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: white; padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Standalone Namespace folder targeting a file server share&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;Note the overlap of the domain-based namespace folder "reporting" (dark green) with the standalone namespace "reporting" (light green). Each item in the UNC path is separated by a "\" and is known as a "path component".&lt;/p&gt;
&lt;p&gt;In order to preserve the UNC path using a single domain-based namespace we must leverage the ability for DFSN to host multiple path components within a single DFS folder. Currently, the "reporting" DFS folder of the domain-based namespace refers clients to the standalone namespace that contains DFS folders, such as "reporting8000", beneath it. To consolidate those folders of the standalone root to the domain-based namespace, we must merge them together.&lt;/p&gt;
&lt;p&gt;To illustrate this, below is how the new consolidated "Data" domain-based namespace will be structured for this path:&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 127px;" /&gt;&lt;col style="width: 180px;" /&gt;&lt;col style="width: 331px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: none;"&gt;
&lt;p style="text-align: center;"&gt;&lt;a href="file:///\\tailspintoys.com"&gt;\\tailspintoys.com&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: none;"&gt;
&lt;p style="text-align: center;"&gt;\Data&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: none;"&gt;
&lt;p style="text-align: center;"&gt;\Reporting\Reporting8000&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Domain&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Domain-based Namespace&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #92d050; padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p&gt;Domain-based Namespace folder targeting a file server share&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;Notice how the name of the DFS folder is "Reporting\Reporting8000" and includes two path components separated by a "\". This capability of DFSN is what allows for the creation of any desired path. When users access the UNC path, they ultimately will still be referred to the target file server(s) containing the shared data. "Reporting" is simply a placeholder serving to maintain that original path component.&lt;/p&gt;
&lt;h1&gt;Step-by-step&lt;/h1&gt;
&lt;p&gt;Below are the steps and precautions for consolidating interlinked namespaces. It is highly recommended to put a temporary suspension on any administrative changes to the standalone namespace(s).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Assumptions:&lt;/strong&gt; &lt;br /&gt;The instructions assume that you have already met the &lt;a href="http://technet.microsoft.com/en-us/library/cc770287.aspx"&gt;requirements&lt;/a&gt; for "Windows Server 2008 mode" namespaces and your domain-based namespace is currently running in "Windows 2000 Server mode".&lt;/p&gt;
&lt;p&gt;However, if you have not met these requirements and have a "Windows 2000 Server mode" domain-based namespace, these instructions (with modifications) may still be applied &lt;strong&gt;*if*&lt;/strong&gt; after consolidation the domain-based namespace configuration data is less than 5 MB in size. If you are unsure of the size, you may run the "dfsutil /root:\\&amp;lt;servername&amp;gt;\&amp;lt;namespace_name&amp;gt; /view" command against the standalone namespace and note the size listed at the top (or bottom) of the output. The reported size will be added to the current size of the domain-based namespace and must not exceed 5 MB. Cease any further actions if you are unsure, or test the operations in a lab environment. Of course, if your standalone namespace size was less than 5 MB in size, then why did you create a interlinked namespace to begin with? Eh&amp;hellip;I'm not really supposed to ask these questions. Moving on&amp;hellip;&lt;/p&gt;
&lt;h3&gt;Step 1&lt;/h3&gt;
&lt;p&gt;Export the standalone namespace.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Courier New;"&gt;Dfsutil root export &lt;a href="file:///\\fs1\reporting"&gt;\\fs1\reporting&lt;/a&gt; c:\exports\reporting_namespace.txt &lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Step 2&lt;/h3&gt;
&lt;p&gt;Modify the standalone namespace export file using a text editor capable of search-and-replace operations. Notepad.exe has this capability. This export file will be leveraged later to create the proper folders within the domain-based namespace.&lt;br /&gt;&lt;br /&gt;Replace the "Name" element of the standalone namespace with the name of the domain-based namespace and replace the "Target" element to be the UNC path of the domain-based namespace server (the one you will be configuring later in step 6). Below, I highlighted the single "&lt;a href="file:///\\FS1\reporting"&gt;\\FS1\reporting&lt;/a&gt;" 'name' element that will be replaced with "&lt;a href="file:///\\TAILSPINTOYS.COM\DATA"&gt;\\TAILSPINTOYS.COM\DATA&lt;/a&gt;". The single "&lt;a href="file:///\\FS1\reporting"&gt;\\FS1\reporting&lt;/a&gt;" element immediately below it will be replaced with "&lt;a href="file:///\\DC1\DATA"&gt;\\DC1\DATA&lt;/a&gt;" as "DC1" is my namespace server.&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/7266.020613_5F00_2051_5F00_Distributed4.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;Next, prepend "Reporting\" to the folder names listed in the export. The final result will be as follows:&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/8662.020613_5F00_2051_5F00_Distributed5.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;One trick is to utilize the 'replace' capability of Notepad.exe to search out and replace all instances of the '&amp;lt;Link Name="' string with '&amp;lt;Link Name="folder\' ('&amp;lt;Link Name="Reporting\' in this example). The picture below shows the original folders defined and the 'replace' dialog responsible for changing the names of the folders (click 'Replace all' to replace all occurrences).&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/8662.020613_5F00_2051_5F00_Distributed6.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;Save the modified file with a new filename (reporting_namespace_modified.txt) so as to not overwrite the standalone namespace export file.&lt;/p&gt;
&lt;h3&gt;Step 3&lt;/h3&gt;
&lt;p&gt;Export the domain-based namespace&lt;br /&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;dfsutil root export &lt;a href="file:///\\tailspintoys.com\data"&gt;\\tailspintoys.com\data&lt;/a&gt; c:\exports\data_namespace.txt&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;Step 4&lt;/h3&gt;
&lt;p&gt;Open the output file from Step 3 and delete the link that is being consolidated ("Reporting"):&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/4530.020613_5F00_2051_5F00_Distributed7.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Save the file as a separate file (data_namespace_modified.txt). This export will be utilized to recreate the &lt;strong&gt;*other*&lt;/strong&gt; DFS folders within the "Windows Server 2008 Mode" domain-based namespace that do not require consolidation.&lt;/p&gt;
&lt;h3&gt;Step 5&lt;/h3&gt;
&lt;p&gt;This critical step involves deleting the existing domain-based namespace. This is required for the conversion from "Windows 2000 Server Mode" to "Windows Server 2008 Mode".&lt;/p&gt;
&lt;p&gt;Delete the domain-based namespace ("DATA" in this example).&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/4530.020613_5F00_2051_5F00_Distributed8.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Step 6&lt;/h3&gt;
&lt;p&gt;Recreate the "DATA" namespace, specifying the mode as "Windows Server 2008 mode". Specify the namespace server to be a namespace server with close network proximity to the domain's PDC. This will significantly decrease the time it takes to import the DFS folders. Additional namespace servers may be added any time after Step 8.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/2308.020613_5F00_2051_5F00_Distributed9.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Step 7&lt;/h3&gt;
&lt;p&gt;Import the modified export file created in Step 4:&lt;br /&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;dfsutil root import merge data_namespace_modified.txt \\tailspintoys.com\data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this example, this creates the "Business" and "Finance" DFS folders:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/2476.020613_5F00_2051_5F00_Distributed10.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Step 8&lt;/h3&gt;
&lt;p&gt;Import the modified namespace definition file created in Step 2 to create the required folders (note that this operation may take some time depending on network latencies and other factors):&lt;br /&gt;&lt;span style="font-family: Courier New; font-size: 10pt;"&gt;dfsutil root import merge reporting_namespace_modified.txt &lt;a href="http://blogs.technet.com/controlpanel/blogs/posteditor.aspx/\\tailspintoys.com\DATA"&gt;\\tailspintoys.com\DATA&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/7266.020613_5F00_2051_5F00_Distributed11.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Step 9&lt;/h3&gt;
&lt;p&gt;Verify the structure of the namespace:&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/0333.020613_5F00_2051_5F00_Distributed12.png" alt="" /&gt;&lt;/p&gt;
&lt;h3&gt;Step 10&lt;/h3&gt;
&lt;p&gt;Test the functionality of the namespace. From a client or another server, run the "dfsutil /pktflush" command to purge cached referral data and attempt access to the DFS namespace paths. Alternately, you may reboot clients and attempt access if they do not have dfsutil.exe available.&lt;br /&gt;&lt;br /&gt;Below is the result of accessing the "report8000" folder path via the new namespace: &lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/8662.020613_5F00_2051_5F00_Distributed13.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;Referral cache confirms the new namespace structure (red line highlighting the name of the DFS folder as "reporting\report8000"):&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/5432.020613_5F00_2051_5F00_Distributed14.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;At this point, you should have a fully working namespace. If something is not working quite right or there are problems accessing the data, you may return to the original namespace design by deleting all DFS folders in the new domain-based namespace and importing the original namespace from the export file (or recreating the original folders by hand). At no time did we alter the standalone namespaces, so returning to the original interlinked configuration is very easy to accomplish.&lt;/p&gt;
&lt;h3&gt;Step 11&lt;/h3&gt;
&lt;p&gt;Add the necessary namespace servers to the domain-based namespace to increase fault tolerance.&lt;/p&gt;
&lt;p&gt;Notify all previous administrators of the standalone namespace(s) that they will need to manage the domain-based namespace from this point forward. Once you confident with the new namespace, the original standalone namespace(s) may be retired at any time (assuming no systems on the network are using UNC paths directly to the standalone namespace).&lt;/p&gt;
&lt;h3&gt;Namespace already in "Windows Server 2008 mode"?&lt;/h3&gt;
&lt;p&gt;What would the process be if the domain-based namespace is already running in "Windows Server 2008 mode"? Or, you have already run through the operations once and wish to consolidate additional DFS folders? Some steps remain the same while others are skipped entirely: &lt;br /&gt;&lt;strong&gt;Steps 1-2&lt;/strong&gt; (same as detailed previously to export the standalone namespace and modify the export file) &lt;br /&gt;&lt;strong&gt;Step 3&lt;/strong&gt; Export the domain-based namespace for backup purposes&lt;br /&gt;&lt;strong&gt;Step 4&lt;/strong&gt; Delete the DFS folder targeting the standalone namespace--the remainder of the domain-based namespace will remain unchanged&lt;br /&gt;&lt;strong&gt;Step 8 &lt;/strong&gt;Import the modified file created in step 2 to the domain-based namespace&lt;br /&gt;&lt;strong&gt;Step 9-10&lt;/strong&gt; Verify the structure and function of the namespace&lt;/p&gt;
&lt;h1&gt;Caveats and Concerns&lt;/h1&gt;
&lt;p&gt;Ensure that no data exists in the original standalone namespace server's namespace share. Because clients are now no longer using the standalone namespace, the "reporting" path component exists as a subfolder within each domain-based namespace server's share. Furthermore, hosting data within the namespace share (domain-based or standalone) is not recommended. If this applies to you, consider moving such data into a separate folder within the new namespace and update any references to those files used by clients.&lt;/p&gt;
&lt;p&gt;These operations should be performed during a maintenance window. The length of which is dictated by your efficiency in performing the operations and the length of time it takes to import the DFS namespace export file. Because a namespace is so easily built, modified, and deleted, you may wish to consider a "dry run" of sorts. Prior to deleting your production namespace(s), create a new test namespace (e.g. "DataTEST"), modify your standalone namespace export file (Step 2) to reference this "DataTEST" namespace and try the import. Because you are using a separate namespace, no changes will occur to any other production namespaces. You may gauge the time required for the import, and more importantly, test access to the data (&lt;a href="file:///\\tailspintoys.com\DataTEST\Reporting\Reporting8000"&gt;\\tailspintoys.com\&lt;span style="background-color: yellow;"&gt;DataTEST&lt;/span&gt;\Reporting\Reporting8000&lt;/a&gt; in my example). If access to the data is successful, then you will have confidence in replacing the real domain-based namespace.&lt;/p&gt;
&lt;p&gt;Clients should not be negatively affected by the restructuring as they will discover the new hierarchy automatically. By default, clients cache namespace referrals for 5 minutes and folder referrals for 30 minutes. It is advisable to keep the standalone namespace(s) operational for at least an hour or so to accommodate transition to the new namespace, but it may remain in place for as long as you wish. &lt;br /&gt;&lt;br /&gt;If you decommission the standalone namespace and find some clients are still using it directly, you could easily recreate the standalone namespace from our export in Step 1 while you investigate the client configurations and remove their dependency on it.&lt;/p&gt;
&lt;p&gt;Lastly, if you are taking the time and effort to recreate the namespace for "Windows Server 2008 mode" support, you might as well consider configuring the targets of the DFS folders with DNS names (modify the export files) and also implementing &lt;a href="http://support.microsoft.com/kb/244380"&gt;DFSDnsConfig&lt;/a&gt; on the namespace servers.&lt;/p&gt;
&lt;p&gt;I hope this blog eliminates some of the concerns and fears of consolidating interlinked namespaces!&lt;/p&gt;
&lt;p&gt;Dave "King" Fisher&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3550908" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/DFSN/">DFSN</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Dave+Fisher/">Dave Fisher</category></item><item><title>Configuring Change Notification on a MANUALLY created Replication partner</title><link>http://blogs.technet.com/b/askds/archive/2013/01/21/configuring-change-notification-on-a-manually-created-replication-partner.aspx</link><pubDate>Mon, 21 Jan 2013 08:37:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3547029</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3547029</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3547029</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/01/21/configuring-change-notification-on-a-manually-created-replication-partner.aspx#comments</comments><description>&lt;p&gt;Hello. &lt;a href="http://blogs.technet.com/b/askds/archive/tags/jim+tierney/"&gt;Jim&lt;/a&gt; here again to elucidate on the wonderment of change notification as it relates to Active Directory replication within and between sites. As you know Active Directory replication between domain controllers within the same site (intrasite) happens instantaneously. Active Directory replication between sites (intersite) occurs every 180 minutes (3 hours) by default. You can adjust this frequency to match your specific needs BUT it can be no faster than fifteen minutes when configured via the AD Sites and Services snap-in.&lt;/p&gt;
&lt;p&gt;Back in the old days when remote sites were connected by a string and two soup cans, it was necessary in most cases to carefully consider configuring your replication intervals and times so as not to flood the pipe (or string in the reference above) with replication traffic and bring your WAN to a grinding halt. With dial up connections between sites it was even more important. It remains an important consideration today if your site is a ship at sea and your only connectivity is a satellite link that could be obscured by a cloud of space debris.&lt;/p&gt;
&lt;p&gt;Now in the days of wicked fast fiber links and MPLS VPN Connectivity, change notification may be enabled between site links that can span geographic locations. This will make Active Directory replication instantaneous between the separate sites as if the replication partners were in the same site. Although this is well documented on TechNet and I hate regurgitating existing content, here is how you would configure change notification on a site link:&lt;/p&gt;
&lt;ol style="margin-left: 43pt;"&gt;
&lt;li&gt;Open ADSIEdit.msc.&lt;/li&gt;
&lt;li&gt;In ADSI Edit, expand the Configuration container.&lt;/li&gt;
&lt;li&gt;Expand Sites, navigate to the Inter-Site Transports container, and select CN=IP.&lt;br /&gt;&lt;br /&gt;Note: You cannot enable change notification for SMTP links.&lt;/li&gt;
&lt;li&gt;Right-click the site link object for the sites where you want to enable change notification, e.g. CN=DEFAULTSITELINK, click Properties.&lt;/li&gt;
&lt;li&gt;In the Attribute Editor tab, double click on Options.&lt;/li&gt;
&lt;li&gt;If the Value(s) box shows &amp;lt;not set&amp;gt;, type 1.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/3644.012113_5F00_0837_5F00_Configuring1.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;There is one caveat however. Change notification will fail with manual connection objects. If your connection objects are not created by the KCC the change notification setting is meaningless. If it's a manual connection object, it will NOT inherit the Options bit from the Site Link. Enjoy your 15 minute replication latency.&lt;/p&gt;
&lt;p&gt;Why would you want to keep connection objects you created manually, anyway? Why don't you just let the KCC do its thing and be happy? Maybe you have a Site Link costing configuration that you would rather not change. Perhaps you are at the mercy of your networking team and the routing of your network and you must keep these manual connections. If, for whatever reason you must keep the manually created replication partners, be of good cheer. You can still enjoy the thrill of change notification.&lt;/p&gt;
&lt;p&gt;Change Notification on a manually created replication partner is configured by doing the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open ADSIEDIT.msc.&lt;/li&gt;
&lt;li&gt;In ADSI Edit, expand the Configuration container.&lt;/li&gt;
&lt;li&gt;Navigate to the following location:&lt;br /&gt;&lt;br /&gt;\Sites\SiteName\Server\NTDS settings\connection object that was manually created&lt;/li&gt;
&lt;li&gt;Right-click on the manually created connection object name.&lt;/li&gt;
&lt;li&gt;In the Attribute Editor tab, double click on Options.&lt;/li&gt;
&lt;li&gt;If the value is 0 then set it to 8.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/6874.012113_5F00_0837_5F00_Configuring2.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;If the value is anything other than zero, you must do some binary math. Relax; this is going to be fun.&lt;/p&gt;
&lt;p&gt;On the Site Link object, it's the 1st bit that controls change notification. On the Connection object, however, it's the 4th bit. The 4th bit is highlighted in &lt;span style="color: red;"&gt;&lt;strong&gt;RED &lt;/strong&gt;&lt;/span&gt;below represented in binary (You remember binary don't you???)&lt;/p&gt;
&lt;div&gt;
&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;col style="width: 71px;" /&gt;&lt;/colgroup&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;Binary Bit&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;8th&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;7th&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;6th&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;5th&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: #ffc000; padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;4th&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;3rd&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;2nd&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;1st&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;Decimal Value&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;128&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;64&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;32&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;16&lt;/p&gt;
&lt;/td&gt;
&lt;td style="background: red; padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;8&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;4&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;2&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"&gt;
&lt;p style="text-align: center;"&gt;1&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NOTE: The values represented by each bit in the Options attribute are documented in the &lt;a href="http://msdn.microsoft.com/en-us/library/cc223546.aspx"&gt;Active Directory Technical Specification&lt;/a&gt;. Fair warning! I'm only including that information for the curious. I STRONGLY recommend against setting any of the options NOT discussed specifically in existing documentation or blogs in your production environment.&lt;/p&gt;
&lt;p&gt;Remember what I said earlier? If it's a manual connection object, it will NOT inherit the Options value from the Site Link object. You're going to have to enable change notifications directly on the manually created connection object.&lt;/p&gt;
&lt;p&gt;Take the value of the Options attribute, let's say it is 16.&lt;/p&gt;
&lt;p&gt;Open Calc.exe in Programmer mode, and paste the contents of your options attribute.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/7457.012113_5F00_0837_5F00_Configuring3.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click on Bin, and count over to the 4th bit starting from the right.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/0027.012113_5F00_0837_5F00_Configuring4.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;That's the bit that controls change notification on your manually created replication partner. As you can see, in this example it is zero (0), so change notifications are disabled.&lt;/p&gt;
&lt;p&gt;Convert back to decimal and add 8 to it.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/3644.012113_5F00_0837_5F00_Configuring5.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click on Bin, again.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/2664.012113_5F00_0837_5F00_Configuring6.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see above, the bit that controls change notification on the manually created replication partner is now 1. You would then change the Options value in ADSIEDIT from 16 to 24.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/5807.012113_5F00_0837_5F00_Configuring7.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Click on Ok to commit the change.&lt;/p&gt;
&lt;p&gt;Congratulations! You have now configured change notification on your manually created connection object. This sequence of events must be repeated for each manually created connection object that you want to include in the excitement and instantaneous gratification of change notification. Keep in mind that in the event something (or many things) gets deleted from a domain controller, you no longer have that window of intersite latency to stop inbound replication on a downstream partner and do an authoritative restore. Plan the configuration of change notifications accordingly. Make sure you take regular backups, and test them occasionally!&lt;/p&gt;
&lt;p&gt;And when you speak of me, speak well&amp;hellip;&lt;/p&gt;
&lt;p&gt;Jim "&lt;a href="http://en.wikipedia.org/wiki/Tom_Sawyer_(song)"&gt;changes aren't permanent, but change is&lt;/a&gt;" Tierney&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3547029" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/AD+Replication/">AD Replication</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Jim+Tierney/">Jim Tierney</category></item><item><title>ADAMSync + (AD Recycle Bin OR searchFlags) = "FUN"</title><link>http://blogs.technet.com/b/askds/archive/2013/01/09/adamsync-ad-recycle-bin-or-searchflags-quot-fun-quot.aspx</link><pubDate>Wed, 09 Jan 2013 15:59:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3544946</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3544946</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3544946</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/01/09/adamsync-ad-recycle-bin-or-searchflags-quot-fun-quot.aspx#comments</comments><description>&lt;p&gt;&lt;span style="color: black;"&gt;Hello again ADAMSyncers! &lt;a href="http://blogs.technet.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.technet.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.technet.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.technet.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; &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.technet.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.technet.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.technet.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.technet.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!&amp;nbsp;&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.technet.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.technet.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.technet.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.technet.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.technet.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.technet.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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;&lt;strong&gt;Value&lt;/strong&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;1 (0x00000001)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;2 (0x00000002)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;4 (0x00000004)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;16 (0x00000010)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;32 (0x00000020)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;Supported beginning with Windows Server&amp;nbsp;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-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&gt;
&lt;p&gt;64(0x00000040)&lt;/p&gt;
&lt;/td&gt;
&lt;td style="padding-top: 3px; padding-left: 4px; padding-bottom: 3px; padding-right: 4px; border: none;"&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.technet.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;&amp;nbsp;&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;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3544946" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/AD+LDS/">AD LDS</category><category domain="http://blogs.technet.com/b/askds/archive/tags/AD+Recycle+Bin/">AD Recycle Bin</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Disaster+Recovery/">Disaster Recovery</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Kim+Nichols/">Kim Nichols</category></item><item><title>Intermittent Mail Sack: Must Remember to Write 2013 Edition</title><link>http://blogs.technet.com/b/askds/archive/2013/01/07/intermittent-mail-sack-must-remember-to-write-2013-edition.aspx</link><pubDate>Tue, 08 Jan 2013 01:58:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3544588</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3544588</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3544588</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2013/01/07/intermittent-mail-sack-must-remember-to-write-2013-edition.aspx#comments</comments><description>&lt;p&gt;Hi all, &lt;a href="http://blogs.technet.com/b/askds/archive/tags/jonathan+stephens/"&gt;Jonathan&lt;/a&gt; here again with the latest edition of the Intermittent Mail Sack. We've had some great questions over the last few weeks so I've got a lot of material to cover. This sack, we answer questions on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#_Question"&gt;Issues upgrading DFSR hub servers to Windows Server 2012&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#_Question_1"&gt;AD FS Sign-out behavior&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#_Question_2"&gt;Dynamic Access Control and DFSR&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#_Question_3"&gt;Machine account password resets and Macs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#_Question_4"&gt;Windows 7 cached logons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#_Question_5"&gt;DES encryption in Kerberos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#_Question_6"&gt;Certificate renewal with CEP/CES&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before we get started, however, I wanted to share information about a new service available to Premier customers through &lt;a href="http://www.microsoft.com/microsoftservices/en/us/premier_support.aspx"&gt;Microsoft Services Premier Support&lt;/a&gt;. Many Premier customers will be familiar with the Risk Assessment Program (RAP). Premier Support is now rolling out an online offering called the &lt;a href="https://services.premier.microsoft.com/raas"&gt;RAP as a Service (or &lt;strong&gt;RaaS&lt;/strong&gt; for short)&lt;/a&gt;. Our colleagues over on the Premier Field Engineering (PFE) blog have just posted a &lt;a href="http://blogs.technet.com/b/mspfe/archive/2013/01/07/introducing-rap-as-a-service-raas-from-premier-services.aspx"&gt;description of the new offering&lt;/a&gt;, and I encourage you to check it out. I've been working on the Active Directory RaaS offering since the early beta, and we've gotten really good feedback. Unfortunately, the offering is not yet available to non-Premier customers; look at RaaS as yet one more benefit to a Premier Support contract.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/3187.010813_5F00_0158_5F00_Intermitten1.jpg" alt="" width="530" height="373" /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now on to the Mail Sack!&lt;/p&gt;
&lt;h2&gt;&lt;a name="#_Question"&gt;&lt;/a&gt;Question&lt;/h2&gt;
&lt;p&gt;I'm considering upgrading my DFSR hub servers to Server 2012. Is there anything I should know before I hit the easy button and do an upgrade?&lt;/p&gt;
&lt;h2&gt;Answer&lt;/h2&gt;
&lt;p&gt;The most important thing to note is that Microsoft strongly discourages mixing Windows Server 2012 and legacy operating system DFSR. You just mentioned upgrading your hub servers, and make no mention of any branch servers. If you're going to upgrade your DFSR servers then you should upgrade all of them.&lt;/p&gt;
&lt;p&gt;Check out Ned's post over on the FileCab blog: &lt;a href="http://blogs.technet.com/b/filecab/archive/2012/11/12/dfs-replication-improvements-in-windows-server-2012.aspx"&gt;DFS Replication Improvements in Windows Server&lt;/a&gt;. Specifically, review the section that discusses Dynamic Access Control Support.&lt;/p&gt;
&lt;p&gt;Also, there is a minor issue that has been found that we are still tracking. When you upgrade from Windows Server 2008 R2 to Windows Server 2012 the DFS Management snap-in stops working. The workaround is to just uninstall and then reinstall the DFS Management tools:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5554.DFSR-Roels.jpg"&gt;&lt;img src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02/5554.DFSR-Roels.jpg" alt="" width="455" height="364" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also do this with PowerShell:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Uninstall-WindowsFeature -name RSAT-DFS-Mgmt-Con&lt;br /&gt;Install-WindowsFeature -name RSAT-DFS-Mgmt-Con &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;a name="#_Question_1"&gt;&lt;/a&gt;Question&lt;/h2&gt;
&lt;p&gt;From our SharePoint site, when users click on log-off then they get sent to this page: https://your_sts_server/adfs/ls/?wa=wsignout1.0.&lt;/p&gt;
&lt;p&gt;We configured the FedAuth cookie to be session based after we did this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$sts = Get-SPSecurityTokenServiceConfig &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;$sts.UseSessionCookies = $true &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;$sts.Update() &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The problem is, unless the user closes all their browsers then when they go to the log-in page the browser remembers their credentials. This is not acceptable for some PC's are shared by people. Also, closing all browsers is not acceptable as they run multiple web applications.&lt;/p&gt;
&lt;h2&gt;Answer&lt;/h2&gt;
&lt;p&gt;(Courtesy of &lt;a href="http://social.technet.microsoft.com/Profile/adam%20conkle%20-%20msft/activity"&gt;Adam Conkle&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Great question! I hope the following details help you in your deployment:&lt;/p&gt;
&lt;p&gt;Moving from a persistent cookie to a session cookie with SharePoint 2010 was the right move in this scenario in order to guarantee that closing the browser window would terminate the session with SharePoint 2010.&lt;/p&gt;
&lt;p&gt;When you sign out via SharePoint 2010 and are redirected to the STS URL containing the query string: wa=wsignout1.0, this is what we call a WS-Federation sign-out request. This call is sufficient for signing out of the STS as well as all relying parties signed into during the session.&lt;/p&gt;
&lt;p&gt;However, what you are experiencing is expected behavior for how Integrated Windows Authentication (IWA) works with web browsers. If your web browser client experienced either a no-prompt sign-in (using Kerberos authentication for the currently signed in user), or NTLM, prompted sign-in (provided credentials in a Windows Authentication "401" credential prompt), then the browser will remember the Windows credentials for that host for the duration of the browser session.&lt;/p&gt;
&lt;p&gt;If you were to collect a HTTP headers trace (Fiddler, HTTPWatch, etc.) of the current scenario, you will see that the wa=wsignout1.0 request is actually causing AD FS and SharePoint 2010 (and any other RPs involved) to clean up their session cookies (MSISAuth and FedAuth) as expected. The session is technically ending the way it should during sign-out. However, if the client keeps the current browser session open, browsing back to the SharePoint site will cause a new WS-Federation sign-in request to be sent to AD FS (wa=wsignin1.0). When the sign-in request is sent to AD FS, AD FS will attempt to collect credentials with a HTTP 401, but, this time, the browser has a set of Windows credentials ready to provide to that host.&lt;/p&gt;
&lt;p&gt;The browser provides those Windows credentials without a prompt shown to the user, and the user is signed back into AD FS, and, thus, is signed back into SharePoint 2010. To the naked eye, it appears that sign-out is not working properly, while, in reality, the user is signing out and then signing back in again.&lt;/p&gt;
&lt;p&gt;To conclude, this is by-design behavior for web browser clients. There are two workarounds available:&lt;/p&gt;
&lt;h3&gt;Workaround 1&lt;/h3&gt;
&lt;p&gt;Switch to forms-based authentication (FBA) for the AD FS Federation Service. The following article details this quick and easy process: AD FS 2.0: How to Change the Local Authentication Type&lt;/p&gt;
&lt;h3&gt;Workaround 2&lt;/h3&gt;
&lt;p&gt;Instruct your user base to always close their web browser when they have finished their session&lt;/p&gt;
&lt;h2&gt;&lt;a name="#_Question_2"&gt;&lt;/a&gt;Question&lt;/h2&gt;
&lt;p&gt;Are the attributes for files and folders used by Dynamic Access Control are replicated with the object? That is, using DFSR, if I replicate the file to another server which uses the same policy will the file have the same effective permissions on it?&lt;/p&gt;
&lt;h2&gt;Answer&lt;/h2&gt;
&lt;p&gt;(Courtesy of &lt;a href="http://blogs.technet.com/b/askds/archive/tags/jonathan+stephens/mike+stephens/"&gt;Mike Stephens&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Let me clarify some aspects of your question as I answer each part&lt;/p&gt;
&lt;p&gt;When enabling &lt;a href="http://technet.microsoft.com/en-us/video/windows8-dynamic-access-control.aspx"&gt;Dynamic Access Control&lt;/a&gt; on files and folders there are multiple aspects to consider that are stored on the files and folders.&lt;/p&gt;
&lt;h3&gt;Resource Properties&lt;/h3&gt;
&lt;p&gt;Resource Properties are defined in AD and used as a template to stamp additional metadata on a file or folder that can be used during an authorization decision. That information is stored in an alternate data stream on the file or folder. This would replicate with the file, the same as the security descriptor.&lt;/p&gt;
&lt;h3&gt;Security Descriptor&lt;/h3&gt;
&lt;p&gt;The security descriptor replicates with the file or folder. Therefore, any conditional expression would replicate in the security descriptor.&lt;/p&gt;
&lt;p&gt;All of this occurs outside of Dynamic Access Control -- it is a result of replicating the file throughout the topology, for example, if using DFSR. Central Access Policy has nothing to do with these results.&lt;/p&gt;
&lt;h3&gt;Central Access Policy&lt;/h3&gt;
&lt;p&gt;Central Access Policy is a way to distribute permissions without writing them directly to the DACL of a security descriptor. So, when a Central Access Policy is deployed to a server, the administrator must then link the policy to a folder on the file system. This linking is accomplished by inserting a special ACE in the auditing portion of the security descriptor informs Windows that the file/folder is protected by a Central Access Policy. The permissions in the Central Access Policy are then combined with Share and NTFS permissions to create an effective permission.&lt;/p&gt;
&lt;p&gt;If the a file/folder is replicated to a server that does not have the Central Access Policy deployed to it then the Central Access Policy is not valid on that server. The permissions would not apply.&lt;/p&gt;
&lt;h2&gt;&lt;a name="#_Question_3"&gt;&lt;/a&gt;Question&lt;/h2&gt;
&lt;p&gt;I read the post located &lt;a href="http://blogs.technet.com/b/askds/archive/2009/02/15/test2.aspx"&gt;here&lt;/a&gt; regarding the machine account password change in Active Directory.&lt;/p&gt;
&lt;p&gt;Based on what I read, if I understand this correctly, the machine password change is generated by the client machine and not AD. I have been told, (according to this post, inaccurately) that AD requires this password reset or the machine will be dropped from the domain.&lt;/p&gt;
&lt;p&gt;I am a Macintosh systems administrator, and as you probably know, this issue does indeed occur on Mac systems.&lt;/p&gt;
&lt;p&gt;I have reset the password reset interval to be various durations from fourteen days which is the default, to one day.&lt;/p&gt;
&lt;p&gt;I have found that if I disjoin and rejoin the machine to the domain it will generate a new password and work just fine for 30 days. At that time, it will be dropped from the domain and have to be rejoined. This is not 100% of the time, however it is often enough to be a problem for us as we are a higher education institution which in addition to our many PCs, also utilizes a substantial number of Macs. Additionally, we have a script which runs every 60 days to delete machine accounts from AD to keep it clean, so if the machine has been turned off for more than 60 days, the account no longer exists.&lt;/p&gt;
&lt;p&gt;I know your forte is AD/Microsoft support, however I was hoping that you might be able to offer some input as to why this might fail on the Macs and if there is any solution which we could implement.&lt;/p&gt;
&lt;p&gt;Other Mac admins have found workarounds like eliminating the need for the pw reset or exempting the macs from the script, but our security team does not want to do this.&lt;/p&gt;
&lt;h2&gt;Answer&lt;/h2&gt;
&lt;p&gt;(Courtesy of &lt;a href="http://blogs.technet.com/b/askds/archive/tags/jonathan+stephens/mike+stephens/"&gt;Mike Stephens&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;Windows has a security policy feature named &lt;strong&gt;Domain member: Disable machine account password change&lt;/strong&gt;, which determines whether the domain member periodically changes its computer account password. Typically, a mac, linux, or unix operating system uses some version of Samba to accomplish domain interoperability. I'm not familiar with these on the mac; however, in linux, you would use the command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Net ads changetrustpw &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;By default, Windows machines initiate a computer password change every 30 days. You could schedule this command to run every 30 days once it completes successfully. Beyond that, basically we can only tell you how to disable the domain controller from accepting computer password changes, which we do not encourage.&lt;/p&gt;
&lt;h2&gt;&lt;a name="#_Question_4"&gt;&lt;/a&gt;Question&lt;/h2&gt;
&lt;p&gt;I recently installed a new server running Windows 2008 R2 (as a DC) and a handful of client computers running Windows 7 Pro. On a client, which is shared by two users (userA and userB), I see the following event on the Event Viewer after userA logged on.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Event ID: 45058 &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Source: LsaSrv &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Level: Information &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Description: &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;A logon cache entry for user userB@domain.local was the oldest entry and was removed. The timestamp of this entry was 12/14/2012 08:49:02. &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All is working fine. Both userA and userB are able to log on on the domain by using this computer. Do you think I have to worry about this message or can I just safely ignore it?&lt;/p&gt;
&lt;p&gt;Fyi, our users never work offline, only online.&lt;/p&gt;
&lt;h2&gt;Answer&lt;/h2&gt;
&lt;p&gt;By default, a Windows operating system will cache 10 domain user credentials locally. When the maximum number of credentials is cached and a new domain user logs onto the system, the oldest credential is purged from its slot in order to store the newest credential. This LsaSrv informational event simply records when this activity takes place. Once the cached credential is removed, it does not imply the account cannot be authenticated by a domain controller and cached again.&lt;/p&gt;
&lt;p&gt;The number of "slots" available to store credentials is controlled by:&lt;/p&gt;
&lt;p&gt;Registry path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon &lt;br /&gt;Setting Name: CachedLogonsCount &lt;br /&gt;Data Type: REG_SZ&lt;br /&gt;Value: Default value = 10 decimal, max value = 50 decimal, minimum value = 1&lt;/p&gt;
&lt;p&gt;Cached credentials can also be managed with group policy by configuring:&lt;/p&gt;
&lt;p&gt;Group Policy Setting path: Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Security Options.&lt;br /&gt;Group Policy Setting: Interactive logon: Number of previous logons to cache (in case domain controller is not available)&lt;/p&gt;
&lt;p&gt;The workstation the user must have physical connectivity with the domain and the user must authenticate with a domain controller to cache their credentials again once they have been purged from the system.&lt;/p&gt;
&lt;p&gt;I suspect that your CachedLogonsCount value has been set to 1 on these clients, meaning that that the workstation can only cache one user credential at a time.&lt;/p&gt;
&lt;h2&gt;&lt;a name="#_Question_5"&gt;&lt;/a&gt;Question&lt;/h2&gt;
&lt;p&gt;In Windows 7 and Server 2008 Kerberos DES encryption is disabled by default.&lt;/p&gt;
&lt;p&gt;At what point will support for DES Kerberos encryption be removed? Does this happen in Windows 8 or Windows Server 2012, or will it happen in a future version of Windows?&lt;/p&gt;
&lt;h2&gt;Answer&lt;/h2&gt;
&lt;p&gt;DES is still available as an option on Windows 8 and Windows Server 2012, though it is disabled by default. It is too early to discuss the availability of DES in future versions of Windows right now.&lt;/p&gt;
&lt;p&gt;There was an &lt;a href="http://www.cnss.gov/Assets/pdf/cnssam-ia-2-04.pdf"&gt;Advisory Memorandum&lt;/a&gt; published in 2005 by the Committee on National Security Systems (CNSS) where DES and all DES-based systems (3DES, DES-X) would be retired for all US Government uses by 2015. That memorandum, however, is not necessarily a binding document. It is expected that 3DES/DES-X will continue to be used in the private sector for the foreseeable future.&lt;/p&gt;
&lt;p&gt;I'm afraid that we can't completely eliminate DES right now. All we can do is push it to the back burner in favor of newer and better algorithms like AES.&lt;/p&gt;
&lt;h2&gt;&lt;a name="#_Question_6"&gt;&lt;/a&gt;Question&lt;/h2&gt;
&lt;p&gt;I have two Issuing certification authorities in our corporate network. All our approved certificate templates are published on both issuing CAs. We would like to enable certificate renewals from Internet with our Internet-facing CEP/CES configured for certificate authentication in Certificate Renewal Mode Only. What we understand from the &lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/7734.certificate-enrollment-web-services-in-active-directory-certificate-services.aspx"&gt;whitepaper&lt;/a&gt; is that it's not going to work when the CA that issues the certificate must be the same CA used for certificate renewal.&lt;/p&gt;
&lt;h2&gt;Answer&lt;/h2&gt;
&lt;p&gt;First, I need to correct an assumption made based on your reading of the whitepaper. There is no requirement that, when a certificate is renewed, the renewal request be sent to the same CA as that that issued the original certificate. This means that your clients can go to either enrollment server to renew the certificate. Here is the process for renewal:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;When the user attempts to renew their certificate via the MMC, Windows sends a request to the Certificate Enrollment Policy (CEP) server URL configured on the workstation. This request includes the template name of the certificate to be renewed.&lt;/li&gt;
&lt;li&gt;The CEP server queries Active Directory for a list of CAs capable of issuing certificates based on that template. This list will include the Certificate Enrollment Web Service (CES) URL associated with that CA. Each CA in your environment should have one or more instances of CES associated with it.&lt;/li&gt;
&lt;li&gt;The list of CES URLs is returned to the client. This list is unordered.&lt;/li&gt;
&lt;li&gt;The client randomly selects a URL from the list returned by the CEP server. This random selection ensures that renewal requests are spread across all returned CAs. In your case, if both CAs are configured to support the same template, then if the certificate is renewed 100 times, either with or without the same key, then that should result in a nearly 50/50 distribution between the two CAs.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The behavior is slightly different if one of your CAs goes down for some reason. In that case, should clients encounter an error when trying to renew a certificate against one of the CES URIs then the client will failover and use the next CES URI in the list. By having multiple CAs and CES servers, you gain high availability for certificate renewal.&lt;/p&gt;
&lt;h2&gt;Other Stuff&lt;/h2&gt;
&lt;p&gt;I'm very sad that I didn't see this until after the holidays. It definitely would have been on my Christmas list. A little pricey, but totally geek-tastic.&lt;/p&gt;
&lt;p&gt;&lt;iframe src="http://www.youtube.com/embed/N7BhREqhOc8?feature=player_detailpage" frameborder="0" width="640" height="360"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;This was also on my list, this year. Go Science!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.geekalerts.com/i-survived-the-mayan-apocalypse-t-shirt/"&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/8468.010813_5F00_0158_5F00_Intermitten2.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please do keep those questions coming. We have another post in the hopper going up later in the week, and soon I hope to have some Windows Server 2012 goodness to share with you. From all of us on the Directory Services team, have a happy and prosperous New Year!&lt;/p&gt;
&lt;p&gt;Jonathan "13&lt;sup&gt;th&lt;/sup&gt; baktun" Stephens&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3544588" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/DFSR/">DFSR</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Kerberos/">Kerberos</category><category domain="http://blogs.technet.com/b/askds/archive/tags/PKI/">PKI</category><category domain="http://blogs.technet.com/b/askds/archive/tags/SYSVOL/">SYSVOL</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Passwords/">Passwords</category><category domain="http://blogs.technet.com/b/askds/archive/tags/ADFS/">ADFS</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Silly+Rabbit/">Silly Rabbit</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Windows+Server+2008+R2/">Windows Server 2008 R2</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Windows+7/">Windows 7</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Other+Blogs/">Other Blogs</category><category domain="http://blogs.technet.com/b/askds/archive/tags/NTLM/">NTLM</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Jonathan+Stephens/">Jonathan Stephens</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Mike+Stephens/">Mike Stephens</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Adam+Conkle/">Adam Conkle</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Windows+8/">Windows 8</category><category domain="http://blogs.technet.com/b/askds/archive/tags/windows+server+2012/">windows server 2012</category></item><item><title>Revenge of Y2K and Other News</title><link>http://blogs.technet.com/b/askds/archive/2012/11/27/revenge-of-y2k-and-other-news.aspx</link><pubDate>Tue, 27 Nov 2012 15:31:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3534950</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3534950</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3534950</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2012/11/27/revenge-of-y2k-and-other-news.aspx#comments</comments><description>&lt;p&gt;Hello sports fans!&lt;/p&gt;
&lt;p&gt;So this has been a bit of a hectic time for us, as I'm sure you can imagine. Here's just some of the things that have been going on around here.&lt;/p&gt;
&lt;p&gt;Last week, thanks to a failure on the time servers at USNO.NAVY.MIL, many customers experienced a time rollback to CY 2000 on their Active Directory domain controllers. Our team worked closely with the folks over at Premier Field Engineering to explain the problem, document resolutions for the various issues that might arise, and describe how to inoculate your DCs against a similar problem in the future. If you were affected by this problem then you need to read this post. If you weren't affected, and want to know why, then you need to read this post. Basically, we think you need to read this post. So...here's the link to the &lt;a href="http://blogs.technet.com/b/askpfeplat/archive/2012/11/23/fixing-when-your-domain-traveled-back-in-time-the-great-system-time-rollback-to-the-year-2000.aspx" target="_blank"&gt;AskPFEPlat blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In other news, Ned Pyle has successfully infiltrated the Product Group and has started blogging on &lt;a href="http://blogs.technet.com/b/filecab/" target="_blank"&gt;The Storage Team&lt;/a&gt; blog. His first post is up, and I'm sure there will be many more to follow. If you've missed Ned's rare blend of technical savvy and sausage-like prose, and you have an interest in Microsoft's DFSR and other storage technologies, then go &lt;a href="http://blogs.technet.com/b/filecab/archive/2012/11/12/dfs-replication-improvements-in-windows-server-2012.aspx" target="_blank"&gt;check him out&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally...you've probably noticed the lack of activity here on the AskDS blog. Truthfully, that's been the result of a confluence of events -- Ned's departure, the Holiday season here in the US, and the intense interest in Windows 8 and Windows Server 2012 (and subsequent support calls). Never fear, however! I'm pleased to say that your questions to the blog have been coming in quite steadily, so this week I'll be posting an omnibus edition of the Mail Sack. We also have one or two more posts that will go up between now and the end of the year, so there's that to look forward to. Starting with the new calendar year, we'll get back to a semi-regular posting schedule as we get settled and build our queue of posts back up.&lt;/p&gt;
&lt;p&gt;In the mean time, if you have questions about anything you see on the blog, don't hesitate to &lt;a href="http://blogs.technet.com/b/askds/contact.aspx"&gt;contact us&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Jonathan "time to make the donuts" Stephens&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3534950" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/DFSR/">DFSR</category><category domain="http://blogs.technet.com/b/askds/archive/tags/time/">time</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Jonathan+Stephens/">Jonathan Stephens</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Ned+Pyle/">Ned Pyle</category></item><item><title>ADAMSync 101</title><link>http://blogs.technet.com/b/askds/archive/2012/11/12/adamsync-101.aspx</link><pubDate>Mon, 12 Nov 2012 22:04:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3532059</guid><dc:creator>Jonathan Stephens, MSFT</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/rsscomments.aspx?WeblogPostID=3532059</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/askds/commentapi.aspx?WeblogPostID=3532059</wfw:comment><comments>http://blogs.technet.com/b/askds/archive/2012/11/12/adamsync-101.aspx#comments</comments><description>&lt;p&gt;Hi Everyone, &lt;a href="http://blogs.technet.com/b/askds/archive/tags/kim+nichols/"&gt;Kim Nichols&lt;/a&gt; here again, and this time I have an introduction to ADAMSync. I take a lot of cases on ADAM and AD LDS and have seen a number of problems arise from less than optimally configured ADAMSync XML files. There are many sources of information on ADAM/AD LDS and ADAMSync (I'll include links at the end), but I still receive lots of questions and cases on configuring ADAM/AD LDS for ADAMSync.&lt;/p&gt;
&lt;p&gt;We'll start at the beginning and talk about what ADAM/AD LDS is, what ADAMSync is and then finally how you can get AD LDS and ADAMSync working in your environment.&lt;/p&gt;
&lt;h2&gt;What is ADAM/AD LDS?&lt;/h2&gt;
&lt;p&gt;ADAM (Active Directory Application Mode) is the 2003 name for AD LDS (Active Directory Lightweight Directory Services). AD LDS is, as the name describes, a lightweight version of Active Directory. It gives you the capabilities of a multi-master LDAP directory that supports replication without some of the extraneous features of an Active Directory domain controller (domains and forests, Kerberos, trusts, etc.). AD LDS is used in situations where you need an LDAP directory but don't want the administration overhead of AD. Usually it's used with web applications or SQL databases for authentication. Its schema can also be fully customized without impacting the AD schema.&lt;/p&gt;
&lt;p&gt;AD LDS uses the concept of instances, similar to that of instances in SQL. What this means is one AD LDS server can run multiple AD LDS instances (databases). This is another differentiator from Active Directory: a domain controller can only be a domain controller for one domain. In AD LDS, each instance runs on a different set of ports. The default instance of AD LDS listens on 389 (similar to AD).&lt;/p&gt;
&lt;p&gt;Here's some more information on AD LDS if you're new to it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc732019.aspx"&gt;AD LDS Installed Help&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/cc770639(WS.10).aspx"&gt;Active Directory Lightweight Directory Services (AD LDS) Getting Started Step-by-Step Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc754361(WS.10).aspx"&gt;Active Directory Lightweight Directory Services Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc725665(WS.10).aspx"&gt;AD LDS Backup and Restore Step-by-Step Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc816635(WS.10).aspx"&gt;Active Directory Lightweight Directory Services Operations Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What is ADAMSync?&lt;/h2&gt;
&lt;p&gt;In many scenarios, you may want to store user data in AD LDS that you can't or don't want to store in AD. Your application will point to the AD LDS instance for this data, but you probably don't want to manually create all of these users in AD LDS when they already exist in AD. If you have Forefront Identity Manager (FIM), you can use it to synchronize the users from AD into AD LDS and then manually populate the AD LDS specific attributes through LDP, ADSIEdit, or a custom or 3rd party application. If you don't have FIM, however, you can use ADAMSync to synchronize data from your Active Directory to AD LDS.&lt;/p&gt;
&lt;p&gt;It is important to remember that ADAMSync DOES NOT synchronize user passwords! If you want the AD LDS user account to use the same password as the AD user, then userproxy transformation is what you need. (That's a topic for another day, though. I'll include links at the end for userproxy.)&lt;/p&gt;
&lt;p&gt;ADAMSync uses an XML file that defines which data will synchronize from AD to AD LDS. The XML file includes the AD partition from which to synchronize, the object types (classes or categories), and attributes to synchronize. This file is loaded into the AD LDS database and used during ADAMSync synchronization. Every time you make changes to the XML file, you must reload the XML file into the database.&lt;/p&gt;
&lt;p&gt;In order for ADAMSync to work:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;strong&gt;MS-AdamSyncMetadata.LDF&lt;/strong&gt; file must be imported into the schema of the AD LDS instance prior to attempting to install the XML file. This LDF creates the classes and attributes for storing the ADAMSync.xml file.&lt;/li&gt;
&lt;li&gt;The schema of the AD LDS instance must already contain all of the object classes and attributes that you will be syncing from AD to AD LDS. In other words, you can't sync a user object from AD to AD LDS unless the AD LDS schema contains the User class and all of the attributes that you specify in the ADAMSync XML (we'll talk more about this next). There is a &lt;a href="http://technet.microsoft.com/en-us/magazine/2009.04.schema.aspx?pr=blog"&gt;blog post&lt;/a&gt; on using ADSchemaAnalyzer to compare the AD schema to the AD LDS schema and export the differences to an LDF file that can be imported into AD LDS.&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Unless you plan on modifying the schema of the AD LDS instance, your instance should be named DC=&amp;lt;partition name&amp;gt;, DC=&amp;lt;com or local or whatever&amp;gt; and not CN=&amp;lt;partition name&amp;gt;. Unfortunately, the example in the AD LDS setup wizard uses CN= for the partition name.&amp;nbsp; If you are going to be using ADAMSync, you should disregard that example and use DC= instead.&amp;nbsp; The reason behind this change is that the default schema does not allow an organizationalUnit (OU) object to have a parent object of the Container (CN) class. Since you will be synchronizing OUs from AD to AD LDS and they will need to be child objects of your application partition head, you will run into problems if your application partition is named CN=.&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/2055.111212_5F00_2204_5F00_ADAMSync1011.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;Obviously, this limitation is something you can change in the AD LDS schema, but simply naming your partition with &lt;strong&gt;DC=&lt;/strong&gt; name component will eliminate the need to make such a change. In addition, you won't have to remember that you made a change to the schema in the future.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The best advice I can give regarding ADAMSync is to keep it as simple as possible to start off with. The goal should be to get a basic XML file that you know will work, gradually add attributes to it, and troubleshoot issues one at a time. If you try to do too much (too wide of object filter or too many attributes) in the XML from the beginning, you will likely run into multiple issues and not know where to begin in troubleshooting.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/KISS_principle"&gt;&lt;strong&gt;KEEP IT SIMPLE!!!&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;MS-AdamSyncConf.xml&lt;/h2&gt;
&lt;p&gt;Let's take a look at the default XML file that Microsoft provides and go through some recommendations to make it more efficient and less prone to issues. The file is named MS-AdamSyncConf.XML and is typically located in the %windir%\ADAM directory.&lt;/p&gt;
&lt;p style="background: #d9d9d9;"&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;doc&amp;gt;&lt;br /&gt; &amp;lt;configuration&amp;gt;&lt;br /&gt; &amp;lt;description&amp;gt;sample Adamsync configuration file&amp;lt;/description&amp;gt;&lt;br /&gt; &amp;lt;security-mode&amp;gt;object&amp;lt;/security-mode&amp;gt;&lt;br /&gt; &amp;lt;source-ad-name&amp;gt;fabrikam.com&amp;lt;/source-ad-name&amp;gt; &amp;lt;------ 1&lt;br /&gt; &amp;lt;source-ad-partition&amp;gt;dc=fabrikam,dc=com&amp;lt;/source-ad-partition&amp;gt; &amp;lt;------ 2&lt;br /&gt; &amp;lt;source-ad-account&amp;gt;&amp;lt;/source-ad-account&amp;gt; &amp;lt;------ 3&lt;br /&gt; &amp;lt;account-domain&amp;gt;&amp;lt;/account-domain&amp;gt; &amp;lt;------ 4&lt;br /&gt; &amp;lt;target-dn&amp;gt;dc=fabrikam,dc=com&amp;lt;/target-dn&amp;gt; &amp;lt;------ 5&lt;br /&gt; &amp;lt;query&amp;gt;&lt;br /&gt; &amp;lt;base-dn&amp;gt;dc=fabrikam,dc=com&amp;lt;/base-dn&amp;gt; &amp;lt;------ 6&lt;br /&gt; &amp;lt;object-filter&amp;gt;(objectClass=*)&amp;lt;/object-filter&amp;gt; &amp;lt;------ 7&lt;br /&gt; &amp;lt;attributes&amp;gt; &amp;lt;------ 8&lt;br /&gt; &amp;lt;include&amp;gt;&amp;lt;/include&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;extensionName&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;displayNamePrintable&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;flags&amp;lt;/exclude&lt;br /&gt; &amp;lt;exclude&amp;gt;isPrivelegeHolder&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;msCom-UserLink&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;msCom-PartitionSetLink&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;reports&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;serviceprincipalname&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;accountExpires&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;adminCount&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;primarygroupid&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;userAccountControl&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;codePage&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;countryCode&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;logonhours&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;exclude&amp;gt;lockoutTime&amp;lt;/exclude&amp;gt;&lt;br /&gt; &amp;lt;/attributes&amp;gt;&lt;br /&gt; &amp;lt;/query&amp;gt;&lt;br /&gt; &amp;lt;schedule&amp;gt;&lt;br /&gt; &amp;lt;aging&amp;gt;&lt;br /&gt; &amp;lt;frequency&amp;gt;0&amp;lt;/frequency&amp;gt;&lt;br /&gt; &amp;lt;num-objects&amp;gt;0&amp;lt;/num-objects&amp;gt;&lt;br /&gt; &amp;lt;/aging&amp;gt;&lt;br /&gt; &amp;lt;schtasks-cmd&amp;gt;&amp;lt;/schtasks-cmd&amp;gt;&lt;br /&gt; &amp;lt;/schedule&amp;gt; &amp;lt;------ 9&lt;br /&gt; &amp;lt;/configuration&amp;gt;&lt;br /&gt; &amp;lt;synchronizer-state&amp;gt;&lt;br /&gt; &amp;lt;dirsync-cookie&amp;gt;&amp;lt;/dirsync-cookie&amp;gt;&lt;br /&gt; &amp;lt;status&amp;gt;&amp;lt;/status&amp;gt;&lt;br /&gt; &amp;lt;authoritative-adam-instance&amp;gt;&amp;lt;/authoritative-adam-instance&amp;gt;&lt;br /&gt; &amp;lt;configuration-file-guid&amp;gt;&amp;lt;/configuration-file-guid&amp;gt;&lt;br /&gt; &amp;lt;last-sync-attempt-time&amp;gt;&amp;lt;/last-sync-attempt-time&amp;gt;&lt;br /&gt; &amp;lt;last-sync-success-time&amp;gt;&amp;lt;/last-sync-success-time&amp;gt;&lt;br /&gt; &amp;lt;last-sync-error-time&amp;gt;&amp;lt;/last-sync-error-time&amp;gt;&lt;br /&gt; &amp;lt;last-sync-error-string&amp;gt;&amp;lt;/last-sync-error-string&amp;gt;&lt;br /&gt; &amp;lt;consecutive-sync-failures&amp;gt;&amp;lt;/consecutive-sync-failures&amp;gt;&lt;br /&gt; &amp;lt;user-credentials&amp;gt;&amp;lt;/user-credentials&amp;gt;&lt;br /&gt; &amp;lt;runs-since-last-object-update&amp;gt;&amp;lt;/runs-since-last-object-update&amp;gt;&lt;br /&gt; &amp;lt;runs-since-last-full-sync&amp;gt;&amp;lt;/runs-since-last-full-sync&amp;gt;&lt;br /&gt; &amp;lt;/synchronizer-state&amp;gt;&lt;br /&gt;&amp;lt;/doc&amp;gt; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Let's go through the default XML file by number and talk about what each section does, why the defaults are what they are, and what I typically recommend when working with customers.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;source-ad-name&amp;gt;fabrikam.com&amp;lt;/source-ad-name&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;Replace fabrikam.com with the FQDN of the domain/forest that will be your synchronization source&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;source-ad-partition&amp;gt;dc=fabrikam,dc=com&amp;lt;/source-ad-partition&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;Replace dc=fabrikam,dc=com with the DN of the AD partition that will be the source for the synchronization&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;source-ad-account&amp;gt;&amp;lt;/source-ad-account&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;Contains the account that will be used to authenticate to the source forest/domain. If left empty, the credentials of the logged on user will be used&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;account-domain&amp;gt;&amp;lt;/account-domain&amp;gt;&lt;/span&gt;&amp;nbsp;&lt;/div&gt;
&lt;p&gt;Contains the domain name to use for authentication to the source domain/forest. This element combined with &amp;lt;source-ad-account&amp;gt; make up the domain\username that will be used to authenticate to the source domain/forest. If left empty, the domain of the logged on user will be used.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt; &amp;lt;target-dn&amp;gt;dc=fabrikam,dc=com&amp;lt;/target-dn&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;Replace dc=fabrikam,dc=com with the DN of the AD LDS partition you will be synchronizing to.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; In 2003 ADAM, you were able to specify a sub-ou or container of the of the ADAM partition, for instance OU=accounts,dc=fabrikam,dc=com. This is not possible in 2008+ AD LDS. You must specify the head of the partition, dc=fabrikam,dc=com. This is publicly documented &lt;a href="http://technet.microsoft.com/en-us/library/cc794836(WS.10).aspx"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;base-dn&amp;gt;dc=fabrikam,dc=com&amp;lt;/base-dn&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;Replace dc=fabrikam,dc=com with the base DN of the container in AD that you want to synchronize objects from.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You can specify multiple base DNs in the XML file, but it is important to note that due to the way the dirsync engine works the entire directory will still be scanned during synchronization. This can lead to unexpectedly long synchronization times and output in the adamsync.log file that is confusing. The short of this this is that even though you are limiting where to synchronize objects from, it doesn't reduce your synchronization time and you will see entries in the adamsync.log file that indicate objects being processed but not written. This can make it appear as though ADAMSync is not working correctly if your directory is large but you are syncing is a small percentage of the directory. Also, the log will grow and grow, but it may take a long time for objects to begin to appear in AD LDS. This is because the entire directory is being enumerated, but only a portion is being synchronized.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;object-filter&amp;gt;(objectClass=*)&amp;lt;/object-filter&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;The object filter determines which objects will be synchronized from AD to AD LDS. While objectClass=* will get you everything, do you really want or need EVERYTHING? Consider the amount of data you will be syncing and the security implications of having everything duplicated in AD LDS. If you only care about user objects, then don't sync computers and groups.&lt;br /&gt;&lt;br /&gt;The filter that I generally recommend as a starting point is:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;(&amp;amp;#124;(objectCategory=Person)(objectCategory=OrganizationalUnit))&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Rather than &lt;em&gt;objectClass=User&lt;/em&gt;, I recommend &lt;em&gt;objectCategory=Person&lt;/em&gt;. But, why, you ask? I'll tell you :-) If you've ever looked that the class of a computer object, you'll notice that it contains an objectClass of user.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/2330.111212_5F00_2204_5F00_ADAMSync1012.png" alt="" /&gt;&lt;br /&gt;&lt;br /&gt;What this means to ADAMSync is that if I specify an object filter of &lt;em&gt;objectClass=user&lt;/em&gt;, ADAMSync will synchronize &lt;strong&gt;users&lt;/strong&gt; and &lt;strong&gt;computers&lt;/strong&gt; (and &lt;strong&gt;contact&lt;/strong&gt; objects and anything else that inherits from the User class). However, if I use &lt;em&gt;objectCategory=Person&lt;/em&gt;, I only get actual user objects. Pretty neat, eh?&lt;br /&gt;&lt;br /&gt;So, what does this &lt;strong&gt;&amp;amp;#124;&lt;/strong&gt; mean and why include &lt;em&gt;objectCategory=OrganizationalUnit&lt;/em&gt;? The literal &lt;strong&gt;&amp;amp;#124;&lt;/strong&gt; is the XML representation of the &lt;strong&gt;|&lt;/strong&gt; (pipe) character which represents a logical OR. True, I've seen customers just use the &lt;strong&gt;|&lt;/strong&gt; character in the XML file and not have issues, but I always use the XML rather than the &lt;strong&gt;|&lt;/strong&gt; just to be certain that it gets translated properly when loaded into the AD LDS instance. If you need to use an AND rather than an OR, the XML for &lt;strong&gt;&amp;amp;&lt;/strong&gt; is &lt;strong&gt;&amp;amp;amp;&lt;/strong&gt;. &lt;br /&gt;&lt;br /&gt;You need &lt;em&gt;objectCategory=OrganizationalUnit&lt;/em&gt; so that objects that are moved within AD get synchronized properly to AD LDS. If you don't specify this, the OUs that contain objects within scope of the object filter will be created on the initial creation of the object in AD LDS. But, if that object is ever MOVED in the source AD, ADAMSync won't be able to synchronize that object to the new location. Moving an object changes the full DN of the object. Since we aren't syncing the OUs the object just "disappears" from an ADAMSync perspective and never gets updated/moved.&lt;br /&gt;&lt;br /&gt; If you need groups to be synchronized as well you can add &lt;em&gt;(objectclass=group)&lt;/em&gt; inside the outer parentheses and groups will also be synced.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;(&amp;amp;#124;(objectCategory=Person)(objectCategory=OrganizationalUnit)(objectClass=Group))&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;attributes&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;The attributes section is where you define which attributes to synchronize for the object types defined in the &amp;lt;object-filter&amp;gt;.&lt;br /&gt;&lt;br /&gt;You can either use the &amp;lt;include&amp;gt;&amp;lt;/include&amp;gt; or &amp;lt;exclude&amp;gt;&amp;lt;/exclude&amp;gt; tabs, but you cannot use both.&lt;br /&gt;&lt;br /&gt;The default XML file provided by Microsoft takes the high ground and uses the &amp;lt;exclude&amp;gt;&amp;lt;/exclude&amp;gt; tags which really means include all attributes except the ones that are explicitly defined within the &amp;lt;exclude&amp;gt;&amp;lt;/exclude&amp;gt; element. While this approach guarantees that you don't miss anything important, it can also lead to a lot of headaches in troubleshooting.&lt;br /&gt;&lt;br /&gt;If you've ever looked at an AD user account in ADSIEdit (especially in an environment with Exchange), you'll notice there are hundreds of attributes defined. Keeping to my earlier advice of "keep it simple", every attribute you sync adds to the complexity.&lt;br /&gt;&lt;br /&gt;When you use the &amp;lt;exclude&amp;gt;&amp;lt;/exclude&amp;gt; tags you don't know what you are syncing; you only know what you are not syncing. If your application isn't going to use the attribute then there is no reason to copy that data to AD LDS. Additionally, there are some attributes and classes that just won't sync due to how the dirsync engine works. I'll include the list as I know it at the end of the article. Every environment is different in terms of which schema updates have been made and which attributes are being used. Also, as I mentioned earlier, if your AD LDS schema does not contain the object classes and attributes that you have defined in your ADAMSync XML file you're your synchronization will die in a big blazing ball of flame.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/5483.111212_5F00_2204_5F00_ADAMSync1013.jpg" alt="" /&gt; &lt;br /&gt;&lt;span style="font-size: 8pt;"&gt;&lt;strong&gt;Whoosh!!&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;A typical attributes section to start out with is something like this: &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style="background: #d9d9d9;"&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;&amp;lt;include&amp;gt;objectSID&amp;lt;/include&amp;gt; &amp;lt;----- only needed for userproxy&lt;br /&gt;&amp;lt;include&amp;gt;userPrincipalName&amp;lt;/include&amp;gt; &amp;lt;----- must be unique in AD LDS instance&lt;br /&gt;&amp;lt;include&amp;gt;displayName&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;givenName&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;sn&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;physicalDeliveryOfficeName&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;telephoneNumber&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;mail&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;title&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;department&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;manager&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;mobile&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;include&amp;gt;ipPhone&amp;lt;/include&amp;gt;&lt;br /&gt;&amp;lt;exclude&amp;gt;&amp;lt;/exclude&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Initially, you may even want to remove userPrincipalName, just to verify that you can get a sync to complete successfully. Synchronization issues caused by the userPrincipalName attribute are among the most common ADAMSync issues I see. Active Directory allows multiple accounts to have the same userPrincipalName, but &lt;strong&gt;ADAMSync will not sync an object if it has the same userPrincipalName of an object that already exists in the AD LDS database.&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;If you want to be a superhero and find duplicate UPNs in your AD before you attempt ADAMSync, here's a nifty csvde command that will generate a comma-delimited file that you can run through Excel's "Highlight duplicates" formatting options (or a script if you are a SUPER-SUPERHERO) to find the duplicates.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;csvde -f upn.csv -s localhost:389 -p subtree -d "DC=fabrikam,DC=com" -r "(objectClass=user)" -l sAMAccountName,userPrincipalName&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Remember, you are targeting your AD with this command, so the localhost:389 implies that the command is being run on the DC. You'll need to replace "DC=fabrikam, DC=com" with your AD domain's DN.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;/schedule&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;After &amp;lt;/schedule&amp;gt; is where you would insert the elements to do user proxy transformation. In the References section, I've included links that explain the purpose and configuration of userproxy. The short version is that you can use this section of code to create userproxy objects rather than AD LDS user class objects. Userproxy objects are a special class of user that links back to an Active Directory domain account to allow the AD LDS user to utilize the password of their corresponding user account in AD. It is NOT a way to logon on to AD from an external network. It is a way to allow an application that utilizes AD LDS as its LDAP directory to authenticate a user via the same password they have in AD. Communication between AD and AD LDS is required for this to work and the application that is requesting the authentication does not receive a Kerberos ticket for the user. &lt;br /&gt;&lt;br /&gt;Here is an example of what you would put after &amp;lt;/schedule&amp;gt; and before &amp;lt;/configuration&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt; background-color: #d9d9d9;"&gt;&amp;lt;user-proxy&amp;gt;&lt;br /&gt; &amp;lt;source-object-class&amp;gt;user&amp;lt;/source-object-class&amp;gt;&lt;br /&gt; &amp;lt;target-object-class&amp;gt;userProxyFull&amp;lt;/target-object-class&amp;gt;&lt;br /&gt;&amp;lt;/user-proxy&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Installing the XML file&lt;/h2&gt;
&lt;p&gt;OK! That was fun, wasn't it? Now that we have an XML file, how do we use it? This is covered in a lot of different materials, but the short version is we have to install it into the AD LDS instance. To install the file, run the following command from the ADAM installation directory (%windir%\ADAM):&lt;/p&gt;
&lt;p style="background: #d9d9d9;"&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Adamsync /install localhost:389 CustomAdamsync.xml &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The command above assumes you are running it on the AD LDS server, that the instance is running on port 389 and that the XML file is located in the path of the adamsync command.&lt;/p&gt;
&lt;p&gt;What does this do exactly, you ask? The adamsync install command copies the XML file contents into the configurationFile attribute on the AD LDS application partition head. You can view the attribute by connecting to the application partition via LDP or through ADSIEdit. This is a handy thing to know. You can use this to verify for certain exactly what is configured in the instance. Often there are several versions of the XML file in the ADAM directory and it can be difficult to know which one is being used. Checking the configurationFile attribute will tell you exactly what is configured. It won't tell you which XML file was used, but at least you will know the configuration.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/2018.111212_5F00_2204_5F00_ADAMSync1014.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The implication of this is that anytime you update the XML file you must reinstall it using the &lt;strong&gt;adamsync /install&lt;/strong&gt; command otherwise the version in the instance is not updated. I've made this mistake a number of times during troubleshooting!&lt;/p&gt;
&lt;h2&gt;Synchronizing with AD&lt;/h2&gt;
&lt;p&gt;Finally, we are ready to synchronize! Running the synchronization is the "easy" part assuming we've created a valid XML file, our AD LDS schema has all the necessary classes and attributes, and the source AD data is without issue (duplicate UPN is an example of a known issue).&lt;/p&gt;
&lt;p&gt;From the ADAM directory (typically %windir%\ADAM), run the following command:&lt;/p&gt;
&lt;p style="background: #d9d9d9;"&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Adamsync /sync localhost:389 "DC=fabrikam,DC=com" /log adamsync.log &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Again, we're assuming you are running the command on the AD LDS server and that the instance is running on port 389. The DN referenced in the command is the DN of your AD LDS application partition. /log is very important (you can name the log anything you want). You will need this log if there are any issues during the synchronization. The log will tell you which object failed and give you a &lt;span style="text-decoration: line-through;"&gt;cryptic&lt;/span&gt; "detailed" reason as to why. Below is an example of an error due to a duplicate UPN. This is one of the easier ones to understand.&lt;/p&gt;
&lt;p style="background: #d9d9d9;"&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;====================================================&lt;br /&gt;Processing Entry: Page 67, Frame 1, Entry 64, Count 1, USN 0 &lt;br /&gt;Processing source entry &amp;lt;guid=fe36238b9dd27a45b96304ea820c82d8&amp;gt; &lt;br /&gt;Processing in-scope entry fe36238b9dd27a45b96304ea820c82d8.&lt;br /&gt;&lt;br /&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;br /&gt;0: 0000217B: DSID-03050758, problem 1006 (ATT_OR_VALUE_EXISTS), data 0, Att 90290 (userPrincipalName)&lt;br /&gt;&lt;br /&gt;. Ldap error occurred. ldap_add_sW: Attribute Or Value Exists. Extended Info: 0000217B: AtrErr: DSID-03050758, #1: &lt;br /&gt;0: 0000217B: DSID-03050758, problem 1006 (ATT_OR_VALUE_EXISTS), data 0, Att 90290 (userPrincipalName)&lt;br /&gt;=============================================== &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;During the sync, if you are syncing from the Active Directory domain head rather than an OU or container, your objects should begin showing up in the AD LDS instance almost immediately. The objects don't synchronize in any order that makes sense to the human brain, so don't worry if objects are appearing in a random order. There is no progress bar or indication of how the sync is going other than fact that the log file is growing. When the sync completes you will be returned to the command prompt and your log file will stop growing.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-58-02-metablogapi/6131.111212_5F00_2204_5F00_ADAMSync1015.png" alt="" /&gt;&lt;/p&gt;
&lt;h2&gt;Did it work?&lt;/h2&gt;
&lt;p&gt;As you can see there is nothing on the command line nor are there any events in any Windows event log that indicate that the synchronization was successful. In this context, successful means completed without errors and all objects in scope, as defined in the XML file, were synchronized. The only way to determine if the synchronization was successful is to check the log file. This highlights the importance of generating the log. Additionally, it's a good idea to keep a reasonable number of past logs so if the sync starts failing at some point you can determine approximately when it started occurring. Management likes to know things like this.&lt;/p&gt;
&lt;p&gt;Since you'll probably be automating the synchronization (easy to do with a scheduled task) and not running it manually, it's a good idea to set up a reminder to periodically check the logs for issues. If you've never looked at a log before, it can be a little intimidating if there are a lot of objects being synchronized. The important thing to know is that if the sync was successful, the bottom of the log will contain a section similar to the one below:&lt;/p&gt;
&lt;p style="background: #d9d9d9;"&gt;&lt;span style="font-family: Lucida Console; font-size: 10pt;"&gt;Updating the configuration file DirSync cookie with a new value.&lt;br /&gt;&lt;br /&gt;Beginning processing of deferred dn references.&lt;br /&gt;Finished processing of deferred dn references.&lt;br /&gt;&lt;br /&gt;Finished (successful) synchronization run.&lt;br /&gt;Number of entries processed via dirSync: 16&lt;br /&gt;Number of entries processed via ldap: 0&lt;br /&gt;Processing took 4 seconds (0, 0).&lt;br /&gt;Number of object additions: 3&lt;br /&gt;Number of object modifications: 13&lt;br /&gt;Number of object deletions: 0&lt;br /&gt;Number of object renames: 2&lt;br /&gt;Number of references processed / dropped: 0, 0&lt;br /&gt;Maximum number of attributes seen on a single object: 9&lt;br /&gt;Maximum number of values retrieved via range syntax: 0&lt;br /&gt;&lt;br /&gt;Beginning aging run.&lt;br /&gt;Aging requested every 0 runs. We last aged 2 runs ago.&lt;br /&gt;Saving Configuration File on DC=instance1,DC=local&lt;br /&gt;Saved configuration file.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If your log just stops without a section similar to the one above, then the last entry will indicate an error similar to the one above for the duplicate UPN.&lt;/p&gt;
&lt;h2&gt;Conclusion and other References&lt;/h2&gt;
&lt;p&gt;That covers the basics of setting up ADAMSync! I hope this information makes the process more straight forward and gives you some tips for getting it to work the first time! The most important point I can make is to start very simple with the XML file and get something to work. You can always add more attributes to the file later, but if you start from broken it can be difficult to troubleshoot. Also, I highly recommend using &amp;lt;include&amp;gt; over &amp;lt;exclude&amp;gt; when specifying attributes to synchronize. This may be more work for your application team since they will have to know what their application requires, but it will make setting up the XML file and getting a successful synchronization much easier!&lt;/p&gt;
&lt;h3&gt;ADAMSync excluded objects&lt;/h3&gt;
&lt;p&gt;As I mentioned earlier, there are some attributes, classes and object types that ADAMSync will not synchronize. The items listed below are hard-coded not to sync. There is no way around this using ADAMSync. If you need any of these items to sync, then you will need to use LDIFDE exports, FIM, or some other method to synchronize them from AD to AD LDS. The scenarios where you would require any of these items are very limited and some of them are dealt with within ADAMSync by converting the attribute to a new attribute name (objectGUID to sourceObjectGUID).&lt;/p&gt;
&lt;h4&gt;Attributes&lt;/h4&gt;
&lt;p&gt;cn, currentValue, dBCSPwd, fSMORoleOwner, initialAuthIncoming, initialAuthOutgoing, isCriticalSystemObject, isDeleted, lastLogonTimeStamp, lmPwdHistory, msDS-ExecuteScriptPassword, ntPwdHistory, nTSecurityDescriptor, objectCategory, objectSid (except when being converted to proxy), parentGUID, priorValue, pwdLastSet, sAMAccountType, sIDHistory, supplementalCredentials, supplementalCredentials, systemFlags, trustAuthIncoming, trustAuthOutgoing, unicodePwd, whenChanged&lt;/p&gt;
&lt;h4&gt;Classes&lt;/h4&gt;
&lt;p&gt;crossRef, secret, trustedDomain, foreignSecurityPrincipal, rIDSet, rIDManager&lt;/p&gt;
&lt;h4&gt;Other&lt;/h4&gt;
&lt;p&gt;Naming Context heads, deleted objects, empty attributes, attributes we do not have permissions to read, objectGUIDs (gets transferred to sourceObjectGUID), objects with del-mangeled distinguished names (DEL:\)&lt;/p&gt;
&lt;h3&gt;Additional Goodies&lt;/h3&gt;
&lt;h4&gt;ADAMSync&lt;/h4&gt;
&lt;ul style="margin-left: 54pt;"&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc794836(WS.10).aspx"&gt;Synchronize with Active Directory Domain Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com-b-askds-archive-2009-01-20-determine-applied-schema-extensions-with-ad-ds-lds-schema-analyzer.aspx"&gt;Determine Applied Schema Extensions with AD DS/LDS Schema Analyzer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc783683(WS.10).aspx"&gt;ADAMSync Configuration File XML Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/magazine/2008.12.proxy.aspx?pr=blog"&gt;Active Directory Understanding Proxy Authentication in AD LDS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com/b/efleis/archive/2005/09/23/adamsync-can-also-transform-users-in-to-proxy-users.aspx"&gt;ADAMSync can also transform users in to proxy users&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;AD LDS Replication&lt;/h4&gt;
&lt;ul style="margin-left: 54pt;"&gt;
&lt;li&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc731246(WS.10).aspx"&gt;AD LDS Replication Step-by-Step Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com/b/askds/archive/2009/12/02/link-pairs-and-configuring-bridgeheads-in-adam-AD%20LDS.aspx"&gt;Link-Pairs and Configuring Bridgeheads in ADAM-AD&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Misc Blogs&lt;/h4&gt;
&lt;ul style="margin-left: 54pt;"&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com/b/askds/archive/2010/09/27/ad-lds-schema-files-demystified.aspx"&gt;AD LDS Schema Files&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com-b/askds/archive/2009/10/27/how-to-decommission-an-adam-AD%20LDS-server-and-add-additional-servers.aspx"&gt;How to Decommission an AD LDS server and add Additional Servers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com/b/idaguys/archive/2009/06/19/overiview-of-authentication-in-ad-lds.aspx"&gt;Overview of authentication mechanisms in AD LDS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com/b/askds/archive/2009/04/02/one-stop-audit-shop-for-adam-and-AD%20LDS.aspx"&gt;One stop Audit shop for ADAM and AD LDS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com/b/askds/archive/2008/09/18/service-connection-points-scps-and-adam-ad-lds.aspx"&gt;Service Connection Points (SCPs) and ADAM-AD LDS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa772124(v=vs.85).aspx"&gt;Directory Services API Element Differences (Windows)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blogs.technet.com/b/askds/archive/2009/09/14/windows-2008-r2-managing-ad-lds-using-the-ad-powershell-module.aspx"&gt;Windows 2008 R2 Managing AD LDS using the AD PowerShell Module&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;GOOD LUCK and ENJOY!&lt;/p&gt;
&lt;p&gt;Kim "Sync or swim" Nichols&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3532059" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/b/askds/archive/tags/AD+LDS/">AD LDS</category><category domain="http://blogs.technet.com/b/askds/archive/tags/Kim+Nichols/">Kim Nichols</category></item></channel></rss>