<?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>richard-slater.co.uk &#187; Windows Vista</title>
	<atom:link href="http://www.richard-slater.co.uk/archives/tag/windows-vista/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richard-slater.co.uk</link>
	<description>Jesus, Life, Programming and Systems Administration</description>
	<lastBuildDate>Fri, 16 Jul 2010 21:04:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Change your MTU under Vista or Windows 7</title>
		<link>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/</link>
		<comments>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 20:11:31 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Netsh]]></category>
		<category><![CDATA[TCP/IP]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=683</guid>
		<description><![CDATA[This information is available in many many other places, however I am putting it on here because I know it will be here for me to refer to. Also it is handy, as I know I can access my web-site even if the MTU is misconfigured. For some reason that has escaped me Path MTU [...]]]></description>
			<content:encoded><![CDATA[<p><em>This information is available in many many other places, however I am putting it on here because I know it will be here for me to refer to. Also it is handy, as I know I can access my web-site even if the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Maximum_transmission_unit' title='Wikipedia article on Maximum_transmission_unit'>MTU</a> is misconfigured.</em></p>
<p>For some reason that has escaped me <a class='wikipedia' href='http://en.wikipedia.org/wiki/Path_MTU_discovery' title='Wikipedia article on Path_MTU_discovery'>Path MTU Discovery</a> in Windows just doesn&#8217;t seem to figure out the MTU for a given path (something to do with routers being poorly configured to not respond to <a class='wikipedia' href='http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol' title='Wikipedia article on Internet_Control_Message_Protocol'>ICMP</a> requests). So Windows uses the default. For the most part this doesn&#8217;t affect anyone, however if it dos affect you, it really annoys you. Failure of PMTUD will result in some websites not loading correctly, having trouble connecting to normally reliable online services and general Internet weirdness.</p>
<p>The resolution is to set your default MTU to one lower than the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Ethernet' title='Wikipedia article on Ethernet'>Ethernet</a> default of 1500. Here is how:</p>
<p><strong>Step 1: Find your MTU</strong><br />
From an elevated CMD Shell enter the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 show subinterfaces</pre></div></div>

<p>You should get something like this</p>
<pre>MTU         MediaSenseState  Bytes In    Bytes Out  Interface
----------  ---------------  ---------   ---------  -------------
4294967295  1                0           13487914   Loopback Pseudo-Interface 1
1500        1                3734493902  282497358  Local Area Connection</pre>
<p>If you are using Ethernet cable you will be looking for &#8220;Local Area Connection&#8221; or &#8220;Local Area Connection 2&#8243; (if you happened to plug into the second network port). If you are using Wireless you will be looking for &#8220;Wireless Network Connection&#8221;. The MTU is in the first column.</p>
<p><strong>Step 2: Find out what it should be</strong></p>
<p>In the CMD shell type:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">ping www.cantreachthissite.com -f -l <span style="color: #cc66cc;">1472</span></pre></div></div>

<p>The host name should be a site you <span style="text-decoration: underline;"><strong>can not</strong></span> reach, -f marks the packet as one that should not be fragmented the -l 1472 sets the size of the packet (1472 = Ethernet Default MTU &#8211; Packet Header, where the Ethernet Default MTU is 1500 and the Packet Header is 28 bytes)</p>
<p>If the packet can&#8217;t be sent because it would need to be fragmented you will get something similar to this:</p>
<pre>Packet needs to be fragmented but DF set.</pre>
<p>Keep trying lower packet sizes by 10 (i.e. -l 1460, 1450, 1440, etc.) until you get a successful ping request. Raise your packet sizes by one until you get a &#8220;Packet needs to be fragmented but DF set.&#8221;. The last successful value plus 28 will be your MTU value.</p>
<p>In my case a packet size of 1430 succeeds but 1431 fails, so 1430 + 28 = 1458.</p>
<p><strong>Step 3: Set your MTU</strong></p>
<p>Now you have identified the interface you need to change and the ideal MTU for you, now it is time to make the change. Again from an elevated CMD Shell type the following replacing my MTU of 1458 with your own value:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 <span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">subinterface &quot;Local Area Connection&quot; mtu</span>=<span style="color: #cc66cc;">1458</span> store=persistent</pre></div></div>

<p>Or if you are using a Wireless connection:</p>

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">netsh interface ipv4 <span style="color: #b1b100; font-weight: bold;">set</span> <span style="color: #448844;">subinterface &quot;Wireless Network Connection&quot; mtu</span>=<span style="color: #cc66cc;">1458</span> store=persistent</pre></div></div>

<p>If all has gone well you should have a perfectly working internet connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2009/10/23/change-your-mtu-under-vista-or-windows-7/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>5 Commands I Use Every Day</title>
		<link>http://www.richard-slater.co.uk/archives/2008/09/08/5-commands-i-use-every-day/</link>
		<comments>http://www.richard-slater.co.uk/archives/2008/09/08/5-commands-i-use-every-day/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 17:07:48 +0000</pubDate>
		<dc:creator>Richard Slater</dc:creator>
				<category><![CDATA[Misc.]]></category>
		<category><![CDATA[Sys. Admin.]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows 2003]]></category>
		<category><![CDATA[Windows 2008]]></category>
		<category><![CDATA[Windows Vista]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://www.richard-slater.co.uk/?p=362</guid>
		<description><![CDATA[For my regular day job I am a Systems Administrator, my team and I manage a network with 7 servers and approximately 600 workstations, 200 laptops and 2500 users. All clients are Windows XP SP2 or SP3 and all servers are Windows 2003 SP2 or Windows 2003 R2 SP2. I am sure I am not alone in knowing [...]]]></description>
			<content:encoded><![CDATA[<p>For my regular day job I am a Systems Administrator, my team and I manage a network with 7 servers and approximately 600 workstations, 200 laptops and 2500 users. All clients are <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_XP' title='Wikipedia article on Windows XP'>Windows XP</a> SP2 or SP3 and all servers are <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_2003' title='Wikipedia article on Windows 2003'>Windows 2003</a> SP2 or Windows 2003 R2 SP2.</p>
<p>I am sure I am not alone in knowing least 5 commands that I use day in and day out to manage workstations or servers on the network. I thought I would take the time to share some of these with you now.</p>
<p><span id="more-362"></span></p>
<p><strong>dirquota</strong></p>
<p><em>Windows 2003 R2 Only</em></p>
<p><em></em></p>
<p>dirquota is part of Windows 2003 R2 File Server Resource Manager (&#8220;FSRM&#8221;) which I use to manage quotas on home areas and shared folders. dirquota is the command line mechanism for managing the quota portion of FSRM, with the number of users we have it is important that we can modify quotas quickly, something the FSRM Quota GUI is not good at.</p>
<p>There I two basic forms I use every day:</p>
<p><em>dirquota quota list /path:&lt;path&gt;</em></p>
<p>Simply enough this will create a report for the path including peak usage, current usage and quota limit along with dates and times useful when determining what to do with the quota. Usefully the verbs <em>quota </em>and <em>list </em>can be abbreviated to <em>q</em> and <em>l</em> respectively, which saves a bit of typing.</p>
<p>The second form is to modify quotas:</p>
<p><em>dirquota quota modify /path:&lt;path&gt; /limit:&lt;limit&gt;</em></p>
<p>The command does what is expected; modifies the quota on the path to the specific limit. Again the verbs <em>quota </em>and <em>modify </em>can be abbreviated to <em>q </em>and <em>m</em>, in addition the limit parameter can be expressed in units, f.ex, 50MB, 500MB, 1G, 20G.</p>
<p><strong>robocopy</strong></p>
<p><em>All Windows Platforms</em></p>
<p><a class='wikipedia' href='http://en.wikipedia.org/wiki/Robocopy' title='Wikipedia article on Robocopy'>Robocopy</a> (or Robust Copy) is the <a class='wikipedia' href='http://en.wikipedia.org/wiki/Swiss_Army_Knife' title='Wikipedia article on Swiss Army Knife'>Swiss Army Knife</a> of file copy tools while it doesn&#8217;t have a GUI it is more than capable of doing taking on any copy job. Originally part of the Windows Server Resource Kit it is not a standard command in <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_Vista' title='Wikipedia article on Windows Vista'>Windows Vista</a> and <a class='wikipedia' href='http://en.wikipedia.org/wiki/Windows_2008_Server' title='Wikipedia article on Windows 2008 Server'>Windows 2008 Server</a>.</p>
<p>Typing &#8220;robocopy /?&#8221; at the command line might be slightly overwhelming however there is one boiler plate command that will do the job.</p>
<p><em>robocopy &lt;source&gt; &lt;destination&gt; /E /ZB /COPY:DAT /R:3 /W:10 /XJ /XF *.tmp ~$*.doc</em></p>
<p>&lt;source&gt; and &lt;destination&gt; can be local paths, mapped drives or UNC paths.</p>
<ul>
<li><em>/E</em> &#8211; copies files and folders recursively including empty folders, if you want to exclude empty folders replace /E with /S.</li>
<li><em>/ZB</em> &#8211; copies files in restartable mode, if that fails due to an access denied error then use backup mode, this will require administrator access to work, use /Z if you are not running as an administrator.</li>
<li><em>/COPY:DAT</em> &#8211; copies only <strong>D</strong>ata, <strong>A</strong>ttributes and <strong>T</strong>imestamps useful when taking a copy to move to a new file system and re-apply permissions from scratch. Check the help pages for information about other options.</li>
<li><em>/R:3 /W:10</em> &#8211; Retry three times, wait 10 seconds between tries. Important if you have an Anti-Virus product configured to scan on access as you may get System Error messages when trying to access these files.</li>
<li><em>/XJ</em> &#8211; Exclude Junction Points. Very important for Windows Vista as the user profile &#8220;Application Data&#8221; folder points to itself causing recursive and eventually failing copy operations.</li>
<li><em>/XF &lt;filespec&gt;</em> &#8211; Exclude Files. There is rarely any point in copying temporary.</li>
</ul>
<p><strong>wuauclt /detectnow</strong></p>
<p><em>All Windows Platforms</em></p>
<p>wuauclt stands for <strong>W</strong>indows <strong>U</strong>pdate <strong>A</strong>utomatic <strong>U</strong>pdate <strong>Cl</strong>ien<strong>t</strong>, yes it is a bit of a mouth full, /detectnow is a simple operation to kick off the Windows Update client to detect if updates are required rather than relying on the detection schedule.</p>
<p><strong>dsquery, dsmove</strong></p>
<p>The Active Directory Users and Computers (ADUC) <a class='wikipedia' href='http://en.wikipedia.org/wiki/Microsoft_Management_Console' title='Wikipedia article on Microsoft Management Console'>Microsoft Management Console</a> Add-on is sufficient for the majority of Active Directory operations. There are situations where it is useful to be able to script an operation, for example the mass moves of objects from one location to another.</p>
<p>I tend to use <a class='wikipedia' href='http://en.wikipedia.org/wiki/Microsoft_Excel' title='Wikipedia article on Microsoft Excel'>Microsoft Excel</a> to to transform a text file report to a list of directory commands, most recently I moved all laptops that had not accessed the domain for the past six weeks to an &#8220;Lost Computers&#8221; OU. At which point I disabled the computer account through ADUC.</p>
<p><em>dsquery computer -name LTA3-44 | dsmove -newparent &#8220;ou=Lost Computers,dc=domain,dc=co,dc=uk&#8221;</em></p>
<p><strong>icacls</strong></p>
<p><em>Windows Vista, Windows 2003 SP2 and Windows 2008 Only</em></p>
<p>icacls is the long awaited replacement to cacls and xcacls providing command line access to modifying Windows <a class='wikipedia' href='http://en.wikipedia.org/wiki/NTFS' title='Wikipedia article on NTFS'>NTFS</a> <a class='wikipedia' href='http://en.wikipedia.org/wiki/Access_Control_Lists' title='Wikipedia article on Access Control Lists'>Access Control Lists</a>. icacls provides more flexibility that cacls and xcacls making it a essential skill to learn for manageing mass permission changes on disks with many different users.</p>
<p><em>icacls /grant DOMAIN\rslater:(OI)(CI)F /T</em></p>
<ul>
<li>/grant DOMAIN\username &#8211; grants the specified permission to this user, /deny is also an option however one to be careful of.</li>
<li> <img src='http://www.richard-slater.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> OI)(CI) &#8211; not some strange smiley, but means <strong>O</strong>bject <strong>I</strong>nherit, <strong>C</strong>ontainer <strong>I</strong>nherit, applies only to directories and means files and folders within the folder will inherit permissions from the folder.</li>
<li>/T &#8211; recurse directories.</li>
</ul>
<p><strong>Final Thought</strong></p>
<p>Every Systems Administrator, Programmer, Hacker, Scripter and Helpdesk Operator must have at least 5 commands that make their life easier, if you have posted about these commands on your blog please do leave a link in the comments. Equally if you think of a command while reading this blog entry feel free to post it in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richard-slater.co.uk/archives/2008/09/08/5-commands-i-use-every-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
