<?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>servergeeks</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/servergeeks/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/servergeeks/feed.xml</link>
    <description />
    <lastBuildDate>Fri, 15 May 2015 08:39:56 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Grabbing Eventlogs from busy servers</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/grabbing-eventlogs-from-busy-servers</link>
      <pubDate>Tue, 17 Mar 2015 13:57:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2015/03/17/grabbing-eventlogs-from-busy-servers/</guid>
      <description><![CDATA[Grabbing Eventlogs from busy servers
&nbsp;
Imagine a scenario where you are...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: large;"><strong><span style="color: #00ccff;">Grabbing Eventlogs from busy servers</span></strong></span></p>
<p>&nbsp;</p>
<p style="font: 14px/19.31px Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; margin: 6px 0px; text-align: left; color: #141823; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; display: block; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">Imagine a scenario where you are analyzing/troubleshooting some server or application issue and you would like to collect all relevant eventlogs from server for your research. However, sometime you may end-up in below few situations which will make this task a nightmare:</p>
<div class="text_exposed_show" style="font: 14px/19.31px Helvetica, Arial, 'lucida grande', tahoma, verdana, arial, sans-serif; text-align: left; color: #141823; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; display: inline; white-space: normal; font-size-adjust: none; font-stretch: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;">
<p style="margin: 0px 0px 6px;">a) Server performance is really slow and it takes forever to open event logs GUI<br />b) There are tons of events logged and its taking a lot of time to load all information in event viewer<br />c)There are lot of unwanted logs logged and you would like to quickly filter out only particular source or application log<br />d)You would like to export logs quickly in a file which you can transfer to your machine to review and research</p>
<p style="margin: 6px 0px;">Well we have Powershell to make our admin life easier. If you have Windows server 2008 or above, you can utilize some powerful modules to get eventlogs for you in seconds.</p>
<p style="margin: 6px 0px;">In below screenshot example I have demonstrated how to use Get-Eventlog module to fetch all error+warning events for source/application CRM which occurred between 10th March to 15th March.</p>
<p style="margin: 6px 0px;">Command is :</p>
<p style="margin: 6px 0px;">Get-EventLog -LogName Application -Source MSCRM* -EntryType Error,Warning -after 3/10/2015 -before 3/15/2015</p>
<p style="margin: 6px 0px;">&nbsp;</p>
<p style="margin: 6px 0px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/8585.eventlogs.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/8585.eventlogs.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/8585.eventlogs.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/8585.eventlogs.png" alt="" border="0" /></a></p>
<p style="margin: 6px 0px;">Parameters Explained<br />==================<br />1) -Logname should be modified according to your requirement. If you are looking for some application crash or error log then in windows eventviewer we have a a separate log called "Application" log. If you are looking for install failure, patch failures or some system related logs and select "System" . Like wise use other logname which are present in eventviewer</p>
<p style="margin: 6px 0px;">2) -Source: this is the application or process which is throwing the error.</p>
<p style="margin: 6px 0px;">3) -EntryType: We have 4 levels of logs in eventlogs- Error, Warning, Critical and Informational. Choose the level in this switch</p>
<p style="margin: 6px 0px;">4) -Before and -after are used for start and end date of eventlogs. If you do not use this parameter, it will start pulling all the logs available for that source till date.</p>
<p style="margin: 6px 0px;">Now there is an option available that can help you to export all these useful evenlogs into csv file, which will easy and quick to read using excel in other system. The command is below</p>
<p style="margin: 6px 0px;">Get-EventLog -LogName Application -Source MSCRM* -EntryType Error,Warning -after 3/10/2015 -before 3/15/2015 | Export-Csv c:\Errors.csv</p>
<p style="margin: 6px 0px;">For other helpful parameters go through below TechNet article:<br /><a style="color: #3b5998; text-decoration: none; cursor: pointer;" href="https://www.facebook.com/l.php?u=https%3A%2F%2Ftechnet.microsoft.com%2Fen-us%2Flibrary%2Fhh849834.aspx&amp;h=SAQEvX2cW&amp;enc=AZPbb0MULkwMgQUxWi5KvtsePqhC2Az6OXfpTF1UcBqEceYXHlpTjIMtEW54wTHS8lRGdOl2Qqbbpq2AWnBW09Fy1YIxmYMz2YbLMnb63ycASEERtxjJnTCWfwPfyLkKrgsxzWb3cDmefx0VXoCkwJKWzoeOPTEIEcX790VWbJab9g&amp;s=1" rel="nofollow" target="_blank">https://technet.microsoft.com/en-us/library/hh849834.aspx</a></p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Active Directory files and their functions</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/active-directory-files-and-their-functions</link>
      <pubDate>Tue, 14 Oct 2014 21:30:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/10/14/active-directory-files-and-their-functions/</guid>
      <description><![CDATA[Active Directory files and their functions

&nbsp;
Ntds.dit
Ntds.dit is the main AD database...]]></description>
      <content:encoded><![CDATA[<p style="background: white;"><span style="color: #00b0f0;"><span style="font-family: Times New Roman; font-size: 15pt;"><strong>Active Directory files and their functions</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;"><br /><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/3513.101414_1630_ActiveDirec1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/3513.101414_5F00_1630_5F00_ActiveDirec1.png" alt="" /><br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Ntds.dit</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;">Ntds.dit is the main AD database file. NTDS stands for NT Directory Services. The DIT stands for Directory Information Tree. The Ntds.dit file on a particular domain controller contains all naming contexts hosted by that domain controller, including the Configuration and Schema naming contexts. A Global Catalog server stores the partial naming context replicas in the Ntds.dit right along with the full Domain naming context for its domain.<br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Edb.log</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;">Edb.log is a transaction log. Any changes made to objects in Active Directory are first saved to a transaction log. During non-peak times in CPU activity, the database engine commits the transactions into the main Ntds.dit database. This ensures that the database can be recovered in the event of a system crash. Entries that have not been committed to Ntds.dit are kept in memory to improve performance. Transaction log files used by the ESE (Extensible Storage Engine is an Indexed Sequential Access Method (ISAM) data storage technology from Microsoft. ESE is the core of Microsoft Exchange Server and Active Directory.) engine are always 10MB.<br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Edbxxxxx.log</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;">These are auxiliary transaction logs used to store changes if the main Edb.log file gets full before it can be flushed to Ntds.dit. The xxxxx stands for a sequential number in hex. When the Edb.log file fills up, an Edbtemp.log file is opened. The original Edb.log file is renamed to Edb00001.log, and Edbtemp.log is renamed to Edb.log file, and the process starts over again. Excess log files are deleted after they have been committed. You may see more than one Edbxxxxx.log file if a busy domain controller has many updates pending.<br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Edb.chk</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;">Edb.chk is a checkpoint file. It is used by the transaction logging system to mark the point at which updates are transferred from the log files to Ntds.dit. As transactions are committed, the checkpoint moves forward in the Edb.chk file. If the system terminates abnormally, the pointer tells the system how far along a given set of commits had progressed before the termination.<br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Res1.log and Res2.log</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;">Res1.log and Res2.log are reserve log files. If the hard drive fills to capacity just as the system is attempting to create an Edbxxxxx.log file, the space reserved by the Res log files is used. The system then puts a dire warning on the screen prompting you to take action to free up disk space quickly before Active Directory gets corrupted. You should never let a volume containing Active Directory files get even close to being full. File fragmentation is a big performance thief, and fragmentation increases exponentially as free space diminishes. Also, you may run into problems as you run out of drive space with online database defragmentation (compaction). This can cause Active Directory to stop working if the indexes cannot be rebuilt.<br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Temp.edb</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;">This is a scratch pad used to store information about in-progress transactions and to hold pages pulled out of Ntds.dit during compaction.<br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Schema.ini</strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Times New Roman; font-size: 10pt;">This file is used to initialize the Ntds.dit during the initial promotion of a domain controller. It is not used after that has been accomplished</span></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Basic Tools to Troubleshoot DC issues while troubleshooting CRM Access Issues</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/basic-tools-to-troubleshoot-dc-issues-while-troubleshooting-crm-access-issues</link>
      <pubDate>Tue, 14 Oct 2014 08:39:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/10/14/basic-tools-to-troubleshoot-dc-issues-while-troubleshooting-crm-access-issues/</guid>
      <description><![CDATA[Basic Tools to Troubleshoot DC issues 
&nbsp;
While troubleshooting any domain related issues or...]]></description>
      <content:encoded><![CDATA[<p style="background: white;"><span style="color: #92d050; font-family: Times New Roman; font-size: 18pt;"><strong>Basic Tools to Troubleshoot DC issues </strong></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #333333; font-family: Trebuchet MS; font-size: 10pt;">While troubleshooting any domain related issues or CRM server authentication or name resolution issues, it is good that we also check the DC health and perform some quick test using below basic commands to check if everything is working fine with DC. </span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Trebuchet MS; font-size: 10pt;">Here are few basic tools that can be used for this purpose:</span><span style="color: #92d050;"><span style="font-family: Times New Roman; font-size: 18pt;"><strong><br /></strong></span></span></span></p>
<p style="background: white;"><span style="color: #00b0f0;"><span style="font-family: Times New Roman; font-size: 14pt;"><strong>DCDIAG<br /></strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Trebuchet MS; font-size: 10pt;">DCDIAG analyzes the state of domain controllers in a forest or enterprise and reports any problems to help in troubleshooting.<br /></span></span></p>
<ol style="margin-left: 56pt;">
<li>
<div style="background: white;"><em>Preparing to install or migrate to Exchange new version<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Checking FSMO roles.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Troubleshooting Group Policy.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Investigating Active Directory not replicating frssysvol error.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Running down Kerberos authentication problems.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Resetting the Directory Service Administrator's password.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Fixing servers Service Principle Name (SPN) error.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Other DC issues</em><span style="color: #333333;"><span style="font-family: Trebuchet MS; font-size: 10pt;"><br /></span></span></div>
</li>
</ol>
<p style="background: white;"><span style="color: #333333;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"><strong>Example:</strong></span><span style="font-family: Trebuchet MS;">&nbsp;</span><span style="font-family: Times New Roman;">dcdiag.exe</span><span style="font-family: Trebuchet MS;">&nbsp;/V /D /C /E &gt; c:\</span><span style="font-family: Times New Roman;">dcdiag.log</span><span style="font-family: Trebuchet MS;"><br /></span></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 12pt;">DCDIAG tool article&nbsp;</span><span style="color: #5b9bd5;"><em>https://technet.microsoft.com/en-us/library/cc731968(v=ws.10).aspx </em></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0;"><span style="font-family: Times New Roman; font-size: 14pt;"><strong>REPADMIN<br /></strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;">Repadmin.exe</span><span style="font-family: Trebuchet MS;">&nbsp;is a Microsoft Windows 2000 Resource Kit tool that is available in the Support Tools folder on the Windows 2000 CD-ROM. It is a command-line interface to Active Directory replication. This tool provides a powerful interface into the inner workings of Active Directory replication, and is useful for troubleshooting Active Directory replication problems.<br /></span></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"><strong>Example:</strong></span><span style="font-family: Trebuchet MS;">&nbsp;</span><span style="font-family: Times New Roman;">repadmin.exe</span><span style="font-family: Trebuchet MS;">&nbsp;/showrepl dc* /verbose /all /intersite &gt; c:\</span><span style="font-family: Times New Roman;">repl.txt</span><span style="font-family: Trebuchet MS;"><br /></span></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 12pt;">RepAdmin tool article&nbsp;</span><span style="color: #5b9bd5;"><em>https://technet.microsoft.com/en-us/library/cc770963(v=ws.10).aspx </em></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #00b0f0;"><span style="font-family: Times New Roman; font-size: 14pt;"><strong>NETDIAG<br /></strong></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Trebuchet MS; font-size: 10pt;">This command-line diagnostic tool helps to isolate networking and connectivity problems by performing a series of tests to determine the state of your network client. These tests and the key network status information they expose give network administrators and support personnel a more direct means of identifying and isolating network problems. Moreover, because this tool does not require parameters or switches to be specified, support personnel and network administrators can focus on analyzing the output rather than on training users how to use the tool.<br /></span></span></p>
<ol style="margin-left: 56pt;">
<li>
<div style="background: white;"><em>Installing Exchange and you wish to check that you can connect to other servers.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Checking VPN network tunnels on the WAN.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>DNS problems.&nbsp; Computers cannot 'see' their domain controller on the LAN.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>A quick check on hotfixes.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Check the Network Card Bindings from the command prompt.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>You are having problems with IPSEC.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>Winsock corruption, wrong version incompatibilities.<br /> </em></div>
</li>
<li>
<div style="background: white;"><em>NetDiag checks that Domain Controllers are all able to 'speak' LDAP.<br /> </em></div>
</li>
</ol>
<p style="background: white;">&nbsp; &nbsp;</p>
<p style="background: white;"><span style="color: #333333; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Example:&nbsp;</strong>netdiag.exe&nbsp;/v &gt; c:\netdiag.log<br /></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Trebuchet MS; font-size: 10pt;">Note: This command need to be run on each DC of the domain.<br /></span></span></p>
<p style="background: white;"><span style="color: #333333; font-family: Arial; font-size: 12pt;">NetDiag tool article&nbsp;</span><em>https://technet.microsoft.com/en-us/library/cc731434(v=ws.10).aspx </em></p>
<p style="background: white;">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting CRM-AD Secure Channels and Trust Relationships</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/troubleshooting-crm-ad-secure-channels-and-trust-relationships</link>
      <pubDate>Thu, 04 Sep 2014 21:30:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/09/04/troubleshooting-crm-ad-secure-channels-and-trust-relationships/</guid>
      <description><![CDATA[Troubleshooting CRM-AD Secure Channels and Trust Relationships 
&nbsp;
It is very important to...]]></description>
      <content:encoded><![CDATA[<p style="text-align: justify;"><span style="color: #00b0f0; font-size: 18pt;"><strong>Troubleshooting CRM-AD Secure Channels and Trust Relationships </strong></span></p>
<p style="text-align: justify; margin-left: 5pt;">&nbsp;</p>
<p>It is very important to understand the concept of secure channel between an AD and workstation machine or between 2 domains which are in trust. This article will give you an overall picture of a security channel. Also, it will explain what issues you will experience if the security channel is broken or how to identify issues due to broken channels.</p>
<p>Every computer that's joined to a domain&mdash;whether it's a workstation client, a server, or a DC&mdash;requires connectivity to DCs in order to fulfill some of the service requirements that AD domains require. For workstations and servers, that connectivity is to the DCs in the domain that they're a member of, as well as trusting domains' DCs. DCs in one domain need connectivity to DCs in other trusting and trusted domains. The name describing the cached values in that inter-domain connectivity is the "domain secure channel." To be clear, there are two kinds of secure channels:</p>
<p>&nbsp;</p>
<ul>
<li>Secure channels from a domain member to a DC in its domain</li>
<li>Trust secure channels between a trusted and trusting DC</li>
</ul>
<p>&nbsp;</p>
<p><strong>Secure Channel between Trusted Domains </strong></p>
<p>To validate access to resources in a trusting domain, the trusting domain controller establishes a secure channel with a domain controller in the trusted domain. Pass-through authentication then occurs over this secure channel. However, in WAN environments, the trusted domain's domain controllers may be dispersed over a wide variety of fast and slow links. If a fast link is unavailable when the trusting domain controller wants to establish a secure channel, the secure channel may be established with a domain controller over a slow link. Even when the fast link is reestablished, pass-through authentication may occur over the slow link to the trusted domain's domain controller. The mechanism for establishing a secure channel is very similar to the normal user -logon process. That is, the trusting domain controllers send out logon requests to all known domain controllers in the trusted domain. The trusting domain controllers then set up a secure channel with the first trusted domain controller that responds to this request. Normally, this method is preferred because the first domain controller to respond to a logon request is typically the controller that is located across the fastest communication link. However, if that link is down or the domain controller is unavailable, a domain controller over a slower link may respond first, and all pass-through authentications occur over the slow link.</p>
<p>&nbsp;</p>
<p>Here is one of the errors that you will receive if the CRM &ndash;AD Security channel is broken. You will not be able to login to CRM Server and receive below error message.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/1057.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/1057.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/1057.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/1057.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Verifying Trust using NLTEST utility </strong></p>
<p>There is a built-in mechanism in Windows that tracks how long authentication takes over the existing secure channel. If pass-through authentication takes longer than 45 seconds, that fact is noted. If two such authentications exceed that limit, a rediscovery process begins, the current secure channel is broken, and the trusting domain's PDC once again sends out logon requests to all known trusted domain controllers. However, because this mechanism tracks only those communications that last longer than 45 seconds, users may see a 40- second delay every time they attempt to use a resource without a secure-channel reset taking place. You can run the NLTEST utility on the trusting domain controller to break and re-initialize a secure channel (for example, when&nbsp; the&nbsp; secure-channel&nbsp; password&nbsp; was&nbsp; last&nbsp; changed)&nbsp; and&nbsp; obtain&nbsp; information&nbsp; about&nbsp; an&nbsp; existing&nbsp; trust relationship. You can also use NLTEST to restart the discovery process for a new trusted domain controller. The syntax of NLTEST is:</p>
<p>NLTEST /sc_query:&lt;account_domain&gt;</p>
<p>&nbsp;</p>
<p>If Security Channel is good, you should output something similar to below screenshot</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/5226.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/5226.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/5226.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/5226.2.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>If the security channel is broken, you shall receive error message as shown in below screenshot</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/7840.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/7840.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/7840.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/7840.3.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>Also, you can use nltest /sc_query:&lt;domain.com&gt;&nbsp; to test the security channel status</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/2045.4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/2045.4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/2045.4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/2045.4.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong>If CRM-AD security channel is broken then you may see few of the listed problems: </strong></p>
<ol>
<li>Unable to login to CRM</li>
<li>
<div>Unable to add new users in CRM from trusted domain</div>
<p>Error-1</p>
<p><span style="color: #e84c22;"><strong>Business Management Error: You are attempting to create a user with a domain logon that does not exist. Select another domain logon and try again.</strong> </span></p>
<p>&nbsp; &nbsp;</p>
<p><span style="color: black; font-size: 10pt;">Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: <span style="color: #e84c22;"><strong>LookupAccountNameW failed with error Detail: </strong></span></span></p>
<p><span style="color: black; font-size: 10pt;">&lt;OrganizationServiceFault xmlns:i="<a href="https://www.w3.org/2001/XMLSchema-instance">https://www.w3.org/2001/XMLSchema-instance</a>" xmlns="<a href="https://schemas.microsoft.com/xrm/2011/Contracts">https://schemas.microsoft.com/xrm/2011/Contracts</a>"&gt; </span></p>
<p><span style="color: black; font-size: 10pt;">&nbsp; &lt;ErrorCode&gt;-2147214038&lt;/ErrorCode&gt; </span></p>
<p><span style="color: black; font-size: 10pt;">&nbsp; &lt;ErrorDetails xmlns:d2p1="<a href="https://schemas.datacontract.org/2004/07/System.Collections.Generic">https://schemas.datacontract.org/2004/07/System.Collections.Generic</a>" /&gt; </span></p>
<p><span style="color: black; font-size: 10pt;">&nbsp; &lt;Message&gt;LookupAccountNameW failed with error&lt;/Message&gt; </span></p>
<p><span style="color: black; font-size: 10pt;">&nbsp; &lt;Timestamp&gt;2013-12-19T16:24:35.8171875Z&lt;/Timestamp&gt; </span></p>
<p><span style="color: black; font-size: 10pt;">&nbsp; &lt;InnerFault i:nil="true" /&gt; </span></p>
<p><span style="color: black; font-size: 10pt;">&nbsp; &lt;TraceText i:nil="true" /&gt; </span></p>
<p><span style="color: black; font-size: 10pt;">&lt;/OrganizationServiceFault&gt; </span></p>
<p>&nbsp;</p>
<p><span style="color: black;">OR </span></p>
<p>&nbsp;</p>
<p><span style="color: black;">Error-2 </span></p>
<p><span style="color: black;">Unable to find AD object for SID </span></p>
</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>To know more about NLTEST and Troubleshooting Security Channel issues, please refer below articles:</p>
<p><a href="https://social.technet.microsoft.com/wiki/contents/articles/16067.nltest-to-test-the-trust-relationship-between-a-workstation-and-domain.aspx">https://social.technet.microsoft.com/wiki/contents/articles/16067.nltest-to-test-the-trust-relationship-between-a-workstation-and-domain.aspx</a></p>
<p><a href="https://support.microsoft.com/kb/158148">https://support.microsoft.com/kb/158148</a></p>
<p><a href="https://blogs.technet.com/b/asiasupp/archive/2007/01/18/typical-symptoms-when-secure-channel-is-broken.aspx">https://blogs.technet.com/b/asiasupp/archive/2007/01/18/typical-symptoms-when-secure-channel-is-broken.aspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Caching DNS Resolver Service</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/caching-dns-resolver-service</link>
      <pubDate>Mon, 18 Aug 2014 00:54:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/08/18/caching-dns-resolver-service/</guid>
      <description><![CDATA[Caching DNS Resolver Service 
&nbsp;
Windows includes a caching DNS-resolver service, which is...]]></description>
      <content:encoded><![CDATA[<p style="text-align: justify;"><span style="color: #00b0f0; font-size: 20pt;"><strong>Caching DNS Resolver Service </strong></span></p>
<p>&nbsp;</p>
<p>Windows includes a caching DNS-resolver service, which is enabled by default. For troubleshooting purposes, this service can be viewed, stopped, and started like any other Windows service. The caching resolver reduces DNS network traffic and speeds name resolution by providing a local cache for DNS Queries.</p>
<p>When a name is submitted to DNS, if the resolver is caching names, it first checks the cache. If the name is in the cache, the data is returned to the user. If the name isn't in the cache, the resolver queries the other DNS servers that are listed in the TCP/IP properties for each adapter. It does this in the following order:</p>
<ol>
<li>The resolver first checks the local hosts file (located by default in C:\Windows\System32\drivers\etc) to see whether the required name is listed in host file. The local host address, for example, resolves to 127.0.0.1 through use of the hosts file, not a DNS server.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/2068.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/2068.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/2068.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/2068.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>2. In case the name isn't in the hosts file, the resolver then sends the query to the first server on the preferred adapter's list of DNS servers and waits one second for a response.</p>
<p>3. If the resolver doesn't receive a response from the first server within one second, it se nds the query to the first DNS servers on all adapters that are still under consideration and waits 2 seconds for a response.</p>
<p>4. If the resolver doesn't receive a response from any server within 2 seconds, it sends the query to all DNS servers on all adapters that are still under consideration and waits another 2 seconds for a response.</p>
<p>5. If it still doesn't receive a response from any server, it sends the query to all DNS servers on all adapters that are still under consideration and waits 4 seconds for a response.</p>
<p>6. If it still doesn't receive a response from any server, the resolver sends the query to all DNS servers on all adapters that are still under consideration and waits 8 seconds for a response.</p>
<p>7. If the resolver receives a positive response, it stops querying for the name, adds the response to the cache, and returns the response to the client. If it doesn't receive a response from any server by the end of the 8 seconds, it responds with a time-out. Also, if it doesn't receive a response from any server on a specified adapter, it responds for the next 30 seconds to all queries destined for servers on that adapter with a time-out and doesn't query those servers.</p>
<p>The resolver also keeps track of which servers answer queries more quickly, and it might move servers up or down on the search list based on how quickly they respond. In addition, the resolver also caches negative responses. If the resolver is able to successfully reach a domain controller, but that domain controller is unable to resolve the requested name to an IP address, the result is a negative response. So long as that negative response remains in the cache, the resolver will not try to resolve the address again. You can clear the cache by running the following from a command-line:</p>
<p>&nbsp;</p>
<p><strong>IPCONFIG /FLUSHDNS </strong></p>
<p>Doing so forces the resolver to start over the next time any name needs to be resolved.</p>
<p>To learn more about Caching and Negative Caching, please refer below TechNet Article</p>
<p><a href="https://technet.microsoft.com/en-us/library/cc959309.aspx">https://technet.microsoft.com/en-us/library/cc959309.aspx</a></p>
<p>&nbsp;</p>
<p>You can also fix this problem by using the IPCONFIG command. Entering the following command allows you to view the current list of DNS entries that the server has cached:</p>
<p><strong>IPCONFIG /displayDNS </strong></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/1362.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/1362.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/1362.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/1362.2.png" alt="" border="0" /></a></p>
<p>Entering the following command allows you to refresh all DHCP leases and re-register DNS names. (Wait 5 minutes for the DNS entries in the cache to be reset and updated with the RRs in the server's database.)</p>
<p>&nbsp;</p>
<p><strong>IPCONFIG /registerDNS </strong></p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/7345.082014_0754_CachingDNSR3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/7345.082014_5F00_0754_5F00_CachingDNSR3.png" alt="" /></p>
<p>You can also use the IPCONFIG command to dump all of the DNS cache entries.</p>
<p><strong>IPCONFIG /flushDNS </strong></p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/7444.082014_0754_CachingDNSR4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/7444.082014_5F00_0754_5F00_CachingDNSR4.png" alt="" /></p>
<p>It's worth noting that the DNS server should eventually refresh the cache because each entry has a Time-To-Live (TTL) associated with it. TTL indicates a length of time used by other DNS servers to determine how long to cache information for a record before discarding it.</p>]]></content:encoded>
    </item>
    <item>
      <title>CRM - SQL Authentication Issue</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/crm-sql-authentication-issue</link>
      <pubDate>Wed, 23 Jul 2014 22:46:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/07/23/crm-sql-authentication-issue/</guid>
      <description><![CDATA[&nbsp;
CRM - SQL Authentication Issue 
&nbsp;
Event error logs are useful. However, it is huge to...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p><span style="color: #00b0f0;"><strong><span style="font-size: 22pt;">CRM - SQL Authentication Issue</span> </strong></span></p>
<p>&nbsp;</p>
<p>Event error logs are useful. However, it is huge to go through and find the relevant error message. I am sharing this handy script that will help to identify the logon failure details at SQL side. For instance if CRM App Pool account or any service account is failing to access database or failing to get authenticated by SQL then we can collect all the details using below scripts.</p>
<p>&nbsp;</p>
<p>Let's say you are trying to access CRM url <a href="https://crm.habib.local:5555">https://crm.habib.local:5555</a> and you are receiving below error message in browser. It's clear from the error message that "Habib\CRMAppPoolSvc" account is failing to login or authentication is failing.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/7357.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/7357.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/7357.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/7357.1.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>In order to find more details about this error from SQL side, you can use below scripts</p>
<ul>
<li>
<div>You can use below SP to find all error logs in SQL archived logs</div>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">EXEC</span> <span style="color: maroon;">sp_readerrorlog </span></span></p>
<p>&nbsp;</p>
</li>
<li>
<div>To search particular archived logs for particular string use below script. For example if you want to search current log and archive#1 log for error "Logon Failed", you can use below script</div>
<p>&nbsp;</p>
</li>
</ul>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">EXEC</span> <span style="color: maroon;">sp_readerrorlog0<span style="color: gray;">,</span> 1<span style="color: gray;">,</span> <span style="color: red;">'Login failed'</span> </span> </span></p>
<p style="margin-left: 36pt;"><span style="color: black; font-size: 10pt;"><span style="font-family: Verdana; background-color: white;"><strong>Please Note:</strong></span><span style="color: blue;"><span style="color: black; font-family: Verdana; background-color: white;">&nbsp;0 = current, 1 = Archive #1, 2 = Archive #2, etc... </span></span></span></p>
<ul>
<li>
<div><span style="font-family: Courier New; font-size: 10pt;">You can replace your search string accordingly with any service account which you are searching in error logs </span></div>
<p>&nbsp;</p>
</li>
</ul>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">EXEC</span> <span style="color: maroon;">sp_readerrorlog0<span style="color: gray;">,</span> 1<span style="color: gray;">,</span> <span style="color: red;">'HABIB\CRMAppPoolSvc' </span></span></span></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/5428.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/5428.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/5428.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/5428.2.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<ul>
<li>
<div>Now the above script will give either all the error logs or filtered error logs. You can use below master script to pull all the failure details related to "Logon" process, which could fail due to various reasons and with various errors.</div>
<p>This will create 2 temp tables and drop it after the execution.</p>
</li>
</ul>
<p>&nbsp;</p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">DECLARE</span> @TSQL&nbsp; <span style="color: blue;">NVARCHAR<span style="color: gray;">(</span>2000<span style="color: gray;">) </span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">DECLARE</span> @lC&nbsp;&nbsp;&nbsp; <span style="color: blue;">INT </span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">CREATE</span> <span style="color: blue;">TABLE</span> #TempLog<span style="color: blue;"> <span style="color: gray;">( </span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LogDate&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">DATETIME<span style="color: gray;">, </span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProcessInfo <span style="color: blue;">NVARCHAR<span style="color: gray;">(</span>50<span style="color: gray;">), </span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [Text] <span style="color: blue;">NVARCHAR<span style="color: gray;">(<span style="color: fuchsia;">MAX<span style="color: gray;">)) </span></span></span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">CREATE</span> <span style="color: blue;">TABLE</span> #logF<span style="color: blue;"> <span style="color: gray;">( </span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ArchiveNumber&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">INT<span style="color: gray;">, </span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LogDate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">DATETIME<span style="color: gray;">, </span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LogSize&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">INT </span></span></p>
<p><span style="color: gray; font-family: Courier New; font-size: 10pt;">) </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">INSERT</span> <span style="color: blue;">INTO</span> #logF&nbsp;&nbsp; </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">EXEC</span> <span style="color: maroon;">sp_enumerrorlogs </span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">SELECT</span> @lC <span style="color: gray;">=</span> <span style="color: fuchsia;">MIN<span style="color: gray;">(</span>ArchiveNumber<span style="color: gray;">)</span> <span style="color: blue;">FROM</span> #logF</span> </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">WHILE</span> @lC <span style="color: gray;">IS</span> <span style="color: gray;">NOT</span> <span style="color: gray;">NULL </span></span></p>
<p><span style="color: blue; font-family: Courier New; font-size: 10pt;">BEGIN </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">INSERT</span> <span style="color: blue;">INTO</span> #TempLog </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">EXEC</span> <span style="color: maroon;">sp_readerrorlog@lC</span> </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">SELECT</span> @lC <span style="color: gray;">=</span> <span style="color: fuchsia;">MIN<span style="color: gray;">(</span>ArchiveNumber<span style="color: gray;">)</span> <span style="color: blue;">FROM</span> #logF </span> </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: blue;">WHERE</span> ArchiveNumber <span style="color: gray;">&gt;</span> @lC </span></p>
<p><span style="color: blue; font-family: Courier New; font-size: 10pt;">END </span></p>
<p><span style="color: green; font-family: Courier New; font-size: 10pt;">--Failed login counts. Useful for security audits. </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">SELECT</span> <span style="color: red;">'Failed - '</span> <span style="color: gray;">+</span> <span style="color: fuchsia;">CONVERT<span style="color: gray;">(<span style="color: blue;">nvarchar<span style="color: gray;">(</span>5<span style="color: gray;">),</span> <span style="color: fuchsia;">COUNT<span style="color: gray;">(<span style="color: blue;">Text<span style="color: gray;">))</span> <span style="color: gray;">+</span> <span style="color: red;">' attempts'</span> AS</span> [Login Attempt],</span> <span style="color: blue;">Text</span> <span style="color: blue;">AS</span> Details</span> </span></span></span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">FROM</span> #TempLog </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">where</span> ProcessInfo <span style="color: gray;">=</span> <span style="color: red;">'Logon'</span> </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: gray;">and</span> <span style="color: blue;">Text</span> <span style="color: gray;">like</span> <span style="color: red;">'%failed%' </span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">Group</span> <span style="color: blue;">by</span> <span style="color: blue;">Text </span></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">DROP</span> <span style="color: blue;">TABLE</span> #TempLog </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">DROP</span> <span style="color: blue;">TABLE</span> #logF</span></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/2117.3.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/2117.3.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/2117.3.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/2117.3.PNG" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>CRM Database Backup Restore Audit</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/crm-database-backup-restore-audit</link>
      <pubDate>Wed, 23 Jul 2014 03:38:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/07/23/crm-database-backup-restore-audit/</guid>
      <description><![CDATA[CRM Database Backup Restore Audit 
There are multiple instances where the CRM was no more...]]></description>
      <content:encoded><![CDATA[<p><strong><span style="color: #00b0f0; font-size: 20pt;">CRM Database Backup Restore Audit</span> </strong></p>
<p>There are multiple instances where the CRM was no more accessible right after some database restore operations activity. Also, there are instances where in order to restore the databases to previous state or creating test environment you have accidently restored wrong database.</p>
<p>Let's say you have many automated backup files and manual backups in the backup folder location and you not sure if you or other admin user have restored wrong date backup file and CRM became inaccessible, then you can use below few steps to audit your database restore and backup history and isolate the issue.</p>
<p>&nbsp;</p>
<p>Using below script you can keep a track of all the databases that were restored. With restore date-time, it will also show the date-time of the backup file that was used to restore. This will help you identify if you have by mistaken restored any wrong date-time database.</p>
<p>Also, using this report you can audit if any critical database was restored which might have caused the downtime. For example, in CRM all the connection related information is stored in MSCRM_CONFIG Database and each CRM environment will have a unique MSCRM_CONFIG database holding the configuration and setting information. If MSCRM_CONFIG database is restored using backup file of old date or backup of other CRM Environment, then it will break down the whole CRM environment. In such cases below steps will help you isolate and troubleshoot the issue.</p>
<p>&nbsp;</p>
<p><span style="font-size: 12pt;"><strong>Method-1: Using SQL Script </strong></span></p>
<p>&nbsp;</p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">use</span> msdb<span style="color: gray;">; </span></span></p>
<p><span style="color: blue; font-family: Courier New; font-size: 10pt;">select </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp; DBRestored <span style="color: gray;">=</span> destination_database_name<span style="color: gray;">, </span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp; RestoreDate <span style="color: gray;">=</span> restore_date<span style="color: gray;">, </span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp; SourceDB <span style="color: gray;">=</span> b<span style="color: gray;">.</span>database_name<span style="color: gray;">, </span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp; SourceFile <span style="color: gray;">=</span> physical_name<span style="color: gray;">, </span></span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp; BackupDate <span style="color: gray;">=</span> backup_start_date </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">from</span> RestoreHistory h </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: gray;">inner</span> <span style="color: gray;">join</span> BackupSet b </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">on</span> h<span style="color: gray;">.</span>backup_set_id <span style="color: gray;">=</span> b<span style="color: gray;">.</span>backup_set_id </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: gray;">inner</span> <span style="color: gray;">join</span> BackupFile f </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">on</span> f<span style="color: gray;">.</span>backup_set_id <span style="color: gray;">=</span> b<span style="color: gray;">.</span>backup_set_id </span></p>
<p><span style="font-family: Courier New; font-size: 10pt;"><span style="color: blue;">order</span> <span style="color: blue;">by</span> RestoreDate </span></p>
<p><span style="color: blue; font-family: Courier New; font-size: 10pt;">go </span></p>
<p>&nbsp;</p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/6242.1.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/6242.1.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/6242.1.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/6242.1.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size: 12pt;"><strong>Method-2: You use Database management reports to pull Backup-Restore history </strong></span></p>
<p>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/0245.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/0245.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/0245.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/0245.2.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/3678.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/3678.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/3678.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/3678.3.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>CRM Service Account Locked Out issues</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/crm-service-account-locked-out-issues</link>
      <pubDate>Mon, 21 Jul 2014 23:21:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/07/21/crm-service-account-locked-out-issues/</guid>
      <description><![CDATA[CRM Service Account Locked Out issues 
&nbsp;
There are multiple instances where user uses either...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #00b0f0; font-size: 16pt;"><strong>CRM Service Account Locked Out issues </strong></span></p>
<p>&nbsp;</p>
<p>There are multiple instances where user uses either one custom service account to run all CRM Services or uses different dedicated service accounts for each CRM Service. If the service accounts are locked out to due to some issue, then the CRM Services will be in stopped state and it will cause downtime. To isolate/troubleshoot locked out issues, you may find this article very helpful.</p>
<p>Please Note: There are many sysinternal tools available to verify Account Lockouts, I am explaining the built in commands or tools to analyze such problems.</p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #333333; font-size: 12pt;"><span style="font-family: Times New Roman;"><strong>Method-1: Account Lockout Tools</strong></span></span></p>
<p style="background: white;"><span style="color: #333333; font-family: Arial; font-size: 12pt;"><span style="font-size: small;">There are many methods and tools to find the Account Lockout status or to unlock a locked account. In this post I have explained about one famous tool and command.</span></span></p>
<p style="background: white;"><span style="color: black;"><span style="font-family: Segoe UI;">Using the&nbsp;</span><span style="font-family: Times New Roman; font-size: 11pt;"><strong>LockoutStatus.exe</strong></span><span style="font-family: Segoe UI;">&nbsp;Tool &ndash; This tool comes with Account Lockout Tools package. This package was used earlier in Windows 2003. Account Lockout and Management Tools can be used on Windows Server 2008 as well.<br /></span></span></p>
<p style="background: white;"><span style="color: black;"><span style="font-family: Segoe UI;">Download Account Lockout Tools</span><span style="color: #333333; font-family: Arial; font-size: 12pt;"><span style="font-size: small;">&nbsp;from here</span></span></span></p>
<p style="background: white;"><a href="https://www.microsoft.com/en-us/download/details.aspx?id=18465"><span style="color: #a5cb55; font-family: Times New Roman; font-size: 12pt; text-decoration: underline;"><strong>https://www.microsoft.com/en-us/download/details.aspx?id=18465</strong></span></a><span style="color: #333333; font-family: Arial; font-size: 12pt; text-decoration: underline;"><br /> </span></p>
<p style="background: white;"><span style="color: black; text-decoration: underline;"><span style="font-family: Segoe UI;">How to use LockoutStatus.exe Tool</span></span></p>
<p style="background: white;"><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;">To run the LockoutStatus.exe tool and display information about a locked out user account:</span></span></p>
<ul>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Double-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>LockoutStatus.exe</strong></span><span style="font-family: Segoe UI;">.</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">On the&nbsp;</span><span style="font-family: Times New Roman;"><strong>File</strong></span><span style="font-family: Segoe UI;">&nbsp;menu, click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Select target</strong></span><span style="font-family: Segoe UI;">.</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;">Type the user name whose lockout status on the enterprise's domain controllers you want information about. The below screenshot shows that user account f1 is locked.<br /></span></span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/8345.072514_0621_CRMServiceA1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/8345.072514_5F00_0621_5F00_CRMServiceA1.png" alt="" /><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;"><br /></span></span></p>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-family: Times New Roman; font-size: 12pt;">To Unlock the Account, right click and select Unlock </span></div>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;">To know more about Account Lockout Tools, read the below technet article</span></span></p>
<p style="background: white;"><a href="https://technet.microsoft.com/en-us/library/cc738772(v=ws.10).aspx"><span style="color: #a5cb55; font-family: Times New Roman; font-size: 12pt; text-decoration: underline;"><strong>https://technet.microsoft.com/en-us/library/cc738772(v=ws.10).aspx</strong></span></a></p>
<p style="background: white;">&nbsp;</p>
</li>
</ul>
<p style="background: white;"><span style="color: black; font-family: Times New Roman; font-size: 12pt;"><strong>Method-2: How to use Repadmin Command to find Account Lockout details</strong></span></p>
<ul>
<li>
<div style="background: white;"><span style="color: #333333; font-family: Times New Roman; font-size: 12pt;">First we have to find the FQDN of the locked user. You can use DSQUERY command for this. </span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/1832.072514_0621_CRMServiceA2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/1832.072514_5F00_0621_5F00_CRMServiceA2.png" alt="" /></p>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-family: Times New Roman; font-size: 12pt;">Then run the below command to displays the domain controller that locked the account </span></div>
<p style="background: white;"><span style="color: #333333; font-family: Times New Roman; font-size: 12pt;">Repadmin /showmeta "FQDNofUser" </span></p>
<p style="background: white;"><span style="color: #333333; font-family: Times New Roman; font-size: 12pt;">Here is an example to displays the domain controller that locked the account f1: </span></p>
</li>
</ul>
<p style="background: white;"><span style="color: #333333; font-size: small;"><span style="font-family: Arial;">Type the command&nbsp;</span><span style="color: #0070c0;"><span style="font-family: Times New Roman;"><strong>Repadmin /showmeta "CN=f1, OU=Finance,OU=East Sales,cn=habib,cn=local"</strong></span></span></span></p>
<p style="background: white; margin-left: 36pt;"><span style="color: #333333; font-family: Arial; font-size: small;">You will get the output as below: In this we can only find the details of domain controller that locked the account. It cannot unlock the account from this command line. </span></p>
<p style="background: white; margin-left: 36pt;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/4061.072514_0621_CRMServiceA3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/4061.072514_5F00_0621_5F00_CRMServiceA3.png" alt="" /></p>]]></content:encoded>
    </item>
    <item>
      <title>Auditing Active Directory</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/auditing-active-directory</link>
      <pubDate>Wed, 16 Jul 2014 00:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/07/16/auditing-active-directory/</guid>
      <description><![CDATA[CRM-AD Issues: Auditing Active Directory 
&nbsp;
There are multiple instances where while...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #00b0f0; font-size: 16pt;"><strong>CRM-AD Issues: Auditing Active Directory </strong></span></p>
<p>&nbsp;</p>
<p>There are multiple instances where while troubleshooting/isolating CRM issues, you end up checking details from AD side. In that case you can refer to below article which pretty much explains how to enable audit in AD to track activities.</p>
<p style="background: white;"><span style="color: #333333; font-family: Arial;"><span style="font-size: 10pt;">In Windows&nbsp;Server&nbsp;2008, you can now set up AD&nbsp;DS (Active&nbsp;Directory Domain&nbsp;Services) auditing with a new audit policy subcategory (Directory Service Changes) to log old and new values when changes are made to AD&nbsp;DS objects and their attributes. This can be done using auditpol.exe tool.<br /></span></span></p>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;">Here is a quick command to check which audit policies are currently active:<br /></span></span></p>
<p style="background: white;"><span style="color: #333333; font-family: Times New Roman;"><span style="font-size: 10pt;"><strong>auditpol /get /category:*<br /></strong></span></span></p>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/6138.072514_0729_AuditingAct1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/6138.072514_5F00_0729_5F00_AuditingAct1.png" alt="" /><span style="color: #333333; font-family: Arial;"><span style="font-size: 10pt;"><br /></span></span></p>
<p style="background: white; margin-left: 24pt;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;">Command to view the audit policy categories and Subcategories:<br /></span></span></p>
<p style="background: white; margin-left: 24pt;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/6153.072514_0729_AuditingAct2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/6153.072514_5F00_0729_5F00_AuditingAct2.png" alt="" /></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #333333;"><strong><span style="font-family: Arial;"><span style="font-size: 12pt;">How to enable the global audit policy using the Windows interface i.e. gpmc tool</span><span style="font-size: 10pt;"><br /></span></span></strong></span></p>
<ul>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Start</strong></span><span style="font-family: Segoe UI;">, point to&nbsp;</span><span style="font-family: Times New Roman;"><strong>Administrative Tools</strong></span><span style="font-family: Segoe UI;">, and then&nbsp;</span><span style="font-family: Times New Roman;"><strong>Group Policy Management</strong></span><span style="font-family: Segoe UI;">&nbsp;or run&nbsp;</span><span style="font-family: Times New Roman;"><strong>gpmc.msc command</strong></span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">In the console tree, double-click the name of the forest, double-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Domains</strong></span><span style="font-family: Segoe UI;">, double-click the name of your domain, double-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Domain Controllers</strong></span><span style="font-family: Segoe UI;">, right-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Default Domain Controllers Policy</strong></span><span style="font-family: Segoe UI;">, and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Edit</strong></span><span style="font-family: Segoe UI;">.<br /></span></span></span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/7674.072514_0729_AuditingAct3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/7674.072514_5F00_0729_5F00_AuditingAct3.png" alt="" /><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;"><br /></span></span></p>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Under&nbsp;</span><span style="font-family: Times New Roman;"><strong>Computer Configuration</strong></span><span style="font-family: Segoe UI;">, double-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Policies</strong></span><span style="font-family: Segoe UI;">, double-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Windows Settings</strong></span><span style="font-family: Segoe UI;">, double-click </span><span style="font-family: Times New Roman;"><strong>Security Settings</strong></span><span style="font-family: Segoe UI;">, double-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Local Policies</strong></span><span style="font-family: Segoe UI;">, and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Audit Policy</strong></span><span style="font-family: Segoe UI;">.<br /></span></span></span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/7534.072514_0729_AuditingAct4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/7534.072514_5F00_0729_5F00_AuditingAct4.png" alt="" /><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;"><br /></span></span></p>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">In the details pane, right-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Audit directory service access</strong></span><span style="font-family: Segoe UI;">, and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Properties</strong></span><span style="font-family: Segoe UI;">.</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Select the&nbsp;</span><span style="font-family: Times New Roman;"><strong>Define these policy settings</strong></span><span style="font-family: Segoe UI;">&nbsp;check box.</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Under&nbsp;</span><span style="font-family: Times New Roman;"><strong>Audit these attempts</strong></span><span style="font-family: Segoe UI;">, select the&nbsp;</span><span style="font-family: Times New Roman;"><strong>Success</strong></span><span style="font-family: Segoe UI;">, check box, and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>OK</strong></span><span style="font-family: Segoe UI;">.<br /></span></span></span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/0131.072514_0729_AuditingAct5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/0131.072514_5F00_0729_5F00_AuditingAct5.png" alt="" /><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;"><br /></span></span></p>
</li>
</ul>
<p style="background: white;"><span style="color: #333333;"><strong><span style="font-family: Arial;"><span style="font-size: 12pt;">How to enable the change auditing policy using a command line</span><span style="font-size: 10pt;"><br /></span></span></strong></span></p>
<ul style="margin-left: 60pt;">
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Start</strong></span><span style="font-family: Segoe UI;">, right-click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Command Prompt</strong></span><span style="font-family: Segoe UI;">, and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Run as administrator</strong></span><span style="font-family: Segoe UI;">.</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;">Type the following command, and then press ENTER:</span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Times New Roman;"><strong>auditpol /set /subcategory:"directory service changes" /success:enable</strong></span><span style="font-family: Segoe UI;"><br /></span></span></span></div>
</li>
</ul>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Arial;">To verify if the auditing is enabled or not for</span><span style="font-family: Times New Roman; font-size: 9pt;">&nbsp;"Directory Service Changes",&nbsp;</span><span style="font-family: Arial;">you can run below command:<span style="font-size: 12pt;"><br /></span></span></span></p>
<p style="background: white; margin-left: 24pt;"><span style="color: #333333; font-family: Times New Roman;"><strong><span style="font-size: 12pt;">Auditpol /get /category:"DS Access"</span><span style="font-size: 10pt;"><br /></span></strong></span></p>
<p style="background: white; margin-left: 24pt;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/1526.072514_0729_AuditingAct6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/1526.072514_5F00_0729_5F00_AuditingAct6.png" alt="" /><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;"><br /></span></span></p>
<p style="background: white;">&nbsp;</p>
<p style="background: white;"><span style="color: #333333;"><strong><span style="font-family: Arial;">How&nbsp;</span><span style="color: black;"><span style="font-family: Segoe UI; font-size: 12pt;">to set up auditing in object SACLs</span></span></strong></span></p>
<ul>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Start</strong></span><span style="font-family: Segoe UI;">, point to&nbsp;</span><span style="font-family: Times New Roman;"><strong>Administrative Tools</strong></span><span style="font-family: Segoe UI;">, and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Active Directory Users and Computers</strong></span><span style="font-family: Segoe UI;">.</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Right-click the organizational unit (OU) (or any object) for which you want to enable auditing, and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Properties</strong></span><span style="font-family: Segoe UI;">.</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Click the&nbsp;</span><span style="font-family: Times New Roman;"><strong>Security</strong></span><span style="font-family: Segoe UI;">&nbsp;tab, click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Advanced</strong></span><span style="font-family: Segoe UI;">, and then click the&nbsp;</span><span style="font-family: Times New Roman;"><strong>Auditing</strong></span><span style="font-family: Segoe UI;">&nbsp;tab.<br /></span></span></span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/2234.072514_0729_AuditingAct7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/2234.072514_5F00_0729_5F00_AuditingAct7.png" alt="" /><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;"><br /></span></span></p>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Add</strong></span><span style="font-family: Segoe UI;">, and under&nbsp;</span><span style="font-family: Times New Roman;"><strong>Enter the object name to select</strong></span><span style="font-family: Segoe UI;">, type Authenticated Users (or any other security principal), and then click&nbsp;</span><span style="font-family: Times New Roman;"><strong>OK</strong></span><span style="font-family: Segoe UI;">.<br /></span></span></span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/7776.072514_0729_AuditingAct8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/7776.072514_5F00_0729_5F00_AuditingAct8.png" alt="" /><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;"><br /></span></span></p>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">In&nbsp;</span><span style="font-family: Times New Roman;"><strong>Apply onto</strong></span><span style="font-family: Segoe UI;">, click&nbsp;</span><span style="font-family: Times New Roman;"><strong>Descendant User objects&nbsp;</strong></span><span style="font-family: Segoe UI;">(or any other objects).</span></span></span></div>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Under&nbsp;</span><span style="font-family: Times New Roman;"><strong>Access</strong></span><span style="font-family: Segoe UI;">, select the&nbsp;</span><span style="font-family: Times New Roman;"><strong>Successful</strong></span><span style="font-family: Segoe UI;">&nbsp;check box for&nbsp;</span><span style="font-family: Times New Roman;"><strong>write all properties</strong></span><span style="font-family: Segoe UI;">.<br /></span></span></span></div>
<p style="background: white;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/8715.072514_0729_AuditingAct9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/8715.072514_5F00_0729_5F00_AuditingAct9.png" alt="" /><span style="color: black;"><span style="font-family: Segoe UI; font-size: 10pt;"><br /></span></span></p>
</li>
<li>
<div style="background: white;"><span style="color: black;"><span style="font-size: 10pt;"><span style="font-family: Segoe UI;">Click&nbsp;</span><span style="font-family: Times New Roman;"><strong>OK</strong></span><span style="font-family: Segoe UI;">&nbsp;until you exit the property sheet for the OU or other object.<br /></span></span></span></div>
</li>
</ul>
<p style="background: white;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;">To Test whether auditing is working or not, try creating or modifying objects in Finance OU and check the Security event logs.</span></span></p>
<p style="background: white; margin-left: 24pt;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;">I just created a new user account in Finance OU named f4.<br /></span></span></p>
<p style="background: white; margin-left: 24pt;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/8233.072514_0729_AuditingAct10.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/8233.072514_5F00_0729_5F00_AuditingAct10.png" alt="" /><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;"><br /></span></span></p>
<p style="background: white; margin-left: 24pt;"><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;">If you check the security event logs you will find eventid 5137 (Create)<br /></span></span></p>
<p style="background: white; margin-left: 24pt;"><span style="color: #00b0f0; font-family: Times New Roman;"><span style="font-size: 12pt;"><strong>Note:</strong><br /></span><span style="color: #333333;"><span style="font-size: 10pt;">Once the auditing is enabled these eventids will appear in security event logs: 5136 (Modify), 5137 (Create), 5138 (Undelete), 5139 (Move).<br /></span></span></span></p>
<p style="background: white; margin-left: 24pt;"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/metablogapi/0880.072514_0729_AuditingAct11.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70-metablogapi/0880.072514_5F00_0729_5F00_AuditingAct11.png" alt="" /><span style="color: #333333;"><span style="font-family: Arial; font-size: 10pt;"><br /></span></span></p>
<p style="background: white;"><span style="color: #2a2a2a;"><span style="font-family: Times New Roman; font-size: 14pt;"><br /></span><span style="font-family: Segoe UI; font-size: 12pt;">To know more about AD DS Auditing read technet article:</span><span style="font-family: Times New Roman;"><span style="font-size: 15pt;"><br /></span><span style="font-size: 9pt;"><strong>AD DS Auditing Step-by-Step Guide</strong></span><span style="font-size: 15pt;"><br /></span></span></span></p>
<p style="background: white; margin-left: 36pt;"><a href="https://technet.microsoft.com/en-us/library/cc731607(v=ws.10).aspx"><span style="color: #a5cb55; font-family: Times New Roman; font-size: 12pt;"><strong>https://technet.microsoft.com/en-us/library/cc731607(v=ws.10).aspx</strong></span></a></p>]]></content:encoded>
    </item>
    <item>
      <title>AD Replication Process Overview</title>
      <link>https://docs.microsoft.com/archive/blogs/servergeeks/ad-replication-process-overview</link>
      <pubDate>Sat, 12 Jul 2014 21:49:00 GMT</pubDate>
      <dc:creator><![CDATA[Habibar Rahman]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/servergeeks/2014/07/12/ad-replication-process-overview/</guid>
      <description><![CDATA[AD Replication Process Overview
&nbsp;
So what's the big deal with AD Replication? I mean it's...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #00b0f0;"><strong><span style="font-size: 20pt;">AD Replication Process Overview</span></strong></span></p>
<p>&nbsp;</p>
<p><span style="color: #333333;"><span style="font-size: 10pt; background-color: white;">So what's the big deal with AD Replication? I mean it's obvious that your infrastructure has multiple Domain Controllers and you want to make sure that Active Directory talks to each other directly or indirectly and keep each other up to date. We came up with Replication concept.&nbsp;<br /><br />Now it's important that Domain controller talk to right domain controller, I mean there should not be any confusion, everyone should be aware who is sending update and receiving updates from whom. So we came up with KCC concept ( Knowledge Consistency Checker - it helps to design the replication topology automatically)<br /><br />Now too much talking between AD Servers are also not good, each site is connected using very costly WAN link and I am sure any company don't want any useless replication happening via these costly links. So we came up with concepts like Site Link Cost, Replication Schedule.<br /><br />Trust me AD Replication is a huge topic. This article one pretty much explains basic replication concept between 2 DC's.<span style="font-family: Tahoma;"><br /><br /><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/1882.Server%20Geeks.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/1882.Server-Geeks.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/63/70/1882.Server%20Geeks.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-63-70/1882.Server-Geeks.png" alt="" border="0" /></a><br /><br /></span>Active Directory (AD) is a multi-master directory, meaning each directory services server&mdash;referred to as a domain controller&mdash;contains a fully readable and writeable copy of the directory<br />services database. Because all domain controllers can accept changes to the database, some method is needed to replicate those changes to other domain controllers, ensuring a consistent<br />database across all domain controllers. This scheme is referred to as AD replication.<br /><br /></span><span style="color: #92d050;"><span style="font-size: 14pt; background-color: white;"><strong>AD replication can be broken down into four basic operational components:</strong></span></span></span></p>
<p><span style="color: #333333;"><span style="font-size: 10pt; background-color: white;"><br /></span><strong><span style="font-size: 12pt; background-color: white;">WHO</span></strong></span></p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;">It is a list of servers that participate in replication and the servers with which they replicate. Referred to as a replication topology, this list is generated by a special AD component called the Knowledge Consistency Checker (KCC).<br />Checking replication Topology - &nbsp;<a href="https://technet.microsoft.com/en-us/library/cc739234(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/cc739234(v=ws.10).aspx</a> &nbsp;<strong> </strong></span></p>
<p>&nbsp;</p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;"><strong>WHAT </strong></span></p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;">It is the information that is being replicated. AD uses attribute-based replication and versioning to determine which information has changed and requires replication.<br /><a href="https://windowsitpro.com/active-directory/active-directory-replication-depth">https://windowsitpro.com/active-directory/active-directory-replication-depth</a> </span></p>
<p>&nbsp;</p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;"><strong>WHEN </strong></span></p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;">It is a schedule that determines when replication will occur. Separate schedules exist for replication within an AD site and for each link connecting different sites.<br />Managing Replication between sites- <a href="https://technet.microsoft.com/en-us/library/cc961783.aspx">https://technet.microsoft.com/en-us/library/cc961783.aspx</a> </span></p>
<p>&nbsp;</p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;"><strong>HOW </strong></span></p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;">It defines how the replicated data is physically transported across the network.</span></p>
<p>&nbsp;</p>
<p style="background: white; margin-left: 40pt;"><span style="color: #333333; font-size: 11pt;"><strong>Site Replication</strong> </span></p>
<ul style="margin-left: 63pt;">
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication traffic is not compressed to save processor processing. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication partners notify each other when changes need to be replicated, to reduce replication latency. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication partners poll each other for changes on a periodic basis. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication uses the remote procedure call (RPC) transport. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication connections can be created between any two domain controllers located in the same site. Connections can be made with multiple domain controllers to reduce replication latency. </span></div>
</li>
</ul>
<p style="background: white;"><span style="color: #333333; font-size: 11pt;">&nbsp;<strong>Inter-site Replication</strong> </span></p>
<ul style="margin-left: 63pt;">
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication traffic is compressed to save bandwidth. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication partners do not notify each other when changes need to be replicated, to save bandwidth. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication partners poll each other for changes on a specified polling interval, during scheduled periods only. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication uses the TCP/IP or SMTP transport. </span></div>
</li>
<li>
<div style="background: white;"><span style="color: #333333; font-size: 10pt;">Replication connections are only created between bridgehead servers (servers that handles all inter-site replication for that domain). Connections between bridgehead servers using the lowest cost route, according to site link cost. Connections will only be created over higher cost routes if all of the domain controllers in lower cost routes are unreachable.</span></div>
</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="color: #333333; font-size: 10pt; background-color: white;">To know more about AD replication please refer to below articles: </span></p>
<p><a href="https://technet.microsoft.com/en-us/library/cc961788.aspx">https://technet.microsoft.com/en-us/library/cc961788.aspx</a></p>
<p><a href="https://technet.microsoft.com/en-us/library/cc755994(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/cc755994(v=ws.10).aspx#w2k3tr_repto_how_uvgz</a></p>
<p><span style="color: #333333;"><span style="font-size: 10pt; background-color: white;">Troubleshooting Replication: </span>https://technet.microsoft.com/en-us/library/cc755349(WS.10).aspx#BKMK_1</span></p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>