<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="www.w3.org/2005/Atom" xmlns:sy="purl.org/rss/1.0/modules/syndication/" xmlns:dc="purl.org/dc/elements/1.1/" xmlns:content="purl.org/rss/1.0/modules/content/" xmlns:wfw="wellformedweb.org/CommentAPI/" xmlns:slash="purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>dougga</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/dougga/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/dougga/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:59:32 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>I Am Done Here!</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/i-am-done-here</link>
      <pubDate>Mon, 12 Mar 2012 05:50:03 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2012/03/12/i-am-done-here/</guid>
      <description><![CDATA[&#160;  It was short, it was fun, but sometimes I was too busy to post a new blog.&#160; So, I am...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p><font size="3">It was short, it was fun, but sometimes I was too busy to post a new blog.&#160; So, I am moving my attention to a team blog located at <a href="blogs.technet.com/b/askpfeplat">blogs.technet.com/b/askpfeplat</a>.</font></p>  <p><font size="3">This is a group of Microsoft Premier Field Engineers (PFE) sharing a blog for platforms.&#160; Hence the name “Ask PFE Platforms.”&#160; You will find some great posts there already, and today was my first contribution to the team blog.</font></p>  <p><font size="3">So, no more needed to be said here.&#160; Go to the blog already!&#160; “<a href="blogs.technet.com/askpfeplat">Ask PFE Platforms</a>.”</font></p>  <p><font size="3">Thanks,</font></p>  <p><font size="3">Doug Gabbard, Microsoft Senior PFE</font></p>]]></content:encoded>
    </item>
    <item>
      <title>It Takes Two–DNS scavenging</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/it-takes-twodns-scavenging</link>
      <pubDate>Thu, 09 Feb 2012 13:13:11 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2012/02/09/it-takes-twodns-scavenging/</guid>
      <description><![CDATA[&#160;   Scavenging works great on Microsoft Active Directory Integrated DNS.&#160; So why does it...]]></description>
      <content:encoded><![CDATA[<p>&#160; </p>  <p><font size="3">Scavenging works great on Microsoft Active Directory Integrated DNS.&#160; So why does it get blamed for DNS issues?&#160; The reason is pretty simple and can be summarized with two words: Patience and Misunderstanding. </font></p>  <p><font size="3">First let’s understand how it works.&#160; It takes two.&#160; Yes there two configurations to set and they are both needed for the scavenging to be automated.&#160; </font></p>  <p><font size="3"></font></p>  <ul>   <li><font size="3">Server Scavenging Must Be Enabled </font>      <ul>       <li><font size="3">Settings Do not replicate </font></li>        <li><font size="3">Restart of DNS restarts countdown</font></li>     </ul>   </li>    <li><font size="3">Zone Aging Must Be Enabled </font>      <ul>       <li><font size="3">Refresh/No Refresh settings replicate </font></li>        <li><font size="3">Time stamps replicate if aging is enabled</font></li>     </ul>   </li> </ul>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/5635.image_3B17CA0A.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/5635.image_5F00_3B17CA0A.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/0458.image_thumb_0847C396.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/0458.image_5F00_thumb_5F00_0847C396.png" width="198" height="244" /></a></p>  <ul>   <ul>     <ul>       <ul>         <ul>           <ul>             <li><font size="3">Server Scavenging </font>                <ul>                 <li><font size="3">Managed on DNS server properties </font></li>                  <li><font size="3">Not replicated to other servers </font></li>                  <li><font size="3">Initiates event log entry (2502)</font></li>               </ul>             </li>           </ul>         </ul>       </ul>     </ul>   </ul> </ul>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/8358.image_1298E7F6.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/8358.image_5F00_1298E7F6.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" align="left" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/3162.image_thumb_66E81DF9.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/3162.image_5F00_thumb_5F00_66E81DF9.png" width="225" height="244" /></a></p>  <ul>   <ul>     <ul>       <ul>         <ul>           <ul>             <ul>               <li><font size="3">Aging Enabled </font>                  <ul>                   <li><font size="3">Managed on each zone’s properties </font></li>                    <li><font size="3">Refresh/No Refresh </font></li>                    <li><font size="3">Settings replicate </font></li>                    <li><font size="3">Time stamps replicate</font></li>                 </ul>               </li>             </ul>           </ul>         </ul>       </ul>     </ul>   </ul> </ul>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p>&#160;</p>  <p><font size="3">So let’s talk about those 2 settings: since it takes two..</font></p>  <p><font size="4">Scavenging Setting</font></p>  <p><font size="3">Server scavenging should be looked at as an event in time that occurs every X days.&#160; Which 7 is the default value.&#160; So if a server is configured to scavenge records it will do so every 7 days like a scheduled task.&#160; A problem with this, is that the time restarts when the DNS server or service restarts.&#160; Therefore, if you reboot or restart the DNS service on your scavenging server, it will be 7 days out before it scavenges.</font></p>  <p><font size="3">If aging is not setup, the scavenging event will still occur, but have nothing to do.&#160; For the scavenging to actually delete records it takes two and thus far I am only talking about the scavenging setting on the server.&#160; Remember, this does not replicate, meaning if you retire the scavenging server and do not select another, you are no longer scavenging records if this was you only scavenging server.</font></p>  <p><font size="3">Moving on the the 2nd of “it takes two.”</font></p>  <p><font size="4">Aging</font></p>  <p><font size="3">Aging is independent of scavenging.&#160; You do not have to setup scavenging for the aging to work.&#160; In-fact, I would recommend setting up aging before scavenging so you can see what a scavenging server is going to see.</font></p>  <p><font size="3">By default aging is disabled and with aging disabled, time stamps on the DNS records are not replicated.&#160; This should explain why Scavenging has nothing to do if aging is disabled.&#160; If aging is disabled but scavenging is enabled, the scavenging event will occur and simply skip each zone and log event 2501 in the DNS log stating it did its job and did not delete any records.&#160; Enabling aging opens the gates of replication for the DNS records, so that all DNS servers hosting the zone have updated time stamps and are candidates to be a scavenging server.</font></p>  <p><font size="3">Keeping with the “It takes two” theme - Aging has two key settings:&#160; NO refresh and Refresh Intervals.</font></p>  <p><font size="3">When you turn on aging DNS record timestamps begin to replicate.&#160; The NO refresh interval is there to dampen/reduce replication traffic.&#160; There is no need to keep accepting refreshes if the IP is the same and some user or service is refreshing the record.&#160; Default is 7 days.&#160; This means once a record is created/refreshed it will not accept a refresh to the time stamp for 7 days.</font></p>  <p><font size="3">The refresh interval is the time DNS will accept a refresh to the time stamp.&#160; And actually the interval is open ended and will accept a refresh on any day past the NO refresh as long as it exists in DNS.&#160; The interval is there to provide a calculation on what is stale.&#160; The scavenging event will delete any record that is older than NO refresh + Refresh.&#160; By default that would be older than 14 days.</font></p>  <p><font size="3">Great stuff.&#160; But you say you have everything setup correctly but you see records as old as 20 days and some real close to 21.&#160; What gives?&#160; What happens is this.&#160; If a record was just under 14 days old when scavenging occurred and the next scheduled scavenging event is 7 days out, then that would put that record at almost 21 days old when it would actually get deleted.&#160; This graphic below will depict this much better than my words and you can see it gets deleted on day 15:</font></p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/0447.image_062AC4CD.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/0447.image_5F00_062AC4CD.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/0116.image_thumb_05525EE3.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/0116.image_5F00_thumb_5F00_05525EE3.png" width="698" height="522" /></a></p>  <p>&#160;</p>  <p><font size="3">One last discussion.&#160; Common mistakes with setting up scavenging.</font></p>  <ol>   <li><font size="3">Refresh interval too short – results in lost DNS records because clients have insufficient time to refresh their records</font></li>    <li><font size="3">Not patient.&#160; When I work with engineers that are tasked with setting up scavenging.&#160; For some reason they feel the need to speed up the 7 day/ 7 day /7 day settings.&#160; Just remember if it hasn’t been setup for years, why today, does it have to be done fast pace all of a sudden.</font></li>    <li><font size="3">Aging is zone by zone by zone and it replicates with its partners.&#160; You must setup aging on each individual zone if you want that zone to be scavenged.&#160; Don’t forget the reverse lookup zones.</font></li>    <li><font size="3">Make sure the DNS servers accept dynamic updates</font></li>    <li><font size="3">Make sure the clients are configured for automatic updates.</font></li>    <li><font size="3">TEST IN LAB before making any production changes.</font></li>    <li><font size="3">BACKUP your DNS prior to making any changes.</font></li>    <li><font size="3">Monitor for event ID 2501 – make sure it is happening and deleting records.</font></li> </ol>  <p><font size="3"></font></p>  <p><font size="3">To close out my fun with it takes two here is a summary.</font></p>  <ul>   <li><font size="3">Scavenging still occurs with aging disabled on all zones, but will just skip every zone and log that it succeeded.</font></li>    <li><font size="3">Aging without scavenging only increases replication traffic.&#160; Aging will never delete a record by itself.</font></li>    <li><font size="3">With both disabled: well I think you know that answer.</font></li> </ul>]]></content:encoded>
    </item>
    <item>
      <title>Share Your Sources</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/share-your-sources</link>
      <pubDate>Sat, 04 Feb 2012 11:21:47 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2012/02/04/share-your-sources/</guid>
      <description><![CDATA[&#160;  I am interested what you read or sources you use to keep up with technical information in...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p><font size="3">I am interested what you read or sources you use to keep up with technical information in your field.&#160; Working for Microsoft and focusing on platform technology, I obviously lean toward Microsoft information.&#160; I seem to learn the most from <a href="www.blogs.technet.com/askds">www.blogs.technet.com/askds</a>.&#160;&#160; This blog is all about Directory Services and provides great insight and practical application of many concepts.&#160; Sometime there is humor injected in the posts which makes the reading more human.&#160; I have frequently used askds on site with customers and when trying to learn a new concept in my labs.</font></p>  <p><font size="3">Non-Microsoft resources that I use A LOT are on <a href="www.twit.tv">www.twit.tv</a>.&#160; There are many podcasts available and I am sure you will find one or more that fits your niche.&#160; I listen to two of them regularly (seldom miss).&#160; First is <em>Security Now</em> hosted by Leo Laporte with Steve Gibson from Gibson Research on <a href="www.grc.com">www.grc.com</a>.&#160;&#160; Through this podcast I keep up to date on the latest security vulnerabilities and what industry is doing about them.&#160; He will talk about anything that is cool in security as well what’s not cool in security.&#160; He also talks about his harddrive recovery utility: SpinRite.&#160; So you may know of him through that tool.&#160;&#160; His last podcast covered risks with WPS (a new easy security setup) protocol for wireless routers.&#160; Well worth listening to as are all his podcasts if you are in to security.</font></p>  <p><font size="3">The second podcast I frequent is <em>Windows Weekly.</em>&#160; This one is also hosted by Leo Laporte with Paul Thurrott (author of Super Site for Windows - <a href="www.winsupersite.com">www.winsupersite.com</a> ) and Mary Joe Foley (blog on zdnet - <a title="www.zdnet.com/blog/microsoft" href="www.zdnet.com/blog/microsoft">www.zdnet.com/blog/microsoft</a> ).&#160; This podcast has great updates on Windows 7 and Windows Phone 7.&#160; They are also dabbling in Windows 8, but with not much released they mostly speculate where they are unsure.</font></p>  <p><font size="3">Other resources I use:</font></p>  <p><font size="3"><a href="www.wservernews.com">www.wservernews.com</a> – great for insights and some non-technical links to cool videos.</font></p>  <p><font size="3"><a href="www.techrepublic.com">www.techrepublic.com</a>.&#160; This was one of my main study resources in the early days of my MCSE certifications.</font></p>  <p><font size="3">When all else fails, I use <a href="www.bing.com">www.bing.com</a>.&#160; </font></p>  <p><font size="3"></font></p>  <p><font size="3">What do you use?&#160; Post your favorites in the comments below.&#160; Try to keep it one or two of your favorites and tell us why you like it.&#160; I am sure we will learn from each other.</font></p>]]></content:encoded>
    </item>
    <item>
      <title>How to Trace a Logon Using Only One Machine</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/how-to-trace-a-logon-using-only-one-machine</link>
      <pubDate>Sat, 04 Feb 2012 04:08:08 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2012/02/04/how-to-trace-a-logon-using-only-one-machine/</guid>
      <description><![CDATA[This is a Lab for you learn some basics for logon.&#160; You can use this to observe user logon...]]></description>
      <content:encoded><![CDATA[<h3>This is a Lab for you learn some basics for logon.&#160; You can use this to observe user logon traffic for DNS, Kerberos, SMB, and more.</h3>  <p><b></b></p>  <h4><sub></sub><sub></sub><sub></sub><sub></sub><sub></sub><sub></sub><sub></sub><font size="3">Setup</font></h4>  <p><font size="2">There are a couple of ways to collect a trace during logon from a client. One way is to hook up a hub to the client and use another client connected to the same hub to capture the traffic.&#160; However, with the help with a SysyInternals tool (PSexec.exe) and NMcap.exe we can collect a trace of a logon just using the client.</font></p>  <p><font size="2">We will use PSEXEC to launch NmCap as system, so that when you log off the network trace will continue to run. In the command to launch NmCap we will give it a trigger to stop the trace. Once the trace is started, simply log off and back on. Then use the trigger to stop the trace.&#160; I provide a trigger using ping, but there are others such as “/timeafter 5 min” where the trace will stop by itself.</font></p>  <p><font size="2">To set this up perform the following tasks on your client machine.</font></p>  <p><font size="2">1. Install Netmon 3.x</font></p>  <p><font size="2">2. Download PSexec if you do not have a copy already</font></p>  <p><font size="2">3. Open an Explorer window</font></p>  <p><font size="2">4. Navigate to the root of the C: drive</font></p>  <p><font size="2">5. Create folder with the name C:\LogonTrace</font></p>  <p><font size="2">6. Copy PSEXEC.EXE into the folder</font></p>  <p><font size="2">7. Create a text file named LogonTrace.cmd</font></p>  <p><font size="2">8. Enter the following command in the text file:</font></p>  <p><b><font size="2">psexec -d -s &quot;C:\Program Files\Microsoft Network Monitor 3\nmcap.exe&quot; /network * /capture /file c:\LogonTrace\Logon_Trace.cap /stopwhen /frame Ipv4.DestinationAddress == 1.2.3.4</font></b></p>  <p><font size="2">You are now ready to create the trace</font></p>  <p><b>     <br /><font size="2"></font></b></p>  <p><b><font size="2"></font></b></p>  <p><b><font size="2">Create a trace during your logon</font></b></p>  <p><font size="2">1. Open a command prompt on client used in the setup above (run as administrator)</font></p>  <p><font size="2">2. Navigate to the C:\LogonTrace folder</font></p>  <p><font size="2">3. Type <b>LogonTrace.cmd</b></font></p>  <blockquote>   <p><font size="2">The trace is now running</font></p> </blockquote>  <p><font size="2">4. Log off</font></p>  <p><font size="2">5. Log on</font></p>  <p><font size="2">6. Open a cmd prompt (run as admain again) and use IPCONFIG to register DNS to force some DNS traffic</font></p>  <blockquote>   <p><font size="2">if you like, open task manager to see nmcap.exe process is running</font></p> </blockquote>  <p><font size="2">7. Type <strong>ping 1.2.3.4</strong></font></p>  <blockquote>   <p><font size="2">This should stop the trace – look at taskmanager again to verify</font></p> </blockquote>  <p><font size="2"></font></p>  <p><font size="2">Now you should have a trace with logon traffic for your user account.&#160; Review the trace to find specific information related to locating domain controllers, registering DNS, locating SYSVOL for GPOs and logon scripts, etc.</font></p>  <p>   <br /><font size="2">Here are some useful filters you may find helpful.</font></p>  <p><font size="2">To filter on traffic sent to and received from your client use the following filter:</font></p>  <blockquote>   <p><font size="2">Ipv4.address == &lt;IP Address of client&gt;</font></p> </blockquote>  <p><font size="2">Here are two different filters for Kerberos traffic. Try them both to see if you get a difference.</font></p>  <blockquote>   <p><font size="2">Tcp.port==88 || udp.port==88</font></p>    <p><font size="2">Or you could use a very simple filter</font></p>    <p><font size="2">keberosV5</font></p> </blockquote>  <p><font size="2">You can use the following for SMB when looking for SYSVOL connections:</font></p>  <blockquote>   <p><font size="2">Tcp.port==445</font></p>    <p><font size="2">or you can use the protocol again</font></p>    <p><font size="2">smb || smb2</font></p> </blockquote>  <p>&#160;</p>  <p><font size="3">You should experiment with other protocol and port filters to find other traffic as well.&#160; The few filters above are just some examples to get you started.&#160; Enjoy</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Sometime it is the Simple Things</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/sometime-it-is-the-simple-things</link>
      <pubDate>Fri, 20 Jan 2012 11:16:47 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2012/01/20/sometime-it-is-the-simple-things/</guid>
      <description><![CDATA[Yes sir!&#160; This is a short post, or at least a softball so to speak.&#160; But as I travel and...]]></description>
      <content:encoded><![CDATA[<p>Yes sir!&#160; This is a short post, or at least a softball so to speak.&#160; But as I travel and meet engineers I find that often it is the simple things that we have forgotten that can make our lives easier.</p>  <p>With the growth of PowerShell many of us are finding we are using a command window of one kind or another for a DOS command or a PowerShell command.&#160; So if I can be so bold, my first recommendation is to just use the PowerShell window and not open a CMD window.&#160; You can do all your favorite DOS commands and PowerShell commands in PowerShell.&#160; If you haven’t made your New Year’s resolution – this is it, start launching PowerShell.</p>  <p>Here is my simple tip:</p>  <p>F7</p>  <p>That’s it. F7.&#160; Don’t feel bad if you forgot or was not aware using F7 in a command window.&#160; Here is what it does.&#160; Once you have typed a few commands or many commands you can use F7 to see a list of the commands you have typed and can easily use your arrow keys to navigate.&#160; Once you locate the command you want you have a choice on how it behaves.&#160;&#160; Hit enter and the highlighted command executes.&#160; If you want to edit the command prior to executing, then hit the left or right arrow after highlighting the command. </p>  <p>The other method is to not use F7 and use the up and down arrow keys to find your command.&#160; I use both methods.&#160; In addition, since I have exposed F7 there are other function keys as well you may be interested in.&#160; But I do not use them:</p>  <p>Here they all are:</p>  <p>F2 – “Enter char to copy to.”&#160; This allows you to tell it to go the nth character of the previous command.&#160; Maybe you count as you type, but I don’t.&#160; This may be useful sometime.&#160; However, I cannot think of a time.</p>  <p>F3 – brings the previous command back (same as hitting the up arrow once, but cannot keep going up).</p>  <p>F7 - brings up a window with choices.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/3755.image_2BD28D50.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/3755.image_5F00_2BD28D50.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/2185.image_thumb_697F750C.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/2185.image_5F00_thumb_5F00_697F750C.png" width="244" height="163" /></a></p>  <p>So I know you are going to do it, so stop reading this and open PowerShell and type a few commands then hit F7.</p>]]></content:encoded>
    </item>
    <item>
      <title>A Look into the Future Using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/a-look-into-the-future-using-powershell</link>
      <pubDate>Thu, 05 Jan 2012 06:54:03 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2012/01/05/a-look-into-the-future-using-powershell/</guid>
      <description><![CDATA[&#160;  I was on site (some time ago) reviewing data for an ADRAP (Active Directory Risk Assessment...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>I was on site (some time ago) reviewing data for an ADRAP (Active Directory Risk Assessment Program).&#160; One of the issues identified was an event log entry.&#160; The eventID is not significant for this discussion, other than I was looking for an event.&#160; The ADRAP tool looks 5 days back by default and I wanted to look for the total number of occurrences on all the domain controllers and not be restricted to 5 days.</p>  <p>I could have easily modified the settings on the ADRAP tool to look further back in time, however I was interested in only a single event ID.&#160; So I broke out <a href="https://support.microsoft.com/kb/308471">eventComb</a>.&#160; I then searched for the event looking many months in the past and to my surprise eventComb did not find a single occurrence of the event I was trying to find.</p>  <p>I had to have done something wrong: typo on the events, wrong date range, or some other user error.&#160; After some head scratching I looked back at the ADRAP tool event and found the event I was looking for occurred 5 months in the FUTURE.&#160; Argh!</p>  <p>My focus changed.&#160; I was now more concerned to find which domain controllers had future events – which would indicate a time shift.&#160; Moving time forward and back or vice versa can be detrimental to say the least to the entire forest.</p>  <p>I could have used eventComb again, but being a novice at PowerShell I decided to try my hand at PowerShell to find events on all domain controllers regardless of the event ID that occurred in the future.</p>  <p>A simple command in powershell can find this for you:</p>  <p>get-eventlog –log system –computer dc1.contoso.com –after 1/5/2012</p>  <p>This is great if you only have 1 DC and only want to look in the system log.&#160; Or have idle time on your hands and can keep running the same command manually for each log on each DC.&#160; Not practical.&#160; So I have polished that command into a script and have it here for you.&#160;&#160; It is not domain specific, but only looks in the system, application, and security logs.&#160; I did not choose the NTFRS log because it is not very active and not a likely location to find a future event.&#160; Likewise, I did not include the DNS log because you may not have DNS on all domain controllers.&#160; However, the three event logs should provide a hit if there is a future event.</p>  <p>&#160;</p>    <div style="background-color: #f0f0f0"><font face="Courier New">import-module ActiveDirectory      <br />$EVTlogs = &quot;System&quot;,&quot;Application&quot;,&quot;Security&quot;       <br />$d2 = Get-Date (get-date).AddDays(2) -uformat %m/%d/%y       <br />$d0 = Get-Date -uformat %m/%d/%y</font>        <p><font face="Courier New">cls        <br />write-host &quot;This simple script looks for future events on all Domain Controllers in the current domain&quot;         <br />write-host &quot;I set the future to 2 days ahead to ensure that the events recorderd while the script is running&quot;         <br />write-host &quot;do not get flagged as future events&quot;         <br />write-host &quot; &quot;         <br />write-host &quot;If future events are discovered it will display red on yellow&quot; -foregroundcolor red -backgroundcolor yellow         <br />write-host &quot; &quot;         <br />write-host &quot; &quot;</font></p>    <p>     <br /><font face="Courier New">$machine = Get-ADDomainController -Filter { isglobalcatalog -eq $TRUE -or isglobalcatalog -eq $FALSE} | ForEach-Object {</font></p>    <p><font face="Courier New">write-host &quot; &quot;        <br />write-host &quot;=================================================&quot;         <br />write-host &quot;Reviewing&quot; $_.hostname &quot;System, Application, and Security Event Logs&quot;         <br />write-host &quot;Today's date is $d0&quot;         <br />write-host &quot;Looking for dates $d2 and beyond&quot;         <br />write-host &quot;=================================================&quot;</font></p>    <p><font face="Courier New">Foreach ($whichLog in $EVTlogs) {</font></p>    <p><font face="Courier New">if ($findout = get-eventlog –log $whichlog -computer $_.HostName -after $d2)        <br />{write-host &quot;Future events found in: &quot; $whichlog -foregroundcolor red -backgroundcolor yellow}         <br />else         <br />{write-host &quot;No Future events found in: &quot; $whichlog}}         <br />}         <br />        <br />write-host &quot; &quot;         <br />write-host &quot;/\/\/\/\/\/\/\/\&quot;         <br />write-host &quot;Search Complete&quot;</font></p> </div>]]></content:encoded>
    </item>
    <item>
      <title>Managing Client Machine Local Admin Rights</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/managing-client-machine-local-admin-rights</link>
      <pubDate>Mon, 12 Sep 2011 06:19:38 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2011/09/12/managing-client-machine-local-admin-rights/</guid>
      <description><![CDATA[&#160;  Restricted Groups  Restricted Groups! Argh! We have all done this at least once: Setup a...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>Restricted Groups</p>  <p>Restricted Groups! Argh! We have all done this at least once: Setup a restricted group thinking it would add to the local administrators group of the local machines for the users only to find that the policy removes the existing members and replaces them with the users defined by the policy. This is great if every machine has same set of requirements for who should be local administrators. This is seldom true.</p>  <p>Wouldn't it be nice for the user to be able to call the help desk to request permission to be local admin of their machine and with proper approval have the help desk place that user in the local administrators without adding them to every machine (restricted group policy) and without having to modify a GPO AND without manually adding them to the local administrators group? Wouldn't it be nice to not have run on sentences?</p>  <p>So good news for you.&#160; There is a way to manage the local administrator groups on local machines with GPO Preferences. What is really COOL here is that you do not need a Windows 2008 or a 2008 R2 domain controller. YES, you can do this in a Windows 2003 forest/domain with no Windows 2008 or 2008 R2 domain controllers. Ah, but I have a mix of XP and Windows 7 clients, you say. This works from XP SP2 (not supported) and up.</p>  <p>It takes a few steps to setup, but it gives granular control to give a specific user, users, or groups administrative rights&#160; to a specific computer. The following is the framework needed to accomplish this task.</p>  <p>Framework needed:</p>  <ol>   <li>Windows 2003 or greater forest. Really! Yes, really.</li> </ol>  <ol>   <li>GPO Policy needs to be managed from Windows 7/2008 R2 or Vista/2008 (Does not have to be a domain controller). Once you move to Windows 7/2008 R2, do not use Vista or 2008 or 2003/XP to manage policies.</li>    <li>You will need a group name for each machine account that you want to manage.     <ol>       <li>For example a machine name CIN1234W7 would also have a global group or domain local group named &quot;CIN1234W7 - Admins.&quot; Or something of that nature. </li>     </ol>      <ol>       <li>The cool part here is if the group does not exist, the machine will not apply the policy. No harm done.</li>        <li>The Help Desk can use this group add a user for local administrative access. And can likewise remove the user from the group when local administrative access is no longer needed.</li>     </ol>   </li> </ol>  <ol>   <li>One GPO applied on an OU above the machine accounts</li> </ol>  <ol>   <li>For Windows XP, the Client Side Extensions for preferences needs to be applied. This will work for XP SP2 and above.     <ol>       <li>Client side extension: <a href="https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=3628">www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=3628</a></li>     </ol>      <ol>       <li>Look here for MS Support Policies: <a href="https://support.microsoft.com/lifecycle">support.microsoft.com/lifecycle</a></li>     </ol>   </li> </ol>  <p>Here are three GPO choices to manage local administrative access:</p>  <ol>   <li>Use restricted groups - old method not granular and applies to many machines     <ol>       <li>This is the old school method and is more like a authoritarian rule that says this is what everybody gets. You could make this a little granular by creating multiple GPOs linked to each OU but any changes to group membership would require a GPO change that affects all machines under this policy.</li>     </ol>   </li> </ol>  <ol>   <li>Use preferences with a form of restricted groups (most control)     <ol>       <li>May not scale to larger environments</li>        <li>However, not needed to be made a global policy across all machines</li>        <li>This clears current membership and populates it as restricted groups would do.</li>        <li>Allows Help Desk to add to the local administrators with a simple group membership change</li>     </ol>   </li> </ol>  <ol>   <li>Use only one preference setting (only adds to existing groups)     <ol>       <li>Similar to the 2nd choice, but this only adds to the existing members and does not remove any members. So if the build process is adding groups that need local administrative access (and those groups will never change - ha ha), then this would work.</li>        <li>If the groups change you could always use choice 1 or 2 to clean them out.</li>     </ol>   </li> </ol>  <p>So with all that up front, let's sort of start over and redefine the problem and solution.</p>  <p>Problem: </p>  <p>Provide consistent set of support engineers local administrative rights and also on request, temporarily (or long term), grant specific user or groups local administrative rights. Without impacting all machines under the policy.</p>  <p>Solution:</p>  <p>Group Policy Preferences. Computer Configuration/Control Panel Settings/Local Users and Groups and add two new settings.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/7318.clip_image001_47A6178E.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/7318.clip_5F00_image001_5F00_47A6178E.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image001" border="0" alt="clip_image001" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/8308.clip_image001_thumb_11C12274.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/8308.clip_5F00_image001_5F00_thumb_5F00_11C12274.png" width="244" height="176" /></a></p>  <p>This policy above is shown completed after the two steps below.</p>  <p>Step 1: Define standard local admins that should be on the workstations.&#160; This is the same as the restricted group you are familiar with.&#160; To get the dialog box below create a new policy and navigate to the “Local Users and Groups” under the Preferences settings for Computer Configuration.&#160; Then in the window to the right, Right Click and choose New: Local Group and complete as shown below. Take note of the two check boxes, we will be doing something different for the next step.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/5340.clip_image002_25DA3EFD.jpg" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/5340.clip_5F00_image002_5F00_25DA3EFD.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image002" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/3515.clip_image002_thumb_2501D913.jpg" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/3515.clip_5F00_image002_5F00_thumb_5F00_2501D913.jpg" width="222" height="244" /></a></p>  <p>This list of Members are the members that should always have local admin rights.&#160; Note both Delete All check boxes are checked.&#160; This makes it work like the restricted groups that you are used to.&#160; So to add the flexibility of adding a single user to the local admin you need to add the second group which is the dialog box below.</p>  <p>Step 2:&#160; Add a specific domain group to the local admins.</p>  <p>Same steps as above with in the same policy add another group. Note the &quot;Delete all…&quot; check boxes are not checked.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/5153.clip_image003_5D40502B.jpg" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/5153.clip_5F00_image003_5F00_5D40502B.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image003" border="0" alt="clip_image003" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/6242.clip_image003_thumb_477667CE.jpg" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/6242.clip_5F00_image003_5F00_thumb_5F00_477667CE.jpg" width="222" height="244" /></a></p>  <p>This above MEMBER is “%DomainName%\%ComputerName - Administrators”&#160;&#160; Without the quotes. This is a global group (could be domain local) but that group does not need to exist unless you want to grant additional users admin rights.&#160; If it does not exist then the policy will ignore it.&#160; If the group exists then those in the group are added to the local admins.&#160; Using Environment Variables %ComputerName% gives you the granular control you need. Want a list of available environment variables? After clicking the Add button press F3 to see a list of available environment variables.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/3000.clip_image004_4DBD3E5C.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/3000.clip_5F00_image004_5F00_4DBD3E5C.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="clip_image004" border="0" alt="clip_image004" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/87/23/metablogapi/6735.clip_image004_thumb_1AED37E8.png" original-url="blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-87-23-metablogapi/6735.clip_5F00_image004_5F00_thumb_5F00_1AED37E8.png" width="193" height="244" /></a></p>  <p>It is important the order of adding the two &quot;local group&quot; settings. If you reverse them, then the result will only be the members of the setting that has the &quot;delete all…&quot; boxes checked since it would be the last one processed.</p>  <p>Once this is setup let’s say a user named Joe User needs &quot;Administrative&quot; access to his local computer named LTCincy001.&#160; The steps to grant him admin rights are to create a group in AD named “LTCcncy001 - Administrators” and put Joe User in it.&#160; That’s it.&#160; A GPO refresh will add him to the local administrators without impacting the other computer local administrator group memberships.&#160; GPupdate /force will do the trick.</p>  <p>So you could pre-create all, some, or none of these groups with no members and delegate permissions to manage the group membership if you want to control it that way. There are many possibilities.</p>  <p>Hopefully, this gets some of your creative minds thinking and make you want to dive into group policy preferences a little deeper.</p>  <p>&lt;theEnd&gt;</p>]]></content:encoded>
    </item>
    <item>
      <title>Build a Lab</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/build-a-lab</link>
      <pubDate>Wed, 24 Aug 2011 11:06:36 GMT</pubDate>
      <dc:creator><![CDATA[Doug Gabbard [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2011/08/24/build-a-lab/</guid>
      <description><![CDATA[&#160;  It’s about time.&#160; After much promising and procrastinating and so on and so on, I am...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p>It’s about time.&#160; After much promising and procrastinating and so on and so on, I am finally here.&#160; This is my first real blog post.&#160; Introductions don’t count.&#160; </p>  <p>This blog walks through some basic steps to setup a lab from a production network.&#160; I am sure you can modify it to fit your needs.&#160; The main goal to create a lab that closely resembles a production environment without breaking any rules.&#160; We will be creating a lab from the ground up that hopefully looks like your production environment.&#160;&#160; Here are some DO NOTS before we get into the steps of creating a lab:</p>  <blockquote>   <p>DO NOTS</p>    <ol>     <li>DO NOT create a snapshot of domain controller and place in an isolated network – someone will UN isolated the lab one day and your mileage will vary WHEN (not if) that happens.</li>      <li>DO NOT take a physical domain controller from production domain to an isolated network to build a lab – It is feasible that a lab network that has had all the production domain controllers’ metadata removed from the lab can then successfully remove the domain controllers from the production environment also WHEN they two environments are UN isolated.</li>      <li>DO NOT use backups of a production environment to create a lab – the lab forest will have the same forest GUID and if connect to production will cause issues.</li>      <li>DO NOT use production domain controllers for testing – no matter how much you promise the testing will not replicate to the other domain controllers and that the domain controllers used for testing will be formatted and all metadata removed.</li>      <li>DO NOT give the lab forest name the same as the production forest.&#160; Using the same name will confuse even the best engineer and can lead to changes being made to the wrong environment.</li>      <li>DO NOT not have a lab.&#160; Is that grammatically correct – NOT not?</li>   </ol>    <p>So then the obvious question is how do I get a lab that closely mirrors or resembles my production without putting my production environment at risk.&#160;&#160; Glad you asked.&#160; On with one possible solution:</p>    <p>The discussion below provide some hints on setting up a virtual environment by exporting data from production to the test lab.&#160; This uses a Windows 2003 forest to conveniently walk you right in to a lab at the end.&#160; So this is a two for one post.&#160; One – setting up a lab to use for testing and Two – a lab to convert FRS to DFSR.&#160; </p>    <p>One last comment, or one more DO NOT to add to the list above.&#160; DO NOT take my labs straight to a production environment.&#160; I cannot envision all the possible scenarios and roadblock you will face in your production environment.&#160; Rather, use these labs to get a better understanding how things work in directory services.&#160; My future labs will be a much shorter post than this one and will be making assumptions that you can do most of the steps without detailed step by step instructions.&#160; When in doubt use <a href="bing.com">bing.com</a> to do a little research and if you feel the need to share, by all means leave comments.</p>    <p>Enjoy</p>    <p><strong><font size="4">Getting Started - Set up a Virtual Host</font></strong></p> </blockquote>  <blockquote>   <p>Suggestions to make life in your lab easier:</p> </blockquote>  <blockquote>   <p><strong>For Windows 2003 machines</strong></p> </blockquote>  <ul>   <li>Install support tools, resource kit tools, GPMC, and any other tools you might need. (i.e. Netmon3.x, Pstools etc.)</li>    <li>Load i386 folder on the image or create an ISO of the OS.</li> </ul>  <blockquote>   <p><strong>For all OSes</strong></p> </blockquote>  <ul>   <li>Create ISOs for each operating system.</li>    <li>Create an ISO with all your favorite tools and files.</li>    <li>You can find utilities that can convert a folder to an ISO. This method is very useful in a virtual environment. You can search with Bing to find utilities that do this nicely.</li>    <li>Setup multiple VLANs in the lab to simulate sites better.</li>    <li>Work with the network team so that the router does not allow DHCP requests to pass through. This way you can test other services such as WDS, DHCP, MDT, etc.</li>    <li>Setup change control for the lab</li>    <li>Use the lab for training</li> </ul>  <blockquote>   <p><strong>Build a Windows 2003 Forest to upgrade to 2008/R2</strong></p> </blockquote>  <ul>   <li>Fully patch server and take a snapshot (before promoting to DC)</li>    <li>Configure the DC to point to itself for DNS</li>    <li>Raise FFL to 2003 if not there already</li>    <li>Verify DNS is stored in the DomainDNSzones (application partition)</li>    <li>Verify DC is a global catalog server</li>    <li>Run ADRPEP32 /Forestprep and ADPREP32 /DomainPrep to prepare the forest for Windows 2008 R2. Use the 2008 R2 CD to run \support\adprep\adprep32.exe</li> </ul>  <blockquote>   <p><strong>Add a Windows 2008 R2 domain controller</strong></p> </blockquote>  <ul>   <li>Add DNS and GC function during the DCpromo process</li>    <li>Transfer all the FSMO roles to the 2008 R2 DC</li>    <li>Configure DNS to point to itself and the IP address of the second DC as a secondary</li> </ul>  <blockquote>   <p><strong>Add a second Windows 2008 R2 domain controller</strong></p> </blockquote>  <ul>   <li>Add DNS and GC function during the DCpromo process</li>    <li>Configure DNS to point to itself and the IP address of the First 2008 R2 DC as a secondary</li>    <li>DCPromo (Demote) the Windows 2003 server.</li> </ul>  <blockquote>   <p><strong>Setup Sites and Services</strong></p> </blockquote>  <ul>   <li>Create new site - Spoke1</li>    <li>Rename DefaultFirstSite to Hub</li>    <li>Rename DefaultSiteLink to Hub-Spoke1</li>    <li>Set interval on the site link to 15 minutes</li>    <li>Enable change notification on the site link: Use ADSIedit.msc. Find the site link in the configuration container and edit the properties of the site link. Find the &quot;options&quot; attribute and set it to 1.</li>    <li>Move one of the DCs to the spoke site.</li>    <li>Add subnets with a 32 bit subnet masks for the DCs in the appropriate site</li> </ul>  <blockquote>   <p><strong>Exporting data from Production (manually from command line)</strong></p> </blockquote>  <ul>   <li>Use GPMC scripts to export the production environment to an XML file</li>    <li>Create a folder to export to:</li> </ul>  <blockquote>   <p>In my steps&#160; below I am using the following folder on a thumb drive.&#160;&#160; e:\Lab\GPOBackups</p> </blockquote>  <blockquote>   <p><em>Cscript CreateXMLfromEnvironment.wsf e:\lab\prod.xml /domain:contoso.com /DC:&lt;DCNAME&gt; /templatepath:e:\lab\gpobakups /includeusers       <br /></em><strong></strong></p>    <p align="left"><strong>Exporting the data from production (Using a script)</strong></p>    <ul>     <li>       <div align="left">Create a cmd file named “ExportForLab.cmd” with following commands.</div>     </li>   </ul> </blockquote>  <blockquote>   <p>&lt;StartCopyHere&gt;</p> </blockquote>  <blockquote>   <p>REM Use desired drive letter     <br />E:      <br />CD\      <br />REM Delete folder if it exists      <br />RD LAB      <br />REM Create folders for GPMC scripts to use      <br />MD LAB      <br />CD LAB      <br />MD GPOBackups      <br />REM Change to the folder where GPMC scripts are stored      <br />C:      <br />“CD\Program files\Microsoft GPMC Scripts”      <br />Cscript CreateXMLfromEnvironment.wsf e:\lab\prod.xml /domain:contoso.com /DC:&lt;DCNAME&gt; /templatepath:e:\lab\gpobakups /includeusers</p> </blockquote>  <blockquote>   <p>&lt;EndCopyHere&gt;</p> </blockquote>  <blockquote>   <p><strong>Move data to Lab</strong></p>    <p><strong>Warning:</strong> Do not import data in to the production environment.&#160; Verify when running the “Import” script or command that you are working in the lab environment.</p> </blockquote>  <ul>   <li>Copy the folder structure from the production environment to the lab environment</li>    <li>ON THE LAB ENVIRONMENT:&#160; Use GPMC scripts to import the environment from the XML file to the lab. Using the /PasswordForUsers:Passw0rd1 means ALL users will have that password. It will not reset passwords if it has conflicts.&#160; You can do this by typing the command every time, or using a script.</li> </ul>  <blockquote>   <p><strong>Importing the data to the lab (manually on command line)</strong></p> </blockquote>  <blockquote>   <p><em>Cscript CreateEnvronmentFromXML /xml:e:\lab\prod.xml /domain:contoso-lab.com /dc:&lt;DCNAME&gt; /createusersenabled /PasswordForUsers:Passw0rd1</em></p> </blockquote>  <blockquote>   <p><strong>Importing the data to the lab (Using a script)</strong></p>    <p>Create a cmd file named “ImportForLab.cmd” with the following commands</p> </blockquote>  <blockquote>   <p>&lt;StartCopyHere&gt;</p> </blockquote>  <blockquote>   <p>REM Change to the folder where GPMC scripts are stored     <br />C:      <br />“CD\Program files\Microsoft GPMC Scripts”      <br />Cscript CreateEnvronmentFromXML /xml:e:\lab\prod.xml /domain:contoso-lab.com /dc:&lt;DCNAME&gt; /createusersenabled /PasswordForUsers:Passw0rd1</p> </blockquote>  <blockquote>   <p>&lt;EndCopyHere&gt;</p> </blockquote>  <blockquote>   <p>Basic lab build is complete and you are ready to use for testing and training as needed. So let's start with a basic FRS to DFSR migration</p> </blockquote>  <blockquote>   <p><strong><font size="3">FRS to DFSR</font></strong></p> </blockquote>  <blockquote>   <p>The first test with your new lab if you choose to do so is to migrate SYSVOL replication from FRS to DFSR.&#160; Please review the link to build a more thorough process for testing and roll out to production.&#160; Below are basic requirements and a short list of steps that you will be doing to migrate SYSVOL replication.&#160;&#160; With all labs and test – do this in a lab not production.</p>    <p><a href="https://technet.microsoft.com/en-us/library/dd640019(WS.10).aspx">technet.microsoft.com/en-us/library/dd640019(WS.10).aspx</a></p> </blockquote>  <blockquote>   <p>Follow the above document and steps recommended. The steps below are the short list of commands you will use to migrate from FRS to DFSR. The steps below are simple and in a lab environment will happen quickly. However in a production environment with many DCs and more complex replication topology will take considerably longer to migrate.</p> </blockquote>  <ul>   <li>Build a 2003 forest with one or two domain controllers</li>    <li>Use ADprep to prepare the forest for Windows 2008 or 2008 R2</li>    <li>Upgrade the DCs to 2008 or add two new 2008 or 2008 R2 DCs </li>    <li>Remove/demote the 2003 DCs if not upgraded</li>    <li>Raise domain functional level to 2008 or 2008 R2</li>    <li>Verify SYSVOL is replicating</li>    <li>Verify DFSR is running on all DCs and AD is replicating</li>    <li>Create a text file with all the domain controllers in the domain delimited with line feeds and name the text file “dclist.txt”. Then run the following commands and review the output. If you create a batch file for the commands below replace the single percentage signs with two percentage signs (%%a)</li> </ul>  <blockquote>   <p>For /f %a in (dclist.txt) do sc <a href="file:///\\%25a">\\%a</a> query dfsr &gt;&gt;%a_health.txt</p> </blockquote>  <blockquote>   <p>For /f %a in (dclist.txt) do Repadmin /replsummary %a &gt;&gt;%a_health.txt</p> </blockquote>  <blockquote>   <p>For /f %a in (dclist.txt) do repadmin /showrepl %a &gt;&gt;%a_health.txt</p> </blockquote>  <blockquote>   <p>Review each DC_health.txt for errors.</p> </blockquote>  <blockquote>   <p>Migrate FRS with DFSRmig.exe</p> </blockquote>  <blockquote>   <p>Dfsrmig /getmigrationstate (reports status of the migration – make sure all DCs have completed the current state before moving to the next state.</p> </blockquote>  <blockquote>   <p>Dfsrmig /setglobalstate 1 (Sets to prepared state)</p> </blockquote>  <blockquote>   <p>Dfsrmig /setglobalstate 2 (Sets to redirected state)</p> </blockquote>  <blockquote>   <p>Dfsrmig /setglobalstate 3 (Sets to eliminated state)</p> </blockquote>  <p>&#160;</p>  <p>&lt;the End – dougga&gt;</p>]]></content:encoded>
    </item>
    <item>
      <title>Introduction and First Blog Post</title>
      <link>https://docs.microsoft.com/archive/blogs/dougga/introduction-and-first-blog-post</link>
      <pubDate>Mon, 14 Feb 2011 08:11:06 GMT</pubDate>
      <dc:creator><![CDATA[Dougga]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dougga/2011/02/14/introduction-and-first-blog-post/</guid>
      <description><![CDATA[&nbsp;
Who am I and what do I want to do with my blog.
&nbsp;
First, my name is Doug Gabbard and...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Who am I and what do I want to do with my blog.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">First, my name is Doug Gabbard and I am a Senior Premier Field Engineer working at Microsoft focusing on directory services.<span style="mso-spacerun: yes;">&nbsp; </span>I been working in the field with our customers seeing both small and very large enterprise environments.<span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>I Enjoy working with customer environments (big and small) and appreciate the connections I get to make with talented engineers I meet on a weekly basis.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">I have been toying with posting a blog for some time and today is the day.<span style="mso-spacerun: yes;">&nbsp; </span>There are many blogs, so why another one.<span style="mso-spacerun: yes;">&nbsp; </span>Couple of reasons.<span style="mso-spacerun: yes;">&nbsp; </span>I have made many connections to engineers at various customers and often we reproduce how something works or create a lab to troubleshoot an issue - I want to share some of that with you (don't worry - I won't be putting your names in any of my posts for obvious reasons).<span style="mso-spacerun: yes;">&nbsp; </span>Another reason is I love to learn and it is through "doing it" when I learn the most. </p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Since I am about "doing it" to learn, my blog post will be mainly focused on labs to reproduce an issue or to understand the inner workings of some aspect of directory services.<span style="mso-spacerun: yes;">&nbsp; </span>Many classes we attend have labs that instruct us how to complete the lab.<span style="mso-spacerun: yes;">&nbsp; </span>However, those labs typically start with "click start, all programs, administrative tools, &hellip;&hellip;"<span style="mso-spacerun: yes;">&nbsp; </span>So, the labs I am going to post are going to assume you know how to do basic tasks.<span style="mso-spacerun: yes;">&nbsp; </span>If for example the lab requires RSAT tools on a Windows 7 client, you will see a step that states "install RSAT on the Windows 7 client."<span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>If you don't know how to perform the step you can search on <a href="www.bing.com/">www.bing.com</a> to find out how.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">I will struggle with the formatting of how I share the labs, but it will improve with comments from you.<span style="mso-spacerun: yes;">&nbsp; </span>You will find that my grammar will falter at times, please be kind.<span style="mso-spacerun: yes;">&nbsp; </span>My goal is to publish useful labs.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">In the next week or two I will publish my first lab blog.<span style="mso-spacerun: yes;">&nbsp; </span>The lab will be how to create a lab environment from a production environment running Windows 2003 to prepare for an upgrade to Windows 2008 or Windows 2008R2.<span style="mso-spacerun: yes;">&nbsp; </span>This will give you a lab that you can then use for other testing and for future labs I post.<span style="mso-spacerun: yes;">&nbsp; </span>I will never recommend that you practice my labs in your production environment.<span style="mso-spacerun: yes;">&nbsp; </span>Test Test Test!</p>]]></content:encoded>
    </item>
  </channel>
</rss>