<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Reference Point</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/reference_point/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/reference_point/feed.xml</link>
    <description />
    <lastBuildDate>Thu, 26 Oct 2017 18:52:20 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>What's Hybrid Identity?</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/whats-hybrid-identity</link>
      <pubDate>Tue, 24 Oct 2017 00:56:33 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/?p=325</guid>
      <description><![CDATA[Hello everyone,

Now that I've got Azure AD, how can I take advantage of my investments on...]]></description>
      <content:encoded><![CDATA[Hello everyone,

Now that I've got Azure AD, how can I take advantage of my investments on ADDS?

This is the main use case for Azure AD, ie. to extend your on-prem Active Directory to the cloud by means of synchronizing your identities from ADDS to Azure AD.

Azure AD Connect is the tool that enables this synchronization.

Once your ADDS identities get synchronized to Azure AD your users may start accessing cloud services and apps using the same username/password as they use on-prem.

We offer flexibility here its not all or nothing, you don't have to sync every single identity and you may also have cloud only users.

The apps can be hosted anywhere from on-prem to the cloud, we offer sign-in solutions that cover most scenarios:
<ul>
 	<li>Password Synchronization</li>
 	<li>Pass-through Authentication (PTA)</li>
 	<li>Federation (ADFS)</li>
 	<li>Seamless SSO</li>
</ul>
Password sync allows sSO (same Sign On) user experience when accessing cloud apps, by synchronizing users and their passwords to Azure AD.

PTA gives you the ability to validate the users password on-prem without ADFS, this feature is built on top of the Azure AD application proxy and requires connectors/Agents to proxy requests to your Domain Controllers.

ADFS allows you to keep your users passwords under your control while offering true SSO authenticating your users on-Prem and manage trusts with other service and identity providers .

Last but not least seamless SSO which comes in two different flavors: Password Sync or PTA both providing true SSO without ADFS, password sync does NOT require a connector since passwords are synchronized while Seamless SSO with PTA requires a connector and a computer account for providing SSO from domain joined machines.

By using Azure AD Application proxy with the PingAccess add-on to publish your on-prem apps this functionality is can be extended to custom web apps thus providing a complete solution for most on-prem apps.

Hybrid ID is NOT extending your ADDS infrastructure to the cloud using Azure IaaS, however you may deploy Domain Controllers into Azure Virtual Machines as a Disaster Recovery site or additional branch 'office' provided the necessary connectivity to On-premises AD exists.

Hope it helps!

Paulo Francisco Viralhadas

Premier Field Engineer - Secure Infrastructure - Microsoft

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Why do I need Azure AD?</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/why-do-i-need-azure-ad</link>
      <pubDate>Mon, 23 Oct 2017 20:15:15 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/?p=306</guid>
      <description><![CDATA[This is an Ice breaker and a question I get all the time and I see it maybe in the same way an...]]></description>
      <content:encoded><![CDATA[This is an Ice breaker and a question I get all the time and I see it maybe in the same way an electrician would see it 100 years ago...

Today we all know about its benefits and mostly take it for granted however at that time only a few knew that electricity could become a... utility.

If you look at the applications you have been running On-Premises you may find Apps that authenticate users through Active Directory and others that will use customized methods and even store a separate set of identities to enable users access... the same way people would have a firewood or gas stove oven to cook their meals.

Ok. I'll stop with the analogies here... now my 10 questions are:
<ol>
 	<li>Are you only providing your users access to On-premises apps?</li>
 	<li>Would you like to manage a single set of Identities instead of having to manage separate Identity sources for each app, group of apps, customers or partners?</li>
 	<li>Would your users like to have to remember only one password to access all of their apps?</li>
 	<li>Do you or your users want to be able to securely and easily access those apps from any device, platform or location?</li>
 	<li>Are you using or planning to provide access to cloud apps and services - not only Azure Services and Office 365 apps but also non-Microsoft apps on any cloud?</li>
 	<li>Do you want to easily provision and de-provision users/groups access to those apps from any device, platform or location?</li>
 	<li>Do you require your users, devices and apps to be remotely managed, monitored and compliant with any industry regulation or data protection laws?</li>
 	<li>Do you need to provide highly secure access to your apps and protect your resources against advanced security threats?</li>
 	<li>Do you want to enable your customers and partners (consumers and enterprises) to seamlessly and securely sign-up and sign-in to your apps?</li>
 	<li>You want all of the above and have the control over who, when, where and how users access your resources (and data)?</li>
</ol>
If you answered NO to all the questions above then you can keep using your firewood or gas stove :) wood or gas it still serves a purpose and Azure AD is not a replacement for AD(DS) but a (huge) complement.

For everyone else be assured Azure AD is for you, so stay in tune and I promise that I will go over the main use cases in the next few posts.

Today Azure AD is the largest cloud Identity solution in the world providing identity management and access control to approximately 13 million organizations, including 1 billion users access to Microsoft and 3rd party Apps which makes 10 billion authentications per week!!!

If you have a scenario that has not been provided with a solution yet, we are probably already working on it and if not please talk to us, we are always listening and willing to help you achieve more.

Hope it helps!

Paulo Francisco Viralhadas

Premier Field Engineer - Secure Infrastructure - Microsoft

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Lingering Objects cleanup</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/lingering-objects-cleanup</link>
      <pubDate>Thu, 16 Oct 2014 02:06:23 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2014/10/16/lingering-objects-cleanup/</guid>
      <description><![CDATA[Recently I have been working with a premier customer in South Africa to cleanup their forest from...]]></description>
      <content:encoded><![CDATA[<p>Recently I have been working with a premier customer in South Africa to cleanup their forest from lingering objects.</p>
<p>It is a complex environment with 15 domains,30+ sites&nbsp;and 130+ DCs where power failures and network related issues frequently disrupt AD operations.</p>
<p>So&nbsp;I wanted to share with you the method I used to&nbsp;remove lingering objects and hopefully you find it useful somehow.</p>
<p>First download repldiag from <a href="https://activedirectoryutils.codeplex.com/releases/view/13664">https://activedirectoryutils.codeplex.com/releases/view/13664</a> as it will save you a lot of typing.</p>
<p>Then create a .bat file similar to the following:</p>
<p>/enable Strict Replication Consistency across the forest</p>
<p>repadmin /regkey * +strict</p>
<p>/dump all repldiag commands to a .txt file (repldiag enumerates all domains, finds all DCs and creates all necessary repadmin commands for removing lingering objects)</p>
<p>repldiag /removelingeringobjects /outputrepadmincommandlinesyntax &gt;output.txt</p>
<p>/dump domain specific repldiag commands to a .bat file (this way you may cleanup one domain at a time)</p>
<p>findstr &quot;domain_a&quot; output.txt &gt;domain_a.bat<br />(...)<br />findstr &quot;domain_n&quot; output.txt &gt;domain_n.bat</p>
<p>/call all .bat files in order to remove lingering objects</p>
<p><br />call domain_a.bat<br />(...)<br />call domain_n.bat</p>
<p>/Then run repadmin /showrepl against all DCs in each domain and pipe it to a .txt file</p>
<p>repadmin /showrepl *.domain_a /errorsonly &gt; domain_a.txt<br />(...)<br />repadmin /showrepl *.domain_n /errorsonly&gt; domain_n.txt</p>
<p>/Look for &quot;failed, result 8606 (0x219e): Insufficient attributes were given to create an object. This object may not exist because it may have been deleted and already garbage collected.&quot;</p>
<p>/Identify the destination DC (the DC logging the event), Source DC (the DC that contains lingering objects) and affected Naming Context (the NC that contains lingering objects)</p>
<p>/With the information above force replication to resume on the affected DCs/NCs</p>
<p>repadmin /replicate destination sourceGUID NC /force</p>
<p>as an example:</p>
<p>**output from showrepl**</p>
<p>Repadmin: running command /SHOWREPL against full DC <span style="background-color:#ffff99;"><strong>DC1.domain_a.fqdn</strong></span></p>
<p>site1\DC1</p>
<p>DSA Options: IS_GC</p>
<p>Site Options: (none)</p>
<p>DSA object GUID: aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa</p>
<p>DSA invocationID: zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz</p>
<p></p>
<p>==== INBOUND NEIGHBORS ======================================</p>
<p></p>
<p><span style="background-color:#99cc00;"><strong>DC=domain_n,DC=fqdn</strong></span></p>
<p>&nbsp;&nbsp;&nbsp; Site30\DC via RPC</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DSA object GUID: <span style="background-color:#ffcc00;"><strong>nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn</strong></span></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Last attempt @ 2014-10-16 10:55:42 failed, result 8606 (0x219e):</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Insufficient attributes were given to create an object. This object may not exist because it may have been deleted and already garbage collected.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 529 consecutive failure(s).</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Last success @ 2014-09-30 07:00:33.</p>
<p></p>
<p>In this example the command to force replication to resume&nbsp;would be</p>
<p>repadmin /replicate&nbsp;<span style="background-color:#ffff99;"><strong>DC1.domain_a.fqdn</strong></span> &nbsp;<span style="background-color:#ffcc00;"><strong>nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn</strong></span>&nbsp;<span style="background-color:#99cc00;"><strong>DC=domain_n,DC=fqdn </strong></span>/force</p>
<p></p>
<p>Hope it helps!</p>
<p>Paulo</p>
<p></p>
<p></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>How to prevent the creation of GPOs from outside AGPM (Advanced Group Policy Management)</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/how-to-prevent-the-creation-of-gpos-from-outside-agpm-advanced-group-policy-management</link>
      <pubDate>Wed, 21 Aug 2013 02:59:02 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2013/08/21/how-to-prevent-the-creation-of-gpos-from-outside-agpm-advanced-group-policy-management/</guid>
      <description><![CDATA[During my interactions with Premier Microsoft customers I have found out that the main reason for...]]></description>
      <content:encoded><![CDATA[During my interactions with Premier Microsoft customers I have found out that the main reason for not using AGPM (Advanced Group Policy Management) in order to enforce change control procedures on Group Policy management is the lack of information on how to prevent GPOs from being created or edited outside of AGPM.
Basically their experience tells them that any Domain/GPO admin will be able to use the normal GPMC (Group Policy Management Console) to create/edit GPOs thus bypassing the desired change control enforcement supposedly provided by AGPM. I am writing these lines to address that problem.

This post explains how to install and configure AGPM in order to prevent the creation of GPOs from outside AGPM.

AGPM is a plug-in for GPMC that provides the following features:

Offline editing
Change control
Role-based delegation
Search and filter capabilities
Cross-domain management (same forest)

AGPM can be found on the MDOP (Microsoft Desktop Optimization Pack) for Software Assurance.

To install the AGPM follow the steps below:

1. Create an AGPM Service Account
2. Add the AGPM Service Account to the following groups:
2.1. Group Policy Creator Owners
2.2. Backup Operators
2.3. Local Administrators (on the Client(s) and Server selected to install the AGPM Client and Server components respectively)
3. Install the AGPM Server component on the selected server.
4.1. Run the AGPM server installer
4.2. Select the Archive Path (can be a local folder or network share)
4.3. Select the AGPM Service Account under which the AGPM service will run.
4.4. Assign the Archive Owner/AGPM Administrator (Full Control) role to the Group (or individual User) that will have Full Control over AGPM thus will be able to assign AGPM roles and permissions to other Group Policy Administrators.
4.5. Select the port listener for AGPM service (default:4600)

NOTE: The AGPM Service Account requires (at least) the following permissions:
- Full Control to the AGPM Archive
- Full Control to %systemroot%\temp folder
- Full Control to existing GPOs

5. Install the AGPM Client component on the selected workstation.
5.1. Run AGPM client installer
5.2. Insert the AGPM Server and Port for connecting to the AGPM server service.

To prevent the creation of GPOs from outside AGPM do the following:

1. Remove All members (except the AGPM Service Account and the Archive Owner/AGPM Administrator) of the "Group Policy Creator Owners" group

To prevent changes of existing GPOs outside AGPM

1. Remove Domain Admins and Enterprise Admins permissions from every GPO in the domain.

NOTE: Domain Admins may re-add themselves permissions to all GPOs. Depending on your environment additional Groups may have to be removed from all GPOs. Ensure that Authenticated Users have Allow Read permissions and that target Groups have Allow Apply Group Policy. Also that you don't remove the AGPM Administrator account assigned in step 4.4.

In order to easy this task consider the use of GrantPermissionOnAllGPOs.wsf included in GPMCSampleScripts.msi which can be downloaded from <a href="https://www.microsoft.com/en-us/download/details.aspx?id=14536">https://www.microsoft.com/en-us/download/details.aspx?id=14536</a>
You may also find many other useful scripts there.

From now on the AGPM Administrator may configure e-mail notifications, control policies and manage roles and delegated permissions and approve requests via AGPM client without worrying about GPO admins circumventing change control with GPMC.

Hope it helps!]]></content:encoded>
    </item>
    <item>
      <title>Fine Grained Password Policies GUI in Windows Server 2012 ADAC</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/fine-grained-password-policies-gui-in-windows-server-2012-adac</link>
      <pubDate>Fri, 12 Apr 2013 05:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2013/04/12/fine-grained-password-policies-gui-in-windows-server-2012-adac/</guid>
      <description><![CDATA[Hello my name is Paulo Viralhadas and I'm a Premier Field Engineer at Microsoft.
Have you ever used...]]></description>
      <content:encoded><![CDATA[<p>Hello my name is Paulo Viralhadas and I'm a Premier Field Engineer at Microsoft.</p>
<p>Have you ever used Fine Grained Password Policies?</p>
<p>This feature introduced in Windows Server 2008 allows you to override password policy set at the domain level.</p>
<p>It applies password settings to subsets of users that you may like to differentiate from the domain policy.</p>
<p>In Windows Server 2012 we added a GUI (Graphical User Interface) so now you don't have to use ADSIedit, LDP or Powershell to create PSOs (Password Settings Objects).</p>
<p>Note that PSOs are not like GPOs:</p>
<p>1. They're not managed via GPMC.</p>
<p>2. They're not linked to OUs, Sites or Domains.</p>
<p>PSOs&nbsp;apply to User and Group objects (ie. ultimately apply to User Accounts)</p>
<p>As an example, with FGPP you can have a Domain password policy that defines a minimum password length of 8 characters which will be applied to all users in the domain.</p>
<p>Then have a PSO that sets 24 characters&nbsp;for all user accounts that are members of the "All Service Accounts".</p>
<p>I added the following video that walks you through the steps needed to implement this (once again I've kept it short and simple and no sound).</p>
<p>Anyway here's the high level steps you have to follow:</p>
<p>1. Using ADAC (Windows 8 or Server 2012) open the Password Settings container (under System container).</p>
<p>2. Add a New PSO (Password Settings Object).</p>
<p>3. Configure the desired PSO properties (Max password Age, Min Password Length, etc).</p>
<p>4. Assign the PSO to a user or group</p>
<p><iframe src="https://www.youtube.com/embed/lyNnN-5vDGc" frameborder="0" width="420" height="315"></iframe></p>
<p>Hope it helps!</p>
<p>Enjoy!</p>]]></content:encoded>
    </item>
    <item>
      <title>AD recycle bin feature and Windows Server 2012 GUI</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/ad-recycle-bin-feature-and-windows-server-2012-gui</link>
      <pubDate>Mon, 18 Mar 2013 05:37:47 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2013/03/18/ad-recycle-bin-feature-and-windows-server-2012-gui/</guid>
      <description><![CDATA[Hello my name is Paulo Viralhadas and I'm a Premier Field Engineer at Microsoft.
&nbsp;
The AD...]]></description>
      <content:encoded><![CDATA[<p>Hello my name is Paulo Viralhadas and I'm a Premier Field Engineer at Microsoft.</p>
<p>&nbsp;</p>
<p>The AD recycle bin feature has been released on Windows Server 2008 R2 without a graphical user interface, which made it's deployment and usability (I mean recovering deleted objects from AD) somewhat difficult for system admins.</p>
<p>In this post I will write about how to enable the ADRB feature on both WS2008 and WS2012.</p>
<p>This will provide you with the skills necessary to perform object recovery regardless of the operating system you are using currently.</p>
<p>Be amazed on how easy it is to recover deleted objects in WS2012.</p>
<p>This feature can be enabled if your forest is running at WIN2008R2 functional level.</p>
<p>If you already have all DCs in the forest running on Windows Server 2008R2 or higher you may use the following powershell command to raise the FFL:</p>
<p><strong>Set-ADForestMode 4 -Identity &lt;<em>forestname</em>&gt;</strong></p>
<p>which requires that all domains in the forest run at WIN2008R2 domain functional level, so if needed run:</p>
<p><strong>Set-ADDomainMode 4 -Identity &lt;<em>domainname</em>&gt;</strong></p>
<p>Before running the powershell commands above and if using WS2008R2 you have to import the Active Directory module for powershell (WS2012 does it automatically).</p>
<p><strong>Important</strong>: Enabling Active Directory Recycle Bin is an irreversible procedure.</p>
<p>To enable the AD Recycle Bin feature using powershell run:</p>
<p><strong>Enable-ADOptionalFeature &ndash;Identity &lsquo;CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=contoso,DC=com&rsquo; &ndash;Scope ForestOrConfigurationSet &ndash;Target &lsquo;&lt;<em>forestname</em>&gt;&rsquo;</strong></p>
<p>To check if recycle bin is enabled:</p>
<p><strong>Get-ADOptionalFeature -filter *</strong></p>
<p>To restore a deleted object do the following:</p>
<p><strong>Get-ADObject -Filter {displayName -eq "name"} -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p>Watch the video - Enable AD Recycle Bin and restore a single object using powershell on WS2008R2</p>
<p>Although restoring a single object is fairly simple, the restoration procedures get more complex when restoring multiple nested objects.</p>
<p>For example when you need to restore an OU with hundreds or thousands of objects in it (like users, groups, computers or even sub OUs which in its turn may contain more objects).</p>
<p>You will have to investigate how deep OU nesting is by querying deleted users lastknownparent attribute in order to understand the deleted OU structure.</p>
<p>Then you must start restoring from top to bottom so one hierarchy level at a time.</p>
<p>The reason behind is that when an object is deleted and moves to the deleted objects container, the object distinguished name (DN) gets mangled and the deleted objects container doesn't contain/keep an hierarchy.</p>
<p>The only way to return the objects hierarchy is by searching for it's lastknownparent attribute.</p>
<p>For example consider the following scenario:</p>
<p>[picture 1]</p>
<p>In this scenario we need to start by searching for known objects that have been deleted, for example in this case by finding the lastknownparent of a user named Peter:</p>
<p><strong>Get-ADObject -SearchBase "CN=Deleted Objects,DC=contoso,DC=com" -ldapFilter:"(msDs-lastKnownRDN=Peter)" &ndash; IncludeDeletedObjects &ndash;Properties lastKnownParent</strong></p>
<p>Then by finding all objects that have HumanResources as lastknowparent (note: add another \ before 0ADEL:):</p>
<p><strong>Get-ADObject &ndash;SearchBase "CN=Deleted Objects,DC=contoso,DC=com" -Filter {lastKnownParent -eq 'OU=HumanResources\ \0ADEL:c876daac-da9b-57ce-bded-978aed9c0e2b,CN=Deleted Objects,DC=contoso,DC=com'} -IncludeDeletedObjects - Properties lastKnownParent | ft</strong></p>
<p>At this stage we must go through the output and look for other OUs contained within HumanResources OU, then we need to search for other deleted objects inside it in case we find extra OUs (in this case we explore the Users OU within HumanResources):</p>
<p><strong>Get-ADObject &ndash;SearchBase "CN=Deleted Objects,DC=contoso,DC=com" -Filter {lastKnownParent -eq 'OU=Users\ \0ADEL:6b507c43-172b-8145-93bf-61e00302bb4a,CN=Deleted Objects,DC=contoso,DC=com'} -IncludeDeletedObjects - Properties lastKnownParent | ft</strong></p>
<p>So far we found that HumanResources OU has been deleted (by noticing&nbsp;the mangled DN) and with the following command we may validate if there is any other OU above it and if it was also deleted (if so we have to perform the same steps as above to find other objects within it):</p>
<p><strong>Get-ADObject -SearchBase "CN=Deleted Objects,DC=contoso,DC=com" -ldapFilter:"(msDs-lastKnownRDN=HumanResources)" &ndash;IncludeDeletedObjects &ndash;Properties lastKnownParent</strong></p>
<p>After investigation is complete, then we can start restoring the objects from top to bottom:</p>
<p>to restore the HumanResources OU:</p>
<p>Get-ADObject -ldapFilter:"(msDS-LastKnownRDN=HumanResources)" &ndash;IncludeDeletedObjects | Restore-ADObject</p>
<p>to restore all deleted objects under it (including the Users OU):</p>
<p>Get-ADObject -SearchBase "CN=Deleted Objects,DC=contoso,DC=com" -Filter {lastKnownParent -eq "OU=HumanResources,DC=contoso,DC=com"} -IncludeDeletedObjects | Restore-ADObject</p>
<p>To restore all deleted objects under the Users OU:</p>
<p>Get-ADObject -SearchBase "CN=Deleted Objects,DC=contoso,DC=com" -Filter {lastKnownParent -eq "OU=Users,OU=HumanResources,DC=contoso,DC=com"} -IncludeDeletedObjects | Restore-ADObject</p>
<p>Note: Depending on your infrastructure you may have to go deeper into OU hierarchy, but then you just have to repeat the steps above accordingly.</p>
<p>Watch the video - Restore multiple objects using powershell on WS2008R2</p>
<p>Now that we covered how to restore deleted objects using the recycle bin attribute in WS2008R2 lets see how easy it is to do the same in WS2012 with the new recycle bin GUI:</p>
<p>You have to open the Deleted Objects container using ADAC and perform the same searches on it just by using the UI and by working out the hierarchy by looking at the Last Known Parent attribute.</p>
<p>If looking for specific objects we may click add criteria and in case we don't know exactly what to search for -this is one of the reasons why having AD proper documented is so important - an idea would be to add "and Last modified between these dates:")</p>
<p>Watch the video - Restore multiple objects using the NEW Recycle Bin GUI in WS2012</p>
<p>Hope it helps!</p>
<p>Enjoy!</p>
<p><strong>PS: I will add the videos throughout the week.</strong></p>
<p>In my next post I will share more information on how actually the AD recycle bin works.</p>]]></content:encoded>
    </item>
    <item>
      <title>How to clone a virtual Domain Controller</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/how-to-clone-a-virtual-domain-controller</link>
      <pubDate>Thu, 07 Mar 2013 02:33:00 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2013/03/07/how-to-clone-a-virtual-domain-controller/</guid>
      <description><![CDATA[Hello my name is Paulo Viralhadas and I&#39;m a Premier Field Engineer at Microsoft.
On one of my...]]></description>
      <content:encoded><![CDATA[<p>Hello my name is Paulo Viralhadas and I&#39;m a Premier Field Engineer at Microsoft.</p>
<p>On one of my previous posts I wrote about vDC cloning which is my preferred feature in Windows Server 2012 &quot;<a href="/b/reference_point/archive/2012/12/11/so-you-wanted-to-deploy-domain-controllers-faster-now-you-can.aspx">https://blogs.technet.com/b/reference_point/archive/2012/12/11/so-you-wanted-to-deploy-domain-controllers-faster-now-you-can.aspx</a>&quot;.</p>
<p>VDC cloning gives you the ability&nbsp;to scale up your production forest and to recover from disasters faster, or simply to build a lab in a blink of the eye.<br />&nbsp;<br />In this post you may watch a number of videos that show how to clone a vDC.</p>
<p>Note: I tried to keep the videos as simple as possible for quick reference.</p>
<p>&nbsp;</p>
<p>HOW TO CLONE A vDC</p>
<p>The Requirements are:<br />Hypervisor must have support for VMGID (VM-Generation ID).<br />ADDS schema version 56<br />Windows Server 2003 Forest Functional Level.<br />Source DC must be running Windows Server 2012.<br />PDCe must be running on a Windows Server 2012 DC.<br />PDCe and RID master online and available.</p>
<p>The video contents are:</p>
<p>Video 1 - Pre-requisit check.</p>
<p>Step 1 - Verify that the source VDC is running on a supported hypervisor.<br />Step 2 - Verify Schema version.<br />Step 3 - Verify Forest Functional Level.<br />Step 4 - Check if the VDC source Operating System. <br />Step 5 - Verify that the PDCe FSMO role is running on a Windows Server 2012 DC<br />Step 6 - Ensure that PDC and RID master are available during cloning process.</p>
<p><iframe width="560" height="315" src="https://www.youtube.com/embed/x2mdTSoFWNE" frameborder="0"></iframe></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Video 2 - Getting the Clone ready.</p>
<p>Step 7 - Create DCCloneConfig.xml file.<br />Step 8 - Add the source VDC to the &quot;Cloneable Domain Controllers&quot; security group.<br />Step 9 - Shutdown the source VDC.</p>
<p>&nbsp;</p>
<p><iframe width="560" height="315" src="https://www.youtube.com/embed/zqWOmSATPN4" frameborder="0"></iframe></p>
<p>&nbsp;</p>
<p>Video 3 - Cloning...</p>
<p>Step 10 - Export the source VM (Virtual Machine).<br />Step 11 - Import the VM with the option &quot;Copy the virtual machine (create a new unique ID)&quot;.<br />Step 12 - Start the new VM.</p>
<p>&nbsp;</p>
<p><iframe width="560" height="315" src="https://www.youtube.com/embed/b1ILU7dSrx8" frameborder="0"></iframe></p>
<p>&nbsp;</p>
<p>Detailed steps:</p>
<p><br />Step 1 -&nbsp; Verify that the source VDC is running on a supported hypervisor.</p>
<p>On the source vDC:<br />open [Device Manager]<br />expand [System Devices]<br />open properties of [Microsoft Hyper-V Generation Counter]<br />select the &quot;Driver&quot; tab<br />click &quot;Driver details&quot;<br />verify that the driver is &quot;vmgencounter.sys&quot;<br />This is the driver that makes vDC cloning and snapshot restore possible in Windows Server 2012.</p>
<p>Step 2 - Verify Schema version.</p>
<p>On any DC in the forest:<br />run [regedit]<br />browse to HKLM\System\CCS\Services\NTDS\Parameters<br />verify that &quot;Schema Version&quot; REG_DWORD value is 56.<br />This is the Windows Server 2012 version of the schema.</p>
<p>Step 3 - Verify Forest Functional Level.</p>
<p>On any DC in the forest:<br />open [Powershell]<br />run [Get-ADForest]<br />verify that &quot;ForestMode&quot; value is &quot;Windows2003Forest&quot; or higher.</p>
<p>Step 4 - Check the vDC source Operating System.</p>
<p>On the source vDC:<br />run [winver]<br />verify that source vDC is a Windows Server 2012.</p>
<p>Step 5 - Verify that the PDCe FSMO role is running on a Windows Server 2012 DC</p>
<p>On any DC in the domain:<br />open [cmd]<br />run [netdom query fsmo]<br />copy the PDC FQDN<br />open [Powershell]<br />run [Get-ADDomainController -server &lt;paste the PDC FQDN here&gt;<br />verify that OperatingSystemVersion value is 6.2 (9200) or higher</p>
<p>Step 6 - Ensure that PDC and RID master are available during cloning process.</p>
<p>Step 7 - Create DCCloneConfig.xml file.</p>
<p>open [Powershell]<br />run [New-ADDCCloneconfigFile]<br />(this will create an empty configuration file, you might want to have a look on the table below before you add<br />&nbsp;configuration information to this file)</p>
<p>Note: If you get a failure for applications not cloneable you have 2 options add them to the excluded application list or uninstall them from the DC</p>
<p>To see the list of unsupported applications run:</p>
<p>Get-ADDCCloningExcludedApplicationList</p>
<p>and to generate the XML file (thus adding the application(s) to the excluded list run:</p>
<p>Get-ADDCCloningExcludedApplicationList -GenerateXML</p>
<p>Step 8 - Add the source VDC to the &quot;Cloneable Domain Controllers&quot; security group.</p>
<p>open [ADAC]<br />browse your domain to the &quot;Users&quot; container<br />double-click &quot;Cloneable Domain Controllers&quot; security group<br />Select &quot;Members&quot; tab and click &quot;Add&quot; button to add the source domain controller account</p>
<p>Step 9 - Shutdown the source VDC.</p>
<p>Step 10 - Export the source VM (Virtual Machine).</p>
<p>open [Hyper-V Manager]<br />Right-click the source vDC VM<br />Select Export<br />Specify where you want to save the files</p>
<p>Step 11 - Import the VM with the option &quot;Copy the virtual machine (create a new unique ID)&quot;.</p>
<p>open [Hyper-V Manager]<br />click on &quot;Import Virtual Machine&quot;<br />Locate Folder<br />Select Virtual Machine<br />Choose import type:&nbsp; &quot;Copy the virtual machine (create a new unique ID)&quot;</p>
<p>Step 12 - Start the new VM.</p>
<p>(Refer to the diagram below in order to understand the cloning/snapshot restore decision process)</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/5327.cloning%20proc.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/5327.cloning-proc.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/5327.cloning%20proc.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/5327.cloning-proc.png" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The&nbsp;Cloning/Snapshot safeguards are:</p>
<div>&bull;DC resets the Invocation ID</div>
<div>&bull;Discards the RID pool</div>
<div>&bull;Updates Up-to-Dateness-vector table</div>
<div>&bull;Replicates AD object differences</div>
<div>&bull;Replicates SYSVOL differences</div>
<div>&bull;Updates msDS-GenerationID</div>
<p>&nbsp;</p>
<p>&nbsp;The following table puts together the outcomes of the diagram above:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/8168.ws2012-vdc-cloning-snapshots.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/8168.ws2012_2D00_vdc_2D00_cloning_2D00_snapshots.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/8168.ws2012-vdc-cloning-snapshots.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/8168.ws2012_2D00_vdc_2D00_cloning_2D00_snapshots.png" border="0" /></a>&nbsp;</p>
<p>&nbsp;</p>
<p>By the way you may find a playlist of all 3 videos above at:&nbsp;</p>
<p><a href="https://www.youtube.com/playlist?list=PLRiiq9ROPBOtJhPx2SciZcMfhJ4PN4K7y">https://www.youtube.com/playlist?list=PLRiiq9ROPBOtJhPx2SciZcMfhJ4PN4K7y</a>&nbsp;</p>
<p>&nbsp;</p>
<p>Hope it helps!</p>
<p>&nbsp;Best regards</p>
<p>Paulo</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>So you wanted to deploy Domain Controllers faster...Now you can!</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/so-you-wanted-to-deploy-domain-controllers-faster-now-you-can</link>
      <pubDate>Tue, 11 Dec 2012 11:05:00 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2012/12/11/so-you-wanted-to-deploy-domain-controllers-faster-now-you-can/</guid>
      <description><![CDATA[A Domain Controller must have a unique name, invocation ID, and security identifier (SID) in the...]]></description>
      <content:encoded><![CDATA[<p>A Domain Controller must have a unique name, invocation ID, and security identifier (SID) in the entire forest.<br />Up to Windows Server 2008 R2 promoting "syspreped" standalone images multiple times, was the fastest you could go in order to deploy a large number of Domain Controllers.<br />Sysprep was needed for ensuring that the deployed images were unique. Yes, scripts and answer files could be used for unnattended deployment in order to minimize administrative ovehead and deployment times.</p>
<p>As you could guess from my previous post, Microsoft has introduced new features in Hyper-V and Windows Server 2012 that allow to do things with Virtualized DCs that before were impossible.<br />This has became possible due to the introduction of an identifier called VM-Generation ID on the Hypervisor driver and the corresponding attribute in AD (msDS-GenerationID).</p>
<p>The feature I want to tell you about is VDC Cloning.</p>
<p>Now a Cloned Windows Server 2012 Domain Controller automatically executes Sysprep and uses the existing NTDS and SYSVOL data for promotion (similar to IFM - Install from Media). Additionally, you may create a configuration file (DCCloneConfig.xml).<br />Then just need to copy or export the source VDC and it's done.<br />You get faster deployment, scalability and easier disaster recovery.</p>
<p>Security wise, Domain Admins select DCs that can be cloned. <br />The Hyper-V administrators can only deploy the approved cloned DCs thus ensuring that unauthorized users cannot create rogue DCs.</p>
<p>The following table exemplifies how VDC Cloning is achieved:</p>
<table style="width: 490px;" border="0" cellspacing="0" cellpadding="0"><colgroup><col width="158" /></colgroup><colgroup><col width="50" /></colgroup><colgroup><col width="163" /></colgroup><colgroup><col width="119" /></colgroup>
<tbody>
<tr>
<td class="xl65" width="158" height="19">Decision<br />&nbsp; Point</td>
<td class="xl65" width="50">Answer</td>
<td class="xl65" width="163">Actions</td>
<td class="xl65" width="119">Outcome</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">Rename DCCloneConfig</td>
<td class="xl66">Reboot into DSRM</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">Normal Reboot</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Do IDs match?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">Rename DCCloneConfig</td>
<td class="xl66">Normal Reboot</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Do IDs match?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">Normal Reboot</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Do IDs match?</td>
<td class="xl66">No</td>
<td class="xl66">VDC safe restore triggered</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Is there a Duplicated IP?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">Normal Reboot</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Do IDs match?</td>
<td class="xl66">No</td>
<td class="xl66">VDC safe restore triggered</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Is there a Duplicated IP?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">Reboot into DSRM&nbsp;</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Do IDs match?</td>
<td class="xl66">No</td>
<td class="xl66">VDC safe restore triggered</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Is there a Duplicated IP?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">Normal Reboot</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">VM-Generation ID exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Do IDs match?</td>
<td class="xl66">No</td>
<td class="xl66">VDC safe restore triggered</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">DCCloneConfig exists?</td>
<td class="xl66">Yes</td>
<td class="xl66">Clone</td>
<td class="xl66">&nbsp;</td>
</tr>
<tr>
<td class="xl66" height="19">Clone Succeeded?</td>
<td class="xl66">No</td>
<td class="xl66">&nbsp;</td>
<td class="xl66">Reboot into DSRM</td>
</tr>
<tr>
<td height="19">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="xl67" height="19">VM-Generation ID exists?</td>
<td class="xl67">Yes</td>
<td class="xl67">&nbsp;</td>
<td class="xl67">&nbsp;</td>
</tr>
<tr>
<td class="xl67" height="19">Do IDs match?</td>
<td class="xl67">No</td>
<td class="xl67">VDC safe restore triggered</td>
<td class="xl67">&nbsp;</td>
</tr>
<tr>
<td class="xl67" height="19">DCCloneConfig exists?</td>
<td class="xl67">Yes</td>
<td class="xl67">Clone</td>
<td class="xl67">&nbsp;</td>
</tr>
<tr>
<td class="xl67" height="19">Clone Succeeded?</td>
<td class="xl67">Yes</td>
<td class="xl67">&nbsp;</td>
<td class="xl67">Normal Reboot</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>So in a nutshell cloning succeeds the following will happen:</p>
<p>If both IDs don't match and a DCCloneConfig.xml file exists. (If xml file doesn't exist then VDC performs Snapshot safe restore - please refer to my previous blog for more information).</p>
<p>DSRM boot flag is set (to prevent boot into production in case cloning fails)</p>
<p>Then VDC checks for VDCisCloning DWORD under NTDS parameters reg key, and if it doesn't exist NTDS invalidates RID pool and resets Invocation ID; if exists then cloning has failed before (and went to DSRM as a safety mechanism) and this a re-attempt of cloning.</p>
<p>The Cloned VM gets the configuration settings (from DCCloneConfig.xml) and all ADDS related services are stopped.</p>
<p>Time synchronization is enforced (using DOMHIER) and Kerberos tickets are purged.</p>
<p>All FRS/DFSR database files are deleted (Not the SYSVOL content which will be used later for pre-seeding in order to minimize SYSVOL replication traffic) and services set to start automatically.</p>
<p>The&nbsp;cloned VM&nbsp;is renamed and DC promotion starts using the existing NTDS.DIT file as source (which will minimize replication traffic later).</p>
<p>Gets a new RID pool from the RID Master.</p>
<p>New Invocation ID and NTDS settings are created.</p>
<p>Starts inbound replication.</p>
<p>FRS/DFSR services start and non-authoritative restore of the SYSVOL is triggered.</p>
<p>Enables&nbsp;DNS client registration.</p>
<p>Runs Sysprep (DefaultDCCloneAllowList.xml determines which Sysprep modules are run)</p>
<p>Once promotion completes the DSRM boot flag is removed, the DCCloneConfig is renamed (will prevent it from being read during reboot),</p>
<p>the VDCisCloning DWORD removed and sets "VDC Cloning Done" to 1.</p>
<p>The value of VM-GenerationID (from HV) is copied to the VDC computer account VM-Generation ID (msDS-GenerationID attribute).</p>
<p>Finally once the VDC reboots it starts advertising itself as a DC.</p>
<p>&nbsp;</p>
<p>Note: Currently, this feature only works on Windows Server 2012 Hypervisor or HV2012.</p>
<p>Hope this helps on your future DC deployments and feel free to comment.</p>
<p>Thanks</p>
<p>Paulo</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>USN Rollback, Virtualized DCs and improvements on Windows Server 2012.</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/usn-rollback-virtualized-dcs-and-improvements-on-windows-server-2012</link>
      <pubDate>Mon, 10 Dec 2012 08:17:58 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2012/12/10/usn-rollback-virtualized-dcs-and-improvements-on-windows-server-2012/</guid>
      <description><![CDATA[The USN rollback issue has been causing hundreds of support calls and AD replication halts...]]></description>
      <content:encoded><![CDATA[<p>The USN rollback issue has been causing hundreds of support calls and AD replication halts throughout the world since the introduction of AD in Windows 2000 Server and up to Windows Server 2008 R2.</p>
<p>Every DC maintains a table - ReplUpToDateVector - (or Up-to-Dateness Vector)&nbsp;per Naming Context (NC or AD partition).<br />These tables record data from the local DC and its replication partners, this data includes the uuidDSA (or DSA GUID); usnHighPropUpdate (or High Watermark) and timeLastSyncSuccess (or the time stamp of last successfull replication from that replication partner) for a particular partition.</p>
<p>When a change is made (ie. an object is created or deleted, an attribute of an object is modified) one (or more) attribute(s) will have their Originating and Local USN incremented.</p>
<p>Example:</p>
<p>repadmin /showobjmeta * OU=USNROLLBACK,DC=contoso,DC=com</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/8422.showobjmeta.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/8422.showobjmeta.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/8422.showobjmeta.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/8422.showobjmeta.jpg" alt="" border="0" /></a></p>
<p>Additionally, the ReplUptoDateVector table (UTDVEC table from now on) on the local DC for itself will be updated.</p>
<p>screenshot of repadmin /showutdvec * dc=contoso,dc=com</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/1464.showutdvec.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/1464.showutdvec.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/1464.showutdvec.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/1464.showutdvec.jpg" alt="" border="0" /></a>Normal operation, In this case there is no outstanding replication from ContosoDC1 to ContosoDC2 (values of ContosoDC1 match on both DCs; on the other hand ContosoDC1 will have to replicate from ContosoDC2 66 changes (220356-220290)</p>
<p>&nbsp;</p>
<p>Then a replication partner will compare its own version of the table and requests the changes that are higher than the High Watermark&nbsp;from the source.</p>
<p>If the USN for the DC on the replication partners is higher than the one the DC has for itself, you are dealing with a USN Rollback.</p>
<p>Example:</p>
<p>screenshot of repadmin /showutdvec ( relevant USNs highlighted)</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/2844.showutdvecafter.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/2844.showutdvecafter.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/2844.showutdvecafter.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/2844.showutdvecafter.jpg" alt="" border="0" /></a>USN Rollback. Note that ContosoDC1 "thinks" that ContosoDC2 has a higher "High Watermark" than in reality. So without the USN rollback protection mechanism the next 182 (220380-220198) changes originated on ContosoDC2 will be discarded by ContosoDC1</p>
<p>&nbsp;</p>
<p>In that case the originating DC will log Replication Event ID 2095 in Directory Service log and will disable inbound and outbound replication as a protection mechanism in order to avoid further damage.</p>
<p>screenshot of event 2095</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/8206.event2095.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/8206.event2095.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/96/91/8206.event2095.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-96-91/8206.event2095.jpg" alt="" border="0" /></a></p>
<p>Without this safety valve further changes held on the originating DC will never be replicated, and eventually only when the originating DC catches-up with the USN known by its replication partners will start replicating again, however any changes in between are lost forever.</p>
<p>NOTE: Ensure that "Allow replication with corrupt and divergent partners" is not in use, or this protection will be ignored.<br />&nbsp; <br />In order to avoid this issue you should backup your DCs using a supported method, that is an AD aware backup application (NTBackup and Windows Backup are AD aware as so other 3rd party backup applications).<br />What you should NOT do as a replacement for the applications above is to restore AD from unsupported backup methods like:</p>
<p>Disk Mirroring<br />Cloning<br />VHD copies<br />VM snapshots<br />or any other cloning method that doesn't reset the DSA Invocation ID when an AD restore is executed.</p>
<p>Note:</p>
<p>The DSA invocation ID is reset once you restore AD using a supported method. Thus replication partners will update their UTDVEC tables with the new value for the restored DC. This doesn't happen when using unsupported methods.</p>
<p>To fix the problem there are two supported methods:</p>
<p>1. Reinstall Active Directory on the affected Domain Controller.</p>
<p>Transfer any FSMO roles if needed.<br />Demote the DC.<br />Perform a metadata clean-up of all references to the DC.<br />Re-promote the DC.</p>
<p>2. Restore the System State.</p>
<p>If a valid system state backup was made before the DC was restored from one unsupported method. Restore the system state from the most recent backup.</p>
<p>For more information on how AD replication works and USN rollback please refer to the following articles:</p>
<p>How the Active Directory Replication Model Works<br /><a href="https://technet.microsoft.com/en-us/library/cc772726(WS.10).aspx">https://technet.microsoft.com/en-us/library/cc772726(WS.10).aspx</a></p>
<p>Running Domain Controllers in Hyper-V<br /><a href="https://technet.microsoft.com/en-us/library/d2cae85b-41ac-497f-8cd1-5fbaa6740ffe(v=WS.10)#usn_and_usn_rollback">https://technet.microsoft.com/en-us/library/d2cae85b-41ac-497f-8cd1-5fbaa6740ffe(v=WS.10)#usn_and_usn_rollback</a></p>
<p>In Windows Server 2012 virtualized Domain Controllers, you can now restore snapshots without permanently damage domain controllers.<br />While this does not prevent other issues for other technologies and applications, it does make domain controller virtualization safer.</p>
<p>Now virtualized domain controller snapshot restore resets the DC's unique Invocation ID. <br />Additionally discards the local RID pool and non-authoritatively restores the SYSVOL folder.&nbsp; <br />This means that accidentally restoring a snapshot is no longer an unsafe operation on domain controllers.</p>
<p>The following process describes how Virtualized DC (VDC) Safe Restore is achieved:</p>
<p>1. Restore of an existing virtual machine (VM) domain controller from a snapshot in a hypervisor that supports VM-Generation ID (Windows Server 2012 Hyper-V for instance).</p>
<p>Assuming that this VM already has an existing VM Generation-ID on its DC computer object when the snapshot was taken as part of the msDS-GenerationID attribute (Schema version 56).</p>
<p>2. The VM then reads the VM-Generation ID provided by Hyper-V VMGenerationCounter driver and compares the VM-Generation IDs values.</p>
<p>If they do not match, it continues with snapshot restoration operations.<br />Once restored, the Generation-ID set on the DC computer object (in AD) is updated to match the new ID provide by the hypervisor host.</p>
<p>If the hypervisor does not provide a VM-Generation ID for comparison, the guest will operate like a Windows Server 2008 R2 or&nbsp;earlier virtualized domain controller.</p>
<p>3. The Virtualized DC then:</p>
<p>Invalidates the local RID pool.<br />Sets a new DSA invocation ID.</p>
<p>4. Non-authoritative inbound replication is triggered&nbsp; from a replication partner. The DC requests changes starting at a USN that precedes the USN at which the local directory service was restored. The&nbsp;UTDVEC table of the destination DC is updated appropriately.</p>
<p>5. The virtualized DC synchronizes the SYSVOL:</p>
<p>If using FRS, it stops the NTFRS service and sets the BURFLAGS registry value (D2). <br />It then starts the NTFRS service, thus performing a non-authoritative restore of the SYSVOL.</p>
<p>If using DFSR, it stops the DFSR service and deletes the DFSR database files. It then starts the DFSR service, thus performing a non-authoritative restore of the SYSVOL.</p>
<p>6. The VM updates the msDS-GenerationID attribute on its own DC object to match the current Hypervisor VM-Generation ID</p>
<p>If you haven't got started with Windows Server 2012, download Windows Server 2012 from:<br /><a href="https://technet.microsoft.com/en-us/evalcenter/hh670538.aspx">https://technet.microsoft.com/en-us/evalcenter/hh670538.aspx</a></p>
<p>&nbsp;</p>
<p>To finish this post as a personal note, and from all improvements in Windows Server 2012 this my preferred feature. And I think that whomever imagined it deserves a big round of applause from all of us.</p>
<p>Feel free to leave your comments.</p>
<p>Cheers.</p>]]></content:encoded>
    </item>
    <item>
      <title>Secure Channel Broken - continuation of "The trust relationship between this workstation and the primary domain failed."</title>
      <link>https://docs.microsoft.com/archive/blogs/reference_point/secure-channel-broken-continuation-of-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed</link>
      <pubDate>Mon, 03 Dec 2012 04:25:48 GMT</pubDate>
      <dc:creator><![CDATA[Paulo Viralhadas (MSFT)]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/reference_point/2012/12/03/secure-channel-broken-continuation-of-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed/</guid>
      <description><![CDATA[While there can be several reasons for AD replication to fail due to an "access denied" error (you...]]></description>
      <content:encoded><![CDATA[<p>While there can be several reasons for AD replication to fail due to an "access denied" error (you may find more information in KB article 2002013 - Troubleshooting AD Replication error 5: Access is denied <a href="https://support.microsoft.com/kb/2002013/EN-US">https://support.microsoft.com/kb/2002013/EN-US</a>), <br />in here we will be focusing on broken secure channel issues on Domain Controllers and how to reset them. <br />Then as promised in my previous post we will also have a look at tools/commands you may use to verify and reset secure channels and trusts. <br /><br />A replication issue may actually be the cause for a broken secure channel between DCs in the first place. <br />Another common cause may be restoring from backup a DC to a previous point in time (or to a system restore point in case of client machines) or time jumps which don't cause the broken secure channel directly but may seen be as a colateral damage. <br />(by the way take a look at https://blogs.technet.com/b/askpfeplat/archive/2012/11/19/did-your-active-directory-domain-time-just-jump-to-the-year-2000.aspx and <a href="https://blogs.technet.com/b/askpfeplat/archive/2012/11/26/fixing-when-your-domain-traveled-back-in-time-the-great-system-time-rollback-to-the-year-2000.aspx">https://blogs.technet.com/b/askpfeplat/archive/2012/11/26/fixing-when-your-domain-traveled-back-in-time-the-great-system-time-rollback-to-the-year-2000.aspx</a> <br />which have been updated recently).</p>
<p>To reset the Secure Channel of a Domain Controller you have 2 methods, one requires reboot the other doesn't however requires more tasks to be completed. <br /><br />If restarting the DC is an issue for you due to business, availability or change control requirements do the following: <br /><br />1. Set the Kerberos Key Distribution Center (KDC) service startup type to Disabled, and restart the domain controller <br />(particularly important if you have more than one DC on the same domain, so this way you will force the affected DC to contact another DC for kerberos authentication, instead of using itself) <br /><br />2. Once the DC restarts, reset the secure channel: <br /><br /><strong>netdom resetpwd /server: /userd:\ /passwordd:*</strong> <br />(you should get the foolowing message: "The machine account password for the local machine has been successfully reset") <br /><br />3. Then, set the startup type for the KDC service back to Automatic and restart the DC once again. <br /><br />Note: Do not start the service manually as it will be started automatically during reboot. <br /><br />The 2nd way is: <br /><br />1. Delete any mapped drives that might exist on the affected DC, for that run:</p>
<p><strong>net use * /d<br /></strong><br />2. Stop the KDC service. <br /><br />3. Purge all kerberos tickets from the computer credentials cache (this is the memory space were the computer stores its tickets, there's nothing in common with cached credentials). <br /><br />Depending on the Operating System run the following: <br /><span style="text-decoration: underline;"><br />On Windows Server 2003:</span></p>
<p><strong>at /interactive cmd.exe</strong> <br />(check current system time and add a couple of extra minutes, for example if current time is 14:14 type 14:16) <br /><br />Note: <br />Another command prompt will launch under the System account context (SVCHost.exe )on the Console session of the problem DC at the time you entered (14:16 in the example above). <br />If running the command via RDP ensure that you are connected to session 0 (mstsc /console or /admin depending on mstsc version) or you won't be able to see the 2nd command prompt.</p>
<p><strong>klist purge</strong></p>
<p><span style="text-decoration: underline;">On Windows Server 2008 or above:</span></p>
<p><strong>klist -li 0x3e7 purge</strong></p>
<p>Note:</p>
<p>The -li 0x3e7 gets klist into the computer credentials cache so there's no need for the "at" command.</p>
<p>4. Reset the Secure Channel:</p>
<p><strong>netdom resetpwd /server: /userd:\ /passwordd:*</strong> <br />(You should get the following message "The machine account password for the local machine has been successfully reset"</p>
<p>&nbsp;<br /><strong>net use <a>\\\IPC$</a></strong> <br />(The DC will request new kerberos tickets)</p>
<p>5. Force the DC to replicate from/to the PDCemulator (so both ways first inbound then outbound):</p>
<p><strong>repadmin /replicate &lt;destination&gt;&nbsp;&lt;source&gt; &lt;NC&gt; /force</strong></p>
<p>example: <br /><em>repadmin /replicate DC1 DC2 DC=Contoso,DC=com /force</em> <br />(you should get the following message "sync from DC2 (the PDCe) to DC1 (the affected DC) completed successfully") <br /><em>repadmin /replicate DC2 DC1 DC=Contoso,DC=com /force</em> <br />(you should get the following message "sync from DC1 (the affected DC) to DC2 (the PDCe) completed successfully")</p>
<p>Note: <br />If the affected DC successfully replicates from the PDCe then start the KDC service. If not successful, you will have to use the method the requires restart. <br />If replication to the PDCe fails, delete the old outbound connection object and trigger KCC (repadmin /kcc) in order to rebuild them, and force outbound replication again. (this might be required for COs with other replication partners) </p>
<p>Done. <br /><br />In order to verify the health status of secure channels you may use Nltest.exe or Netdom.exe (which is also used for trusts). <br /><br />If using Nltest run: <br /><br /><strong>Nltest /sc_verify:&lt;DomainName&gt;</strong><br />You should get "Trust Verification Status = 0 0x0 NERR_Success" if not you must reset the secure channel.</p>
<p>Note: <br />This command doesn't work on a PDCe, so please don't reset the PDCe secure channel once you run it thus getting an error message.<br />Don't use /sc_query to verify secure channels because it doesn't verify the SC, it just tells you the information about the last established SC. (so you will get a valid answer even when you cannot reach a DC) <br /><br />If using Netdom: <br /><br /><strong>netdom verify /domain:&lt;DomainName&gt;</strong> <br /><br />In order to verify Trusts: <br />(Trusts work in a similar way as Secure Channels, there is a TDO (Trust Domain Object) maintained in each trusting and trusted domain partition, which password has to be in sync, of not the trust gets broken).</p>
<p><strong>netdom trust /Domain: /verify</strong></p>
<p>Note: <br />Please take into account that depending on security settings between domains this command may fail, for more troubleshooting&nbsp;information see the article below:<br />Client, service, and program issues can occur if you change security settings and user rights assignments<br /><a href="https://support.microsoft.com/kb/823659">https://support.microsoft.com/kb/823659</a></p>
<p>Hope it has been useful for you. Feel free to share your thoughts.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>