<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Philip Flint &#187; Windows 2008 R2</title>
	<atom:link href="http://philipflint.com/tag/windows-2008-r2/feed/" rel="self" type="application/rss+xml" />
	<link>http://philipflint.com</link>
	<description>www.philipflint.com</description>
	<lastBuildDate>Wed, 25 Jan 2012 11:41:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Deploy Microsoft Unified Access Gateway (UAG) for a test or lab environment</title>
		<link>http://philipflint.com/2010/09/25/how-to-deploy-microsoft-unified-access-gateway-uag-for-a-test-or-lab-environment/</link>
		<comments>http://philipflint.com/2010/09/25/how-to-deploy-microsoft-unified-access-gateway-uag-for-a-test-or-lab-environment/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 22:21:40 +0000</pubDate>
		<dc:creator>Philip Flint</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Unified Access Gateway]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[UAG]]></category>
		<category><![CDATA[Windows 2008 R2]]></category>

		<guid isPermaLink="false">http://philipflint.com/?p=432</guid>
		<description><![CDATA[This article will walk through deploying the DirectAccess feature of Microsoft Forefront Unified Access Gateway (UAG) in a lab environment. My lab includes a domain controller (running Windows 2008 R2 Enterprise Edition), A file server, running Windows 2003 R2 Enterprise Edition, an external DNS server running Windows 2003 R2 Enterprise Edition, a UAG server running [...]]]></description>
			<content:encoded><![CDATA[<p>This article will walk through deploying the DirectAccess feature of Microsoft Forefront Unified Access Gateway (UAG) in a lab environment. My lab includes a domain controller (running Windows 2008 R2 Enterprise Edition), A file server, running Windows 2003 R2 Enterprise Edition, an <em>external</em> DNS server running Windows 2003 R2 Enterprise Edition, a UAG server running Windows 2008 R2 Enterprise Edition and a machine to act as a client running Windows 7 Ultimate. All of the machines are virtualised. Below is a diagram of the network and a table showing machine names, roles and IP addresses.</p>
<p><img class="alignnone size-full wp-image-575" title="Lab configuration" src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy1.jpg" alt="Click to Enlarge" width="708" height="327" /></p>
<div>
<table style="border-collapse: collapse; height: 379px;" border="0" width="700">
<colgroup>
<col style="width: 159px;"></col>
<col style="width: 159px;"></col>
<col style="width: 152px;"></col>
<col style="width: 169px;"></col>
</colgroup>
<tbody>
<tr style="background: #c00000;">
<td style="padding-left: 7px; padding-right: 7px; border: solid 0.5pt;"><span style="color: white;"><strong>Server / Workstation</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"><span style="color: white;"><strong>Purpose / Role</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"><span style="color: white;"><strong>O/S</strong></span></td>
<td style="padding-left: 7px; padding-right: 7px; border-top: solid 0.5pt; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;"><span style="color: white;"><strong>IP Address</strong></span></td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">DC</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Domain Controller, Certificate Authority, Internal DNS</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Windows 2008 R2 Enterprise</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">192.168.0.4</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">FS</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Internal File Server to test DirectAccess functionality</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Windows 2003 R2 Enterprise Edition</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">192.168.0.14</p>
<p>192.168.0.15 (NLS Service)</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">UAG</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">UAG Server</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Windows 2008 R2 Enterprise</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">192.168.0.8 – internal</p>
<p>212.44.33.21/22 – External</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">DNS</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">External / Public DNS Server (setup as a domain) – public certificate CA</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Windows 2003 R2 Enterprise Edition</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">212.44.33.20</td>
</tr>
<tr>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: solid 0.5pt; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">TEST-PC</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Client to test transparent access when on internal network and external network using DirectAccess</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">Windows 7 Ultimate</td>
<td style="padding-left: 7px; padding-right: 7px; border-top: none; border-left: none; border-bottom: solid 0.5pt; border-right: solid 0.5pt;">192.168.0.9 – when internal</p>
<p>212.44.33.30 – when External</td>
</tr>
</tbody>
</table>
</div>
<p>As can be seen from the above, the UAG server requires two network cards. The test-pc requires only 1 but its IP address will change depending on whether or not it is internal or external to the network. Advanced operating systems have link local IPv6 addresses but, other than that, IPv6 addresses are not used. Instead the UAG server performs 6to4 translation to allow DirectAccess to function. Moreover, as this is a lab it is not connected to the <em>true</em> internet. Instead we shall use the 192.168.0.0/24 subnet as an internal network and a 212.44.33.0/24 subnet as an external network emulating the internet.</p>
<p>The first step to building the lab is to install all of the operating systems. Then fix the IP address on the server to be the domain controller and promote the server to be the first domain controller for the domain (in my case philipflint.com). This will also install and configure a basic DNS. We add a DNS record to this server for the host name ISATAP with the IP address if the internal interface of our UAG server (192.168.0.8).</p>
<p><img class="alignnone size-full wp-image-576" src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy2.png" alt="" width="624" height="435" /></p>
<p>We then add a record for the host name NLS with the IP address on our file server that we will use to host the Network Location Service. This is simply a web site that, when clients can connect to it they know they are internal to the network and if they cannot connect to it they assume that they are external to the network and try to tunnel through the UAG server. In production this service should be made highly available through Network Load Balancing in case a server fails or needs to be rebooted for any reason. If you have configured reverse lookups then you may create an associated PTR record.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy3.png" alt="" /></p>
<p>Next, we install Certificate Services using server administrator. In &#8220;Add Roles&#8221; select &#8220;Active Directory Certificate Services&#8221;</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy4.png" alt="" /></p>
<p>All of the default settings are accepted. In a production environment different settings may well have been selected, especially the requirement to have a separate enterprise root which may be switched off. As this is a lab environment and to simplify the installation an Enterprise Certificate Authority installed directly on a domain controller offers the greatest ease of use and deployment.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy5.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy6.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy7.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy8.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy9.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy10.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy11.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy12.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy13.png" alt="" /></p>
<p>Once the Certificate Authority has been installed we configure Active Directory to automatically issue computer certificates.</p>
<p><span style="color: black; font-family: Verdana; font-size: 8pt;"><strong>To configure computer certificate auto-enrolment<br />
</strong></span></p>
<p><span style="color: black; font-family: Verdana; font-size: 8pt;">On a domain controller, click <strong>Start</strong>, type <strong>gpmc.msc</strong>, and then press ENTER.<br />
</span><br />
<span style="color: black; font-family: Verdana; font-size: 8pt;">Expand Group Policy Objects and click on the Default Domain Policy. Right click and select Edit.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy14.png" alt="" /><span style="color: black; font-family: Verdana; font-size: 8pt;"><br />
</span><br />
<span style="color: black; font-family: Verdana; font-size: 8pt;">In the console tree of the Group Policy Management Editor, open <strong>Computer Configuration\Policies\Windows Settings\Security Settings\Public Key Policies</strong>.<br />
</span><br />
<span style="color: black; font-family: Verdana; font-size: 8pt;">In the details pane, right-click <strong>Automatic Certificate Request Settings</strong>, point to <strong>New</strong>, and then click <strong>Automatic Certificate Request</strong>.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy15.png" alt="" /><span style="color: black; font-family: Verdana; font-size: 8pt;"> </span></p>
<p><span style="color: black; font-family: Verdana; font-size: 8pt;">In the Automatic Certificate Request Wizard, click <strong>Next</strong>.</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy16.png" alt="" /><span style="color: black; font-family: Verdana; font-size: 8pt;"><br />
</span></p>
<p><span style="color: black; font-family: Verdana; font-size: 8pt;">On the <strong>Certificate Template</strong> page, click <strong>Computer</strong>, click <strong>Next</strong>, and then click <strong>Finish</strong>.</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy17.png" alt="" /></p>
<p>The client can now be added to Active Directory in the usual way. Once it has been rebooted logon as local admin. Open the Certificates Management Console. Click on <strong>start</strong> and type in <strong>mmc</strong>. Press <strong>return</strong>.</p>
<p>Select <strong>File | Add/Remove Snap in…</strong> to open the dialog. Select <strong>Certificates</strong> and click on <strong>Add</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy18.png" alt="" /></p>
<p>Select <strong>Computer Account</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy19.png" alt="" /></p>
<p>Select <strong>Local Computer</strong> and click on<strong> Finish</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy20.png" alt="" /></p>
<p>Expand out the &#8220;<strong>Trusted Root Certificate Authorities | Certificates</strong>&#8221; node and check that the name of the internal certificate authority configured earlier appears in the list.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy21.png" alt="" /></p>
<p>Expand the &#8220;<strong>Personal | Certificates</strong>&#8221; node and check that a certificate exists with the client computer name on it.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy22.png" alt="" /></p>
<p>If these two tests pass then your domain is configured to automatically issue certificates to any computers that are members of the domain.</p>
<p>We can now add our UAG server to the domain in the usual manner. If you are going to move the server to its own OU you should do so as soon as it has been added to AD. Once the server has been rebooted ensure that you log on with a domain administrative account.</p>
<p>We next take our machine &amp;quot;dns&amp;quot;, our external DNS server and promote it to a new domain (in my case philipflint.net) which will automatically install dns on it. We also install an Enterprise Certificate Authority on the server to serve as a &amp;quot;public&amp;quot; certificate authority whose CRL can be checked online when a client is external to the LAN – this will allow us to issue a certificate to the public interface of the UAG whose CRL can be checked by our client. Add the IIS Application Server role to the DNS server first and then add the Certificate Services role in <strong>&#8220;Add / Remove Windows Components</strong>&#8221; area of &#8220;<strong>Add / Remove Programs</strong>&#8220;. We then patch the server to allow Windows 2008 R2 and Windows 7 to receive certificates form the server (<a href="http://support.microsoft.com/kb/922706">http://support.microsoft.com/kb/922706</a>).</p>
<p>Now, set the iis site on the external DNS server to be protected by SSL. Open the &#8220;<strong>Internet Information Services (IIS) Server</strong>&#8220;, browse to the <strong>Default Web Site</strong>, right click and select <strong>Properties</strong>. On the <strong>Directory Security</strong> tab click on &#8220;<strong>Server Certificate</strong>&#8220;.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy23.png" alt="" /></p>
<p>After clicking on <strong>Next</strong> select to assign an existing certificate.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy24.png" alt="" /></p>
<p>Assign the certificate bearing the name of the server (dns.philipflint.net in my case).</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy25.png" alt="" /></p>
<p>Select to use port 443 to protect the site. The CA will now be able to issue certificates through a web interface. Now we need to update the Web Server certificate template to allow any certificates issued to be exported including their private keys. In the run box enter <strong>mmc.exe</strong> and then click on <strong>File | Add / Remove Snap-In…</strong>. Click on <strong>Add</strong> and then add in the <strong>Certificate Templates</strong> add in.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy26.png" alt="" /></p>
<p>Select <strong>Web Server</strong> and choose to duplicate the template.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy27.png" alt="" /></p>
<p>Name the certificate template  <strong>UAG</strong></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy28.png" alt="" /></p>
<p>On the <strong>Request Handling </strong>tab check to &#8220;<strong>Allow private key to be exported</strong>&#8221;</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy29.png" alt="" /></p>
<p>After accepting these values close the interface and open up the <strong>Certificate Authority </strong>interface from the Administrative Tools menu. Right click <strong>Certificate Templates</strong> and select <strong>New | Certificate Template to Issue</strong></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy30.png" alt="" /></p>
<p>Select the <strong>UAG </strong>template just created.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy31.png" alt="" /></p>
<p>This will allow us to issue certificates which can be exported later on.</p>
<p>Next, we add the fileserver &amp;quot;fs&amp;quot; to our internal domain. Log the server on as a domain administrator and configure the network cards as below. A different card is used for the NLS service to ensure that the IP address for NLS is not registered in DNS against the servers true name.</p>
<p>First, rename the network connections to identify their function. This is not a required step but makes understanding which link is which much easier.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy32.png" alt="" /></p>
<p>The card assigned for the server has standard settings.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy33.png" alt="" /></p>
<p>The card that will be used for the network location service has the following settings.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy34.png" alt="" /></p>
<p>Create a share called &#8220;Share&#8221; to test access to internal file based resources. Make the share available with &#8220;Full Control&#8221; permissions at the share level solely to a user called &amp;quot;testuser&amp;quot; (a new user account will need to be created). Change &#8220;Everyone&#8221; to have &#8220;Modify&#8221; rights at the NTFS level.</p>
<p>Log the &#8220;test-pc&#8221; client in using the &#8220;testuser&#8221; account and check access to the share by creating and deleting files. Map the drive H: from the client to the share using the Fully Qualified Domain Name (FQDN) of the share.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy35.png" alt="" /></p>
<p>Log back on to the FS server and Install iis to act as a Network Location Server. Create an SSL certificate for use by the NLS service. The walkthrough here is for servers running Windows 2003 R2 – the process is very different in 2008 and 2008 R2 but is documented <a href="http://technet.microsoft.com/en-us/library/cc731014(WS.10).aspx">here</a>.</p>
<p>Access the IIS Manager.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy36.png" alt="" />.</p>
<p>Right click the web sites node and select to create a new web sit</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy37.png" alt="" /></p>
<p>Name the site NLS</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy38.png" alt="" /></p>
<p>Select to use the IP address (and hence network card) assigned to the NLS service.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy39.png" alt="" /></p>
<p>Browse to crate the site placeholder in an appropriate location. In a production environment it is not recommended to hold any files for web sites on the operating system partition.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy40.png" alt="" /></p>
<p>Accept the default permissions. Click on <strong>Finish</strong> to complete the creation of the site.  Open the folder created and select <strong>File | New | Text Document </strong>to create a blank document. Open the document created and enter some text such as &amp;quot;success!!!&amp;quot;. Selet the document and click on <strong>File | Rename</strong> to rename the document to <strong>default.htm</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy41.png" alt="" /></p>
<p>We can now &#8220;secure&#8221; the site using SSL. Right click the site created and choose <strong>Properties</strong>. Select the <strong>Directory Security</strong> tab and click on <strong>Server Certificate</strong>. Continue through the wizard and select to <strong>Create a new certificate</strong>. Choose to <strong>send the request immediately to an online certificate authority</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy42.png" alt="" /></p>
<p>Enter a name for the certificate.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy43.png" alt="" /></p>
<p>Enter appropriate details for <strong>organization</strong> and <strong>organisational unit</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy44.png" alt="" /></p>
<p>At the <strong>Common Name</strong> screen enter the fully qualified domain name for the Network Location Service – this is the host name created earlier and entered onto the internal dns server. In my case, nls.philipflint.com</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy45.png" alt="" /></p>
<p>Enter appropriate values for the <strong>State</strong> and<strong> City</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy46.png" alt="" /></p>
<p>Configure the site to use the default port of 443 for SSL.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy47.png" alt="" /></p>
<p>Lastly, submit the request to our internal Certificate Authority.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy48.png" alt="" /></p>
<p>Complete the wizard and the certificate will be automatically installed and associated with the NLS site.</p>
<p>Now test the site created from the domain controller. Open up a browser and visit the site created at its url (https://nls.philipflint.com in my case). The web page created previously should be displayed.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy49.png" alt="" /></p>
<p>We can now begin to install UAG in earnest. As stated, this guide walks through an installation in a test or lab environment and doesn&#8217;t necessarily follow best practice for following a full lockdown of UAG. At present we have our domain controller installed for internal use, a file server to act as an internal resource and Network Location Server for UAG, a client to access resources when internal or external to our network, an additional domain controller to provide DNS and Certificate Services as though it is a public certificate authority and finally our UAG server which has had its operating system installed and has been added to our domain.</p>
<p>The next task then is to configure networking on our UAG server after which we can install and configure the UAG software solution itself. Firstly, we configure the network connections. I suggest that you should name each of the network interfaces something along the lines of &#8220;Internal&#8221; and &#8220;External&#8221; or &#8220;DMZ&#8221; and &#8220;Dirty&#8221; to distinguish between the interfaces. In a production deployment the interfaces should sit in a DMZ. The external interfaces are protected by TMG technologies which are automatically installed when you install UAG.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy50.png" alt="" /></p>
<p>The internal network card should be configured as below.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy51.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy52.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy53.png" alt="" /></p>
<p>Note the lack of an internal gateway – this means that the UAG will only be able to access items on the same internal subnet as that on which it sits. This is not an issue in our lab environment but will almost certainly be an issue in a production environment. To overcome this appropriate static routes should be added to its routing table. To add a route use the <strong>route add</strong> command. This is run from within an elevated command prompt (right click cmd.exe and select <strong>&#8220;Run As Administrator</strong>&#8220;) and takes the form:</p>
<p>route add <span style="color: red;"><strong>DESTINATION NETWORK</strong><br />
</span>mask <span style="color: #0070c0;"><strong>DESTINATION SUBNET</strong><br />
<span style="color: #00b050;"><strong>LOCAL GATEWAY</strong><br />
</span>metric 1 –p</span></p>
<p>An example entry to add 172.16.0.0 to 172.31.255.255 would be</p>
<p>Route add 172.16.0.0 mask 255.240.0.0 192.168.0.1 metric 1 –p</p>
<p>The <span style="color: red;"><strong>–p</strong><br />
</span>qualifier makes the route permanent so that it will still apply even if we reboot the server.</p>
<p>Note also that we add the internal domain name to the DNS suffix to be used for this connection. Finally, note that IPV6 is still checked in the properties of the internal connection.</p>
<p>We can now configure thee external interface. DirectAccess requires that the external interface contains 2 sequential public IP addresses, for example 213.34.23.6 and 212.34.23.7. Even though we are in a lab environment we still need to enter true public addresses as the UAG configuration wizard will check that true public addresses (as opposed to private addresses) are being used. The external interface should therefore be configured as below.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy54.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy55.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy56.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy57.png" alt="" /></p>
<p>Note that <strong>File and Printer Sharing</strong> and <strong>Client for Microsoft Networks</strong> have been unchecked. Uncheck <strong>Register the connection&#8217;s addresses in DNS</strong>.  Disable &#8220;<strong>Enable LMHosts Lookup</strong>&#8221; and select &#8220;<strong>Disable NetBios over TCP/IP</strong>&#8220;.</p>
<p>Next, to reduce the risk of timeouts, we configure the UAG server to attempt to send traffic first over the internal network, rather than externally. To do this, in the network connections folder, select <strong>Alt+E</strong> to expose the additional menus. Then select <strong>Advanced</strong> and <strong>Advanced Settings</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy58.png" alt="" /></p>
<p>From there, select the <strong>Internal</strong> network and move it to the top of the list.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy59.png" alt="" /></p>
<p>Now that we have the network cards configured we can install the UAG software itself. This is a fairly trivial task. Simply insert the DVD and follow the prompts.</p>
<p><strong>NOTE: If, from this point on, you have issues accessing resources such as the https version of the external certificate authority then you should note that the UAG server is being protected by Forefront Threat Management Gateway and you should make appropriate entries to allow the UAG server to access resources and then remove them once more as appropriate.<br />
</strong><br />
<img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy60.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy61.png" alt="" /></p>
<p>As this is a lab you will get a warning that states that the server contains less than the 4GB of recommended RAM – this can be ignored by clicking <strong>Continue</strong> in a lab environment.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy62.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy63.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy64.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy65.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy66.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy67.png" alt="" /></p>
<p>Once rebooted you should patch to the latest level – at the time of writing this is Update 2 for UAG 2010 which can be downloaded <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9dcccebc-accb-4229-901a-792cc66791de">here</a>, Service Pack 1 for TMG 2010 which can be downloaded <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f0fd5770-7360-4916-a5be-a88a0fd76c7c&amp;displaylang=en">here</a> and Update 1 for SP1 for TMG 2010 which can be downloaded <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=695d0709-0d8b-45ee-afdb-727c4428ca4d">here</a> (make sure you download the 64 bit versions as will be installing on Windows 2008 R2).</p>
<p>Now that we have UAG installed we need to create an external DNS record (A Name) for users to connect to UAG if they want to use IP-HTTPS as their connection method. So we set up a domain / zone on our external dns server (DNS) for philipflint.com. In that domain we create a new A record (directaccess.philipflint.com) and refer it to the<strong> FIRST</strong> IP address on the external NIC of our UAG server.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy68.png" alt="" /></p>
<p>Next, we need to update our internal DNS server to reply to ISATAP (<span style="color: black;">Intra-Site Automatic Tunnel Addressing Protocol – a transition mechanism for IPv6) requests. We do this by running the command <span style="color: red;"><strong>dnscmd /info /globalqueryblocklist</strong><br />
</span>f</span>rom an elevated command prompt our internal DNS server (DC).</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy69.png" alt="" /></p>
<p>By default both ISATAP and WPAD requests are blocked. To unblock items we have to feed through the whole blocklist once again – i.e. we replace it with a new list. We do this by issuing the command <span style="color: red;">dnscmd /config /globalqueryblocklist wpad </span>where WPAD is the service to add back. If we want or need to add back more than one service then we simply separate them with spaces. Rerunning the query then confirms whether the blocklist has been correctly set.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy70.png" alt="" /></p>
<p>UAG allows computers to access the internal network using DirectAccess by way of applying policies to a group of computers through a GPO. Users home computers and those in internet café&#8217;s will not be able to access the internal network by way of DirectAccess, only domain members will and then only those who have had the appropriate policy applied. To do this the UAG wizard asks for the group to which the Group Policy should be scoped. In this regard we now set up a global group in Active Directory called &#8220;DirectAccess Allowed&#8221;.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy71.png" alt="" /></p>
<p>The computer account of our test computer (test-pc) is then added to this group. Do remember to click the <strong>&#8220;Object Types</strong>&#8221; button in order to change the search scope to include computers.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy72.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy73.png" alt="" /></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy74.png" alt="" /></p>
<p>Next, we will want to produce a certificate to protect the outside edge of our UAG server. The common name MUST match the DNS name entered previously for users to use DirectAccess via IP-HTTPS (directaccess.philipflint.com). The first thing to do is add the root certificate of our &#8220;external&#8221; dns server (dns) to our UAG server and to our client. To do this open a browser and browse to <a href="http://212.44.30.20/certsrv">http://212.44.30.20/certsrv</a> changing the address in red for whatever names or ip address you have used in your deployment. You will be asked to log on to the site. Simply enter the administrative credentials for the external domain (philipflint.net).</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy75.png" alt="" /></p>
<p>Select &#8220;<strong>Download a CA certificate, certificate chain or CRL</strong>&#8220;.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy76.png" alt="" /></p>
<p>Click on &#8220;<strong>Download CA certificate</strong>&#8221;</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy77.png" alt="" /></p>
<p>Click on &#8220;<strong>Open</strong>&#8221; to install the certificate.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy78.png" alt="" /></p>
<p>Select to &#8220;<strong>Install Certificate …</strong>&#8221;</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy79.png" alt="" /></p>
<p>Select to place the certificate in the <strong>Trusted Root Certification Authorities</strong>&#8221;</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy80.png" alt="" /></p>
<p>Now that the certificate issuer is trusted we can now request a new certificate from the external CA. from the UAG server browse once again to <a href="http://10.1.1.10/certsrv">http://<strong>212.44.33.20</strong>/certsrv</a> and select &#8220;<strong>Request a Certificate</strong>&#8221; select to submit an &#8220;<strong>Advanced Certificate Request</strong>&#8221; and &#8220;<strong>Create and Submit a Request to this CA</strong>&#8220;.</p>
<p>Select to create a certificate using the UAG template created earlier and enter the FQDN that users will use to connect to direct access (configured in DNS previously) as the name for the certificate.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy81.png" alt="" /></p>
<p>Scroll down and click on <strong>Submit</strong>. Select to <strong>Install this Certificate</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy82.png" alt="" /></p>
<p>This will install the certificate but in the<strong> Users</strong> Certificate store. We now need to export that certificate, including private key, from the users certificate store and import it into the computer certificate store. To do this Click on Start and enter mmc.exe in the search box. Press return. When the MMC console opens click on <strong>File | Add / Remove Snap-In …</strong> and select to add the <strong>Certificates</strong> snap in. When asked select to add it for &#8220;<strong>My User Account</strong>&#8220;.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy83.png" alt="" /></p>
<p>Expand out the personal certificate store, right click on the certificate issued and click on <strong>Export</strong>.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy84.png" alt="" /></p>
<p>Select to export the private key. This is a very important step and without it the certificate will not function when we assign it to the external interface in UAG later in the procedure.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy85.png" alt="" /></p>
<p>Accept the defaults.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy86.png" alt="" /></p>
<p>Secure the exported file with a password.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy87.png" alt="" /></p>
<p>Save the exported certificate to a known location.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy88.png" alt="" /></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Close the MMC concole down and start a fresh MMC session. Add in the certificates snap in once more but this time select to add it for the local computer.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy89.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p>Expand the personal node and right click on the <strong>Certificates</strong><span style="font-family: Times New Roman; font-size: 12pt;">folder. Select to <strong>All Tasks |</strong><br />
<strong>Import</strong>.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy90.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Browse to where the exported certificate was saved. You will need to change the file type selection box to <strong>Personal Information Exchange</strong> to view the exported certificate.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy91.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">After clicking on <strong>Open </strong>and advancing the dialiog enter the password used to encrypt the file and check to mark the certificate as exportable if desired.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy92.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Leave the certificate location at its default of <strong>Personal</strong>. This is the default as this is where we started the import process from.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy93.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">The certificate to be used to secure IP-HTTPS traffic on the UAG external interface has now been imported to the computer store.<br />
</span></p>
<p>Now we can start the UAG GUI on the UAG server.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy94.png" alt="" /></p>
<p>The  Wizard will then walk us through configuring UAG for the first time.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy95.png" alt="" /></p>
<p>Click in the interface to tell UAG which of your network cards should be assigned internal and external roles. As mine are labeled &#8220;<strong>Internal</strong>&#8221; and &#8220;<strong>External</strong>&#8221; their allocation is simplistic.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy96.png" alt="" /></p>
<p>Internal IP address ranges can then be added.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy97.png" alt="" /></p>
<p>In a production environment, depending on your network configuration you may want to add all private network addresses as being accessible through the private interface with appropriate routing put in place.</p>
<p>Next we define our server topology.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy98.png" alt="" /></p>
<p>As our lab consists of a single server and not an array of UAG servers we can simply accept the default setting.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy99.png" alt="" /></p>
<p>In the normal course of events we can run Windows Update to apply the latest patches.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy100.png" alt="" /></p>
<p>This will then show all of the basic setup choices as having been completed.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy101.png" alt="" /></p>
<p>Upon closing the dialog we can set a password to store the servers backup configuration and activate our configuration.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy102.png" alt="" /></p>
<p>We can now, finally, move to configuring the UAG server itself for DirectAccess.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy103.png" alt="" /></p>
<p>Click on the &#8220;<strong>Configure</strong>&#8221; button in the Clients section and add the Global Group provisioned earlier.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy104.png" alt="" /></p>
<p>We can the click on &#8220;<strong>Configure</strong>&#8221; under the <strong>DirectAccess Server </strong><span style="font-family: Times New Roman; font-size: 12pt;">node. Select the appropriate IP addresses for both sides of the UAG.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy105.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Leave all methods of access enabled.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy106.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Select the Root certificate for our internal Certificate Authority as the root certificate by clicking on <strong>Browse</strong> for the first certificate choice. Select the certificate used to secure our external network (directaccess.philipflint.com in my case) by clicking on <strong>Browse </strong>for the second choice.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy107.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Click on <strong>Finish</strong>.<br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">We can now click on <strong>Configure</strong> under the <strong>Infrastructure Servers</strong> section. This allows us ot state which servers should be contactable by external clients before they have been logged on (domain controllers, WSUS servers, anti-virus update points etc.) and which servers should not be contacted by clients (the NLS server for example).<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy108.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Enter the URL of the host name configured for the NLS service (nls.philipflint.com in my case).<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy109.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">The next screen allows and denies specific servers from being accessed via the DirectAccess Tunnel.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy110.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Double click to add any patterns or specific machine names to be excluded. For example, it is likely that you will want to exclude the host name for Outlook Web Access as this should be accessed over the internet rather than through the tunnel. Similarly you may want to exclude and host names for OCS such as sipinternal.philipflint.com.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy111.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Once all required additions and exclusions have been added to the list click on <strong>Next</strong>. The next screen is where we add servers that the external user machine will need to know about before the user has logged on. At a minimum this will include domain controllers (to allow log on and apply group policy) but may also include A/V and WSUS update servers.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy112.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">To add additional servers merely click on the appropriate node and select <strong>Add Server</strong>. (To add to <strong>Others</strong> right click <strong>Others </strong>and add a group first. Servers may not be added directly to <strong>Others </strong>but can be added to groups created under that node).<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy113.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Click on <strong>Finish</strong> to complete this step. Now we can configure encryption through to application servers. UAG functions much like a traditional VPN with the VPN tunnel terminating on the external interface of the UAG server. Encryption may be maintained all the way through to specific internal end points (servers). For this lab we will terminate the tunnel directly on the UAG. Click on <strong>Configure</strong> under the <strong>Application Servers</strong> node.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy114.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Accept the default and click on <strong>Finish</strong>.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy115.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">We now have a configuration <strong>planned </strong>for our UAG. As with most edge devices the update is not automatic to allow for complex changes to be made without compromising security during the configuration stages. We now have to <strong>Generate</strong> out UAG policies and <strong>Activate</strong> them. To do this we click on the <strong>Generate Policies</strong> button at the bottom right of the UAG interface.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy116.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">A dialog will open detailing our configuration. Click on <strong>Apply Now </strong>to complete the generation of the policies.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy117.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Click on <strong>OK</strong> and <strong>Finish</strong> when the script has executed. This step will have created the group policies in our domain at the route level and scoped them to the client group specified earlier (for client settings) and to the UAG server for DirectAccess Server settings.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy118.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">In a production environment Active Directory should now be synchronised to ensure that all domain controllers are aware of the new policies. Even though the policies have been applied to client machines the configuration still needs to be applied to the UAG server. Once AD has been updated apply the policy to the UAG server either by rebooting or running the <strong>GPUPDATE /FORCE</strong> command from an elevated command prompt.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy119.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;"> In the UAG interface click on <strong>File | Activate</strong> to activate the configuration on the UAG.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy120.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">The UAG will backup its configuration – click on <strong>Activate</strong> to continue. The policy will then be applied and after some minutes will complete.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy121.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Once the policy has been applied we need to run <strong>GPUPDATE /FORCE </strong>on our test client while it is connected to the internal network or reboot it whilst connected in order to force the new group policies to be applied.<br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">The client can then have its IP address changed and be placed on the external network and DirectAccess tested. Reboot the client and logon with the &amp;quot;<strong>testuser</strong>&#8221; account. Open a command prompt and type <strong>set logon</strong>. The name of the machine used to logon is returned. This should be the internal domain controller.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy122.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Ping the internal domain controller using its Fully Qualified Domain Name (dc.philipfliont.com). You should receive replies from an IPv6 address.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy123.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Similarly, ping the internal file server (fs.philipflint.com). Even though it is running Windows 2003 R2 you receive a reply from the IPv6 address of the UAG.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy124.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Nope, open the mapped drive on the client machine (mapped to its FQDN). You should be able to open the file on the server and update it.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy125.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">Save the file with its changes and access the same file from the file server console. Note that the time stamp has been updated for the file as well as the file contents from a computer external to the organisation with no need to establish a VPN tunnel.<br />
</span></p>
<p><img src="http://philipflint.com/wp-content/uploads/2010/09/092510_2220_HowtoDeploy126.png" alt="" /><span style="font-family: Times New Roman; font-size: 12pt;"><br />
</span></p>
<p><span style="font-family: Times New Roman; font-size: 12pt;">You now have a functional DirectAccess solution in your lab environment to test and configure how you wish. If you have enough virtual resources then you can try adding other services internally or if you want to make the solution more highly available then there is an excellent guide to provisioning a farm of UAG servers at <a href="http://danstoncloud.com/blogs/simplebydesign/archive/2010/08/11/directaccess-high-availability-with-uag-2010-part-1.aspx/">http://danstoncloud.com/blogs/simplebydesign/archive/2010/08/11/directaccess-high-availability-with-uag-2010-part-1.aspx/</a>. To do this you will have to redeploy the UAG server selecting to add the first node as an array member but the article is fairly self explanatory.<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://philipflint.com/2010/09/25/how-to-deploy-microsoft-unified-access-gateway-uag-for-a-test-or-lab-environment/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Configuring an internal Certificate Authority for lab environments</title>
		<link>http://philipflint.com/2010/09/01/configuring-an-internal-certificate-authority-for-lab-environments/</link>
		<comments>http://philipflint.com/2010/09/01/configuring-an-internal-certificate-authority-for-lab-environments/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 21:38:06 +0000</pubDate>
		<dc:creator>Philip Flint</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows 2008 R2]]></category>

		<guid isPermaLink="false">http://philipflint.com/?p=419</guid>
		<description><![CDATA[Sometimes people write really excellent articles on the web. This is one of those occassions where an article needs nothing adding to it. If you set up labs to learn new technologies, study for exams or just to pre-flight technologies before you put them live and struggle to have certificates working &#8220;inside&#8221; and &#8220;outside&#8221; of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes people write really excellent articles on the web. This is one of those occassions where an article needs nothing adding to it. If you set up labs to learn new technologies, study for exams or just to pre-flight technologies before you put them live and struggle to have certificates working &#8220;inside&#8221; and &#8220;outside&#8221; of your lab based environment, the article at <a href="http://www.windowsnetworking.com/articles_tutorials/Certificate-Revocation-Checking-Test-Labs.html">http://www.windowsnetworking.com/articles_tutorials/Certificate-Revocation-Checking-Test-Labs.html</a> walks you through publishing CRL&#8217;s (to an &#8220;external&#8221; server for example) or even turning off revocation checking so that its no longer an issue (only advisable in lab environments).</p>
]]></content:encoded>
			<wfw:commentRss>http://philipflint.com/2010/09/01/configuring-an-internal-certificate-authority-for-lab-environments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Service Pack 1 announced for Windows 2008 R2</title>
		<link>http://philipflint.com/2010/03/18/service-pack-1-announced-for-windows-2008-r2/</link>
		<comments>http://philipflint.com/2010/03/18/service-pack-1-announced-for-windows-2008-r2/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 21:39:02 +0000</pubDate>
		<dc:creator>Philip Flint</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Virtualisation]]></category>
		<category><![CDATA[Windows 2008 R2]]></category>

		<guid isPermaLink="false">http://philipflint.com/?p=410</guid>
		<description><![CDATA[Great news. Microsoft have started to release news about SP 1 for Windows 2008 R2. Still slated for release in Q4, there are two major announcements for anyone interested in virtualisation &#8211; RemoteFX which essentially supercharges the vide experience for end users of Remote Desktop Services. So powerfullis this that for once Citrix will be [...]]]></description>
			<content:encoded><![CDATA[<p>Great news. Microsoft have started to release news about SP 1 for Windows 2008 R2. Still slated for release in Q4, there are two major announcements for anyone interested in virtualisation &#8211; RemoteFX which essentially supercharges the vide experience for end users of Remote Desktop Services. So powerfullis this that for once Citrix will be licensing the Microsoft solution on graphics acceleration ratehr than the other way round. Read more about it <a href="http://blogs.technet.com/virtualization/archive/2010/03/17/explaining-microsoft-remotefx.aspx">here</a>.</p>
<p>The other big announcement is dynamic memory allocation in Hyper-V. You can read about that <a href="http://blogs.technet.com/virtualization/archive/2010/03/18/Dynamic-Memory-Coming-to-Hyper-V.aspx">here</a>. VMWares &#8220;killer&#8221; feature has always been memory over commit. Essentially it just pages non used memory to the hard drive so in highly virtualised environments where VM&#8217;s need to use their RAM this can lead to excessive paging and poorly performing infrastructures. However, it is still the number 1 reason why people choose VMWare over other virtualisation vendors so even though, in my opinion, its not as great as its cracked up to be, if you ant to do virtualisation then you have to offer this functionality. The good news its, that&#8217;s one less reason to spend a fortune on VMWare if you are on a budget.</p>
]]></content:encoded>
			<wfw:commentRss>http://philipflint.com/2010/03/18/service-pack-1-announced-for-windows-2008-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I use the Windows 2008 R2 Recycle Bin feature ?</title>
		<link>http://philipflint.com/2009/11/21/how-do-i-use-the-windows-2008-r2-recycle-bin-feature/</link>
		<comments>http://philipflint.com/2009/11/21/how-do-i-use-the-windows-2008-r2-recycle-bin-feature/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 21:19:19 +0000</pubDate>
		<dc:creator>Philip Flint</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Windows 2008 R2]]></category>

		<guid isPermaLink="false">http://philipflint.com/?p=400</guid>
		<description><![CDATA[New in Windows 2008 R2 active directory is the concept of Active Directory Optional Features and the first of these which have been made available is the Recycle Bin feature. Ever since Active Directory was launched you have been able to recover individual deleted items by undertaking an authoritative restore of sections of the database, [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">New in Windows 2008 R2 active directory is the concept of Active Directory Optional Features and the first of these which have been made available is the Recycle Bin feature. Ever since Active Directory was launched you have been able to recover individual deleted items by undertaking an authoritative restore of sections of the database, even down to an individual object. From 2003 onwards deleted objects have been tombstoned and you have been able to use the ADRestore tool (available to download from <a href="http://technet.microsoft.com/en-us/sysinternals/bb963906.aspx">http://technet.microsoft.com/en-us/sysinternals/bb963906.aspx</a>). However, the issue with these methods has always been with back links or, to put it another way, restoring these items with any group membership they had and, yes, it has been possible to do that with multiple authoritative restores of the database but that is at best tiresome and at worse can be dangerous. What the Recycle Bin feature does for you is restore with these back links / group memberships in place.</div>
<p>However, to use this feature the first thing you need to do is have your Forest at the Windows 2008 R2 level. Whilst your schema may be at the R2 level (meaning your forest can play host to 2008 R2 Domain Controllers) your domains and forest may still be running Domain Controllers with previous operating systems such as 2008 RTM or 2003 R2. The easy way to check your domain level in Windows 2008 R2 is to start the new Active Directory Administrative Centre. If you select the domain node on the left hand side (the netbios name of my domain is philipflint) then you will be able to check and raise the domain / forest functional levels in the action pane on the right hand side.</p>
<p> </p>
<p> </p>
<div id="attachment_382" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth1.png"><img class="size-thumbnail wp-image-382" title="112109_2118_HowdoIuseth1.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth1-150x86.png" alt="Click to Enlarge" width="150" height="86" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>If your forest level is not at Windows 2008 R2 you can raise it.</p>
<p>  </p>
<div id="attachment_383" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth2.png"><img class="size-thumbnail wp-image-383" title="112109_2118_HowdoIuseth2.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth2-150x76.png" alt="Click to Enlarge" width="150" height="76" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>We can now install the Recycle Bin feature. Care should be taken before undertaking the next procedure. Enabling the Recycle Bin feature for a domain / forest is a one way process with no way back. In a typical environment the recycle bin feature will grow the Active Directory database by 10 – 20% which may have an affect on performance especially in larger environments which many thousands of users where servers have been sized to run the complete database in RAM.</p>
<p>You should also note that, even though the Recycle Bin is an optional feature, it cannot be added as a Role Service nor as a Feature.</p>
<p> </p>
<div id="attachment_384" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth3.png"><img class="size-thumbnail wp-image-384" title="112109_2118_HowdoIuseth3.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth3-150x110.png" alt="Click to Enlarge" width="150" height="110" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>Instead the role is enabled by running a command in PowerShell. PowerShell is installed by default Windows 2008 R2 servers. However, PowerShell itself has no knowledge of Active Directory. Instead we need to load up the scripts and Verbs that PowerShell needs to be aware of to connect and control Active Directory. There are two ways to do this. The first, and simplest, is to click on Start | All Programs | Administrative Tools | Active Directory Module for Windows PowerShell.</p>
<p> </p>
<div id="attachment_385" class="wp-caption alignnone" style="width: 130px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth4.png"><img class="size-thumbnail wp-image-385" title="112109_2118_HowdoIuseth4.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth4-120x150.png" alt="Click to Enlarge" width="120" height="150" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>The other alternative is to start PowerShell by clicking on the below icon on the taskbar and then running the command below to import the Active Directory modules.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth5.png" alt="" /></p>
<p> </p>
<p><strong>Import-Module ActiveDirectory<br />
</strong></p>
<p> </p>
<p> </p>
<div id="attachment_387" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth6.png"><img class="size-thumbnail wp-image-387" title="112109_2118_HowdoIuseth6.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth6-150x86.png" alt="Click to Enlarge" width="150" height="86" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>We can now enable the Recycle Bin Feature. Below is a piece of code that you can change to use in your environment.</p>
<p><strong>Enable-ADOptionalFeature –Identity &#8216;CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, DC=<span style="color:red">YourDomain</span>,DC=<span style="color:red">ComOrNetOrLocal</span>&#8216; –Scope ForestOrConfigurationSet –Target &#8216;<span style="color:red">YourDomain.ComOrNetOrLocal</span>&#8216; –confirm:$false<br />
</strong></p>
<p>I&#8217;ve highlighted in <span style="color:red"><strong>Red</strong></span> the three pieces of information you have to change. If you have a two tier domain name (such as .co.uk) then you will have to add another DC= section. An example is given below for a domain called philipflint.co.uk.</p>
<p><strong>Enable-ADOptionalFeature –Identity &#8216;CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration, DC=<span style="color:red">philipflint</span>,DC=<span style="color:red">co,</span>DC=<span style="color:red">uk</span>&#8216; –Scope ForestOrConfigurationSet –Target &#8216;<span style="color:red">philipflint.co.uk</span>&#8216; –confirm:$false<br />
</strong></p>
<p>After amendment for the appropriate domain name variables this command is simply cut and paste into the PowerShell window.</p>
<p> </p>
<div id="attachment_388" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth7.png"><img class="size-thumbnail wp-image-388" title="112109_2118_HowdoIuseth7.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth7-150x68.png" alt="Click to Enlarge" width="150" height="68" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>I was not given a chance to back out of the addition of the feature as I used the PowerShell switch <strong>–confirm:$false</strong> which provides any confirmation when asked. If you do not include this switch then you will be asked to confirm the action.</p>
<p>NOTE: This command needs to be run for each domain in your forest for which the Recycle Bin should be installed.</p>
<p>After synchronising the domain the Recycle Bin will be active on all Domain Controllers and you can now test it out by creating test OU&#8217;s and test users and deleting them and restoring them. I have created two users called &#8216;<strong>William Shakespeare</strong>&#8216; and &#8216;<strong>Enid Blyton&#8217;</strong> in an OU called &#8216;<strong>Authors</strong>&#8216;.</p>
<p>They are both members of the Global Group &#8216;<strong>Famous</strong>&#8216; and the Domain Local group &#8216;<strong>Published</strong>&#8216;.</p>
<p> </p>
<div id="attachment_389" class="wp-caption alignnone" style="width: 129px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth8.png"><img class="size-thumbnail wp-image-389" title="112109_2118_HowdoIuseth8.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth8-119x150.png" alt="Click to Enlarge" width="119" height="150" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>We can now delete the William Shakespeare account.</p>
<p> </p>
<p> </p>
<div id="attachment_390" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth9.png"><img class="size-thumbnail wp-image-390" title="112109_2118_HowdoIuseth9.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth9-150x104.png" alt="Click to Enlarge" width="150" height="104" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>To restore a user that has been deleted I have provided a script for you below.</p>
<p><strong>Get-ADObject -Filter {samAccountName -eq &#8220;<span style="color:red">UserLogonName</span>&#8220;} -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p>As before, simply change the section in Red with the display name of the user you want to restore. I use the logon name as its something that you can ask the user that they are likely to know but if they don&#8217;t know this (&#8216;Its always there, I just enter my password&#8217;) then you can use another field which uniquely identifies them, their email address for example.</p>
<p><strong>Get-ADObject -Filter {mail -eq &#8220;<span style="color:red">UsersEmailAddress</span>&#8220;} -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p>To restore Williams account we can just enter the following in the PowerShell window.</p>
<p><strong>Get-ADObject -Filter {samAccountName -eq &#8220;<span style="color:red">william.shakespeare</span>&#8220;} -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p> </p>
<div id="attachment_391" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth10.png"><img class="size-thumbnail wp-image-391" title="112109_2118_HowdoIuseth10.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth10-150x68.png" alt="Click to Enlarge" width="150" height="68" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>The user account is now restored along with all group memberships.</p>
<p> </p>
<div id="attachment_392" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth11.png"><img class="size-thumbnail wp-image-392" title="112109_2118_HowdoIuseth11.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth11-150x104.png" alt="Click to Enlarge" width="150" height="104" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p>Memberships below.</p>
<p> </p>
<div id="attachment_393" class="wp-caption alignnone" style="width: 129px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth12.png"><img class="size-thumbnail wp-image-393" title="112109_2118_HowdoIuseth12.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth12-119x150.png" alt="Click to Enlarge" width="119" height="150" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>Now, of course, its possible that a user may be deleted who is in an OU that has also been deleted. It is not possible to restore the user without first restoring the OU of which they were a member or, in extreme cases, the whole OU tree if multiple OU&#8217;s have been deleted.</p>
<p><img src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth13.jpg" alt="" /></p>
<p> </p>
<p>Unless your records are up-to-date there is a chance that you may not know what your exact OU structure was and so you need a method of finding out what was the parent object of a deleted user. The code to do this is below.</p>
<p><strong>Get-ADObject -SearchBase &#8220;CN=Deleted Objects, DC=<span style="color:red">YourDomain</span>,DC=<span style="color:red">ComOrNetOrLocal</span>&#8216; &#8221; -ldapFilter:&#8221;(msDs-lastKnownRDN=<span style="color:red">ObjectName</span>)&#8221; –IncludeDeletedObjects –Properties lastKnownParent</strong></p>
<p>For example, if we run the above for our deleted William Shakespeare account we would run the following.</p>
<p><strong>Get-ADObject -SearchBase &#8220;CN=Deleted Objects, DC=<span style="color:red">philipflint</span>,DC=<span style="color:red">com</span>&#8221; -ldapFilter:&#8221;(msDs-lastKnownRDN=<span style="color:red">William Shakespeare</span>)&#8221; –IncludeDeletedObjects –Properties lastKnownParent</strong></p>
<p> </p>
<p> </p>
<div id="attachment_395" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth14.png"><img class="size-thumbnail wp-image-395" title="112109_2118_HowdoIuseth14.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth14-150x68.png" alt="Click to Enlarge" width="150" height="68" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>As can be seen from the output, we can see that the last know parent (i.e. the containing OU for this user) was the Authors OU directly under the domain node. Note that the Authors OU has not been deleted and so the user object may be directly restored. Below is a screenshot with the same command but where the Authors OU has been deleted.</p>
<p> </p>
<p> </p>
<div id="attachment_397" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth16.png"><img class="size-thumbnail wp-image-397" title="112109_2118_HowdoIuseth16.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth16-150x68.png" alt="Click to Enlarge" width="150" height="68" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p>In this case we can query the Authors OU to find its last known good parent until we find a containing object which has not been deleted.</p>
<p>Once we know which is the first object to be restored we can begin the restoration process. Previously I have given you the code to restore a user. The command to restore an OU is slightly different and I show it below.</p>
<p><strong>Get-ADObject -ldapFilter:&#8221;(msDs-lastknownRDN=<span style="color:red">NameOfYourOU</span>)&#8221; -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p>In our case we would therefore run the following three commands to restore the OU and the 2 deleted accounts (William Shakespeare and Enid Blyton).</p>
<p><strong>Get-ADObject -ldapFilter:&#8221;(msDs-lastknownRDN=<span style="color:red">Authors</span>)&#8221; -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p><strong>Get-ADObject -Filter {samAccountName -eq &#8220;<span style="color:red">william.shakespeare</span>&#8220;} -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p><strong>Get-ADObject -Filter {samAccountName -eq &#8220;<span style="color:red">enid.blyton</span>&#8220;} -IncludeDeletedObjects | Restore-ADObject</strong></p>
<p> </p>
<div id="attachment_398" class="wp-caption alignnone" style="width: 160px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth17.png"><img class="size-thumbnail wp-image-398" title="112109_2118_HowdoIuseth17.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth17-150x68.png" alt="Click to Enlarge" width="150" height="68" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>Note that all objects are restored with the appropriate backlinks in place</p>
<p> </p>
<div id="attachment_399" class="wp-caption alignnone" style="width: 122px"><a href="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth18.png"><img class="size-thumbnail wp-image-399" title="112109_2118_HowdoIuseth18.png" src="http://philipflint.com/wp-content/uploads/2009/11/112109_2118_HowdoIuseth18-112x150.png" alt="Click to Enlarge" width="112" height="150" /></a><p class="wp-caption-text">Click to Enlarge</p></div>
<p> </p>
<p>I hope you have found this useful, can see why this is such a powerful feature of the R2 and gives you one more good reason to go for the upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://philipflint.com/2009/11/21/how-do-i-use-the-windows-2008-r2-recycle-bin-feature/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>What is the difference between a Role and a Feature</title>
		<link>http://philipflint.com/2009/11/03/what-is-the-difference-between-a-role-and-a-feature/</link>
		<comments>http://philipflint.com/2009/11/03/what-is-the-difference-between-a-role-and-a-feature/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 10:40:08 +0000</pubDate>
		<dc:creator>Philip Flint</dc:creator>
				<category><![CDATA[Windows 2008 R2]]></category>

		<guid isPermaLink="false">http://philipflint.com/?p=96</guid>
		<description><![CDATA[Before Windows 2003 if you wanted to add functionality to a Windows Server you would have to access &#8220;Add / Remove Programs&#8221; in control panel and then &#8220;Add / Remove Windows Components&#8221; and choose which components to install. You may or may not have chosen the right components for what you were trying to achieve [...]]]></description>
			<content:encoded><![CDATA[<p>Before Windows 2003 if you wanted to add functionality to a Windows Server you would have to access &#8220;Add / Remove Programs&#8221; in control panel and then &#8220;Add / Remove Windows Components&#8221; and choose which components to install. You may or may not have chosen the right components for what you were trying to achieve and you may have installed the correct dependencies (leading to a potentially unstable server if you didn&#8217;t) or, indeed, too many dependencies making your server less secure. This situation led to a high number of calls to Microsoft for &#8220;broken&#8221; software when, in reality, the solution had not been deployed correctly.</p>
<p>Because of this, from 2003 Microsoft onwards Microsoft introduced the &#8220;Configure your server&#8221; wizard which allowed users to add core functionality to a server with a reduced set of configuration options. That is, the wizard only installed those items necessary to get the server to do the chosen job. This not only led to more stable servers but also more secure servers.</p>
<p>This philosophy has now been extended out for Windows 2008 onwards such that a whole raft of functionality is no longer deployed by default leading to a more secure base server environment (secure by design). Instead, you have to expose this functionality to Windows Server if you want to use it and the wizard will then deploy that functionality for you without introducing flaws due to mis-configuration of the base requirements for a solution. This functionality has been encapsulated in two areas under Server Manager &#8211; Roles and Features. So, now you know how we got here, what&#8217;s the difference between the two ?</p>
<p>Well, its simple really, a role is something that the servers offers to someone else (clients) such as Logon (AD), IP addresses (DHCP), name resolution (DNS) etc. A feature is something the server consumes or uses itself, for example Network Load Balancing, Telnet Client, Failover Clustering etc. Now if you need to find a certain &#8220;feature&#8221; of Windows Server I hope this will help you know the most likely place to find it.</p>
]]></content:encoded>
			<wfw:commentRss>http://philipflint.com/2009/11/03/what-is-the-difference-between-a-role-and-a-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Initial Configuration Tasks lost on Windows 2008 R2</title>
		<link>http://philipflint.com/2009/11/01/initial-configuration-tasks-lost-on-windows-2008-r2/</link>
		<comments>http://philipflint.com/2009/11/01/initial-configuration-tasks-lost-on-windows-2008-r2/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 21:40:29 +0000</pubDate>
		<dc:creator>Philip Flint</dc:creator>
				<category><![CDATA[Windows 2008 R2]]></category>

		<guid isPermaLink="false">http://philipflint.com/?p=63</guid>
		<description><![CDATA[If you’ve selected to “Do not show this window at logon” and then can’t get back to the initial configuration taks pane in Windows Server 2008, simply click on the start button and type oobe.exe in the the search field and press return. This command can also be run from a command prompt.]]></description>
			<content:encoded><![CDATA[<p>If you’ve selected to “Do not show this window at logon” and then can’t get back to the initial configuration taks pane in Windows Server 2008, simply click on the start button and type oobe.exe in the the search field and press return.</p>
<p>This command can also be run from a command prompt.</p>
]]></content:encoded>
			<wfw:commentRss>http://philipflint.com/2009/11/01/initial-configuration-tasks-lost-on-windows-2008-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

