<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Dave&#039;s Notepad</title>
	<atom:link href="http://davelee212.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davelee212.wordpress.com</link>
	<description>...my notes on IT things, because I will forget!!</description>
	<lastBuildDate>Wed, 04 Jan 2012 18:22:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='davelee212.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Dave&#039;s Notepad</title>
		<link>http://davelee212.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://davelee212.wordpress.com/osd.xml" title="Dave&#039;s Notepad" />
	<atom:link rel='hub' href='http://davelee212.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Apple TV 2 4.4.4 Untethered Jailbreak</title>
		<link>http://davelee212.wordpress.com/2011/12/31/apple-tv-2-4-4-4-untethered-jailbreak/</link>
		<comments>http://davelee212.wordpress.com/2011/12/31/apple-tv-2-4-4-4-untethered-jailbreak/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 10:16:38 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davelee212.wordpress.com/?p=494</guid>
		<description><![CDATA[Having just bought an Apple TV 2 I was pleased to see that it is now possible to jailbreak the latest firmware without having to boot tethered (i.e. plug the Apple TV into your comptuer to boot it every time you lose power!) Info on it is here: http://blog.firecore.com/6434 The process is fairly automated so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=494&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having just bought an Apple TV 2 I was pleased to see that it is now possible to jailbreak the latest firmware without having to boot tethered (i.e. plug the Apple TV into your comptuer to boot it every time you lose power!)</p>
<p>Info on it is here: <a href="http://blog.firecore.com/6434">http://blog.firecore.com/6434</a></p>
<p>The process is fairly automated so it&#8217;s pretty easy.  I had a problem with it when it tried to upload the new custom jailbroken firmware to my Apple TV.  It&#8217;s supposed to automate the process within iTunes (by the Seas0npass program controlling iTunes) but it didn&#8217;t work for me.  It also left my Apple 2 in a non-bootable state.  I had to download a program called &#8220;iReb&#8221; and use this to put my Apple TV into DFU (Device Firmware Update) mode then go into iTunes, select the Apple TV, hold shift and click the Restore button then select the custom firmware created by Seas0npass and it worked.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/494/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/494/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/494/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=494&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/12/31/apple-tv-2-4-4-4-untethered-jailbreak/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>Home VCP Lab</title>
		<link>http://davelee212.wordpress.com/2011/08/13/home-vcp-lab/</link>
		<comments>http://davelee212.wordpress.com/2011/08/13/home-vcp-lab/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 10:30:35 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davelee212.wordpress.com/?p=490</guid>
		<description><![CDATA[I&#8217;m currently studying for the VCP4 exam so it made sense to sort out the kit I have at home and turn it into a proper VMware labs.  As seems to be customary, I thought I&#8217;d post details of it here in case anyone else wants to know that these bits work. Hosts (x2) HP [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=490&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently studying for the VCP4 exam so it made sense to sort out the kit I have at home and turn it into a proper VMware labs.  As seems to be customary, I thought I&#8217;d post details of it here in case anyone else wants to know that these bits work.</p>
<p><span style="text-decoration:underline;">Hosts (x2)<br />
</span>HP Compaq Business Desktop dc7700<span style="text-decoration:underline;"><br />
</span>Intel Core 2 Duo E6400 (Dual Core 2Ghz)<br />
6GB RAM<br />
Onboard Gigabit NIC<br />
Intel Dual Port Gigabit NIC<br />
250GB SATA Local Storage<br />
One host on ESX, the other on ESXi (got to know both!)</p>
<p><span style="text-decoration:underline;">SAN1</span><br />
Netgear ReadyNAS 1100<br />
2 x NFS Shares</p>
<p><span style="text-decoration:underline;">SAN2<br />
</span>HP Proliant ML110 running OpenFiler<br />
No targets configured yet!</p>
<p>Connecting all this stuff together is a Cisco &#8220;Small Business&#8221; SG 200-08 switch.  I bought this having seen the previous version was being used by others in their home labs.  I&#8217;m impressed with it so far, especially considering it cost less than £100 delivered!  It&#8217;s an 8 port managed Gigabit switch.  It supports Link Aggregation, VLANs (including trunking), Jumbo Frames and a lot more!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/490/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/490/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/490/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=490&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/08/13/home-vcp-lab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>Nortel/Avaya Source Based IP Routing</title>
		<link>http://davelee212.wordpress.com/2011/07/07/nortelavaya-source-based-ip-routing/</link>
		<comments>http://davelee212.wordpress.com/2011/07/07/nortelavaya-source-based-ip-routing/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 21:38:00 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[General IT Stuff]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://davelee212.wordpress.com/?p=478</guid>
		<description><![CDATA[We run a pair of stacked Nortel/Avaya ERS 5698 switches which handle routing for our building.  We also have two Internet connections coming into the building connected (via firewalls of course!) to the switch.  We wanted to make sure that certain devices on the network went out through one connection and everything else went out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=478&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We run a pair of stacked Nortel/Avaya ERS 5698 switches which handle routing for our building.  We also have two Internet connections coming into the building connected (via firewalls of course!) to the switch.  We wanted to make sure that certain devices on the network went out through one connection and everything else went out through the other connection.  So, seemed like a job for source based routing but damned if we could see how to configure it!</p>
<p>After some Googling, we found that Avaya call it &#8220;Content-based forward to next hop&#8221; and it was a fairly recent addition to the our switch.  Thankfully, was introduced in the firmware released just because we installed them (v6.2, released November 2010) so it was already available on our switch.  However, the options for it just didn&#8217;t seem to be available on the Enterprise Device Manager GUI so we couldn&#8217;t even put the tick in the ForwardingNextHopAdminEnabled box as required as the box wasn&#8217;t even there.</p>
<p>It works from the CLI though&#8230;  You have to enable it on the switch, create a policy (like Cisco&#8217;s access lists I suppose) and then apply that policy to a VLAN.  Blatant plagerism from the documentation follows&#8230;</p>
<p align="LEFT"><span style="font-family:Arial;font-size:small;"><span style="font-family:Arial;font-size:small;">1. To globally enable the IP forwarding next-hop feature, enter the </span></span>following from Global Configuration mode:</p>
<pre>ip fwd-nh enable</pre>
<p align="LEFT">2. <span style="font-family:Arial;font-size:small;"><span style="font-family:Arial;font-size:small;">To create an IP forwarding next-hop policy, enter the following </span></span>from Global Configuration mode:</p>
<pre>ip fwd-nh &lt;policy-name&gt; match &lt;source-ip/mask&gt; set next-hop &lt;next-hop&gt;</pre>
<p align="LEFT"><span style="font-family:Arial;font-size:small;"><span style="font-family:Arial;font-size:small;"><span style="font-family:Georgia;">3. </span>To apply an IP forwarding next-hop policy to a VLAN, enter the </span></span>following from Interface Configuration mode:</p>
<pre>ip fwd-nh policy &lt;policy-name&gt; [mode {drop | normal-routing}]</pre>
<p align="LEFT"><span style="font-family:Arial;font-size:small;"><span style="font-family:Arial;font-size:small;"><span style="font-family:Georgia;">4. </span>To delete a policy, enter the following from Global Configuration </span></span>mode:</p>
<pre>no ip fwd-nh &lt;policy-name&gt;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/478/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/478/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/478/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=478&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/07/07/nortelavaya-source-based-ip-routing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>Replacing Failed Disks on NetApp FAS</title>
		<link>http://davelee212.wordpress.com/2011/03/18/461/</link>
		<comments>http://davelee212.wordpress.com/2011/03/18/461/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 12:56:01 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[Virtualisation]]></category>

		<guid isPermaLink="false">http://davelee212.wordpress.com/?p=461</guid>
		<description><![CDATA[We had a disk fail in our NetApp FAS2040 last night.  It did it&#8217;s thing and dutifully put one of the hot spare to use and went about testing the failed disk.  It sent us an email to let us know what was happened and also automatically raised a ticket with NetApp support.  When I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=461&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We had a disk fail in our NetApp FAS2040 last night.  It did it&#8217;s thing and dutifully put one of the hot spare to use and went about testing the failed disk.  It sent us an email to let us know what was happened and also automatically raised a ticket with NetApp support.  When I logged into the NetApp support site the ticket was there waiting for us to confirm that we hadn&#8217;t been pulling drives out for a reason (which we hadn&#8217;t!)  7 hours later the disk was still being tests so, because of the length of time this was taking, NetApp decided to ship a replacement disk.  They requested a replacement disk for us at around midnight and the replacement disk turned up at 10.30am.  Much respect to NetApp and UPS!</p>
<p>I checked the disk in System Manager (the GUI tool) and it appears that the so-called failed disk had been converted to a Spare and was quite happy.  The disk got swapped out anyway as I didn&#8217;t feel comfortable keeping as seeing as it had misbehaved last night.  Once the disk was swapped it disappeared from the GUI all together so it needed to be assigned manually to the correct system (it&#8217;s a two system active/active cluster).</p>
<p>A couple of things that I found useful so I thought I&#8217;d make a note:</p>
<p><strong><span style="text-decoration:underline;"> </span></strong></p>
<p><strong><span style="text-decoration:underline;">Identifying The Disk</span></strong></p>
<p>A failed disk should have an orange LED lit.  Sometimes it doesn&#8217;t though but you can manually switch the LED on.</p>
<p>1.  SSH onto the NetApp box and logon<br />
2.  Switch to advanced mode:</p>
<pre>CONTROLLER-A&gt; priv set advanced</pre>
<p>3.  Switch the LED on for disk 0c.00.7:</p>
<pre>CONTROLLER-A&gt; blink_on 0c.007</pre>
<p>4.  To switch the LED off for disk 0c.00.7:</p>
<pre>CONTROLLER-A&gt; blink_off 0c.007</pre>
<p>5.  Come out of advanced mode:</p>
<pre>CONTROLLER-A&gt; priv set</pre>
<p><strong><span style="text-decoration:underline;"> </span></strong></p>
<p><strong><span style="text-decoration:underline;"><br />
</span></strong></p>
<p><strong><span style="text-decoration:underline;">Assigning the replacement disk</span></strong></p>
<p>When you physically swap the disk it will fire off some Autosupport messages and will hopefully pick up the new disk.  In my case, it didn&#8217;t do anything with the disk and nothing showed up in the NetApp System Manager.  I had to go to the CLI and assign it manually.<br />
1.  Display unassigned disks:</p>
<pre>CONTROLLER-A&gt; disk show -n
DISK       OWNER                  POOL   SERIAL NUMBER
---------- -------------          -----  -------------
0c.00.7    Not Owned              NONE   JMY4YGLC</pre>
<p>2.  Assign the disk to the correct controller:</p>
<pre>CONTROLLER-A&gt; disk assign 0c.00.7
Fri Mar 18 11:57:37 GMT [NSH-A: diskown.changingOwner:info]: changing ownership for disk 0c.00.7 (S/N JMY4YGLC) from unowned (ID -1) to CONTROLLER-A (ID 135109646)
NSH-A*&gt; Fri Mar 18 11:57:37 GMT [NSH-A: diskown.RescanMessageFailed:warning]: Could not send rescan message to CONTROLLER-A. Please type disk show on the console of NSH-A for it to scan the newly inserted disks.</pre>
<p>3.  If it won&#8217;t accept the command in step 2, it might have been auto assigned to the wrong controller/system.  You can you can clear the assignment from the disk using the following command then retry step 2:</p>
<pre>CONTROLLER-A&gt; disk assign 0c.00.7 -s unowned -f
Note: Disks may be automatically assigned to this node, since option disk.auto_assign is on.</pre>
<p>Checking back in System Manager shows that the disk is back in action but it&#8217;s still showing as a spare.  It seems that NetApp systems aren&#8217;t bothered about going back to the original hot spare, which seems like a very sensible idea.  Why bother reconstructing the new disk when it&#8217;s already been done once when it originally failed over to the spare?</p>
<p><strong>It&#8217;s probably best to temporarily disable AutoSupport while doing this.  That way the FAS is prevented from &#8220;phoning home&#8221; and possibly generating unrequired support cases.  I overlooked this and got an additional drive delivered 4 hours after replacing the failed one.  The FAS seems to have triggered a new AutoSupport case when I pulled the drive to replace it.</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/461/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/461/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/461/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=461&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/03/18/461/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>Sonicwall Client Unattended Install and RCF distribution</title>
		<link>http://davelee212.wordpress.com/2011/02/26/sonicwall-client-unattended-install-and-rcf-distribution/</link>
		<comments>http://davelee212.wordpress.com/2011/02/26/sonicwall-client-unattended-install-and-rcf-distribution/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 17:19:34 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.davesdomain.co.uk/?p=421</guid>
		<description><![CDATA[With the Sonicwall VPN Client being part of our standard laptop build, we wanted to automate the install and configuration and set it up as a package on our SCCM server.  The installer comes as an executable but it is possible to extract an MSI from it which can be used with msiexec.exe to perform [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=421&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With the Sonicwall VPN Client being part of our standard laptop build, we wanted to automate the install and configuration and set it up as a package on our SCCM server.  The installer comes as an executable but it is possible to extract an MSI from it which can be used with msiexec.exe to perform a silent installation:</p>
<ol>
<li>Download the latest Global VPN Client from mysonicwall.com</li>
<li>Extract the MSI from the installer by running:<br />
<em>SetupFile</em>.exe /c /t:C:\tempfolder</li>
<li>The installer can now be run silently using:<br />
msiexec.exe /i GVCInstall64.msi /qn /norestart</li>
</ol>
<p>Although it can be installed silently, the problem comes with distributing the configuration.  If you put your RCF file into the folder the installer runs from, it seems to pick up on it and copies it into the destination folder on the computer.  This doesn&#8217;t seem to be picked up for all users that log into the computer though.  It seems that the RCF file needs to be inside the Application Data in each users profile.  For instance, on Windows 7, it needs to be put into here:</p>
<p>C:\Users\<em>username</em>\AppData\Roaming\SonicWALL\SonicWALL Global VPN Client</p>
<p>To do this, I put together a VBScript that kicks off the installer silently, finds the user profile folder (as it differs between Windows XP and Windows 7 machines) and puts the RCF file into the relevant folder within every user profile that exists on the computer and it&#8217;s the Default user profile so it&#8217;s there for any new users that logon.</p>
<p>The install files, the RCF and the script were then uploaded to the SCCM server and a package and program created for distribution.</p>
<p><a href="http://dl.dropbox.com/u/11421753/Scripts/SonicwallInstallScript.vbs">SonicwallInstallScript.vbs</a></p>
<pre>' start quiet installation of Sonicwall VPN Client
Set wshShell = CreateObject("Wscript.Shell")
wshShell.Run("msiexec.exe /i GVCInstall64.msi /qn /norestart", 1, True)
Set objFSO = CreateObject("Scripting.FileSystemObject")                 
If objFSO.FolderExists("C:\Documents and Settings") Then
 UserProfileFolder = "C:\Documents and Settings"
 AppDataFolder = "\Application Data\"
End if
If objFSO.FolderExists("C:\Users") Then
 UserProfileFolder = "C:\Users"
 AppDataFolder = "\AppData\Roaming\"
End if
Set objFolder = objFSO.GetFolder(UserProfileFolder)
Set colSubfolders = objFolder.Subfolders
For Each objSubfolder in colSubfolders
 ' Check if there is a folder for Application Data (there isn't for Public and All Users so these should be skipped)
 IF objFSO.FolderExists(UserProfileFolder &amp; "\" &amp; objSubfolder.name &amp; AppDataFolder) THEN

   ' Check if there is a SonicWALL\SonicWALL Global VPN Client folder in the user profile
   If NOT objFSO.FolderExists(UserProfileFolder &amp; "\" &amp; objSubfolder.name &amp; AppDataFolder &amp; "SonicWALL\SonicWALL Global VPN Client") Then

    ' Check if there is a SonicWALL folder, if not create it
    If NOT objFSO.FolderExists(UserProfileFolder &amp; "\" &amp; objSubfolder.name &amp; AppDataFolder &amp; "SonicWALL") then
     set newFolder = objFSO.CreateFolder(UserProfileFolder &amp; "\" &amp; objSubfolder.name &amp; AppDataFolder &amp; "SonicWALL")
    End If

    ' Create the folder SonicWALL Global VPN Client within the SonicWALL folder
    set newFolder = objFSO.CreateFolder(UserProfileFolder &amp; "\" &amp; objSubfolder.name &amp; AppDataFolder &amp; "SonicWALL\SonicWALL Global VPN Client")

   End If 

   ' Now that we're sure there is a SonicWALL\SonicWALL Global VPN Client folder for each
   ' user, copy the RCF file to all user profiles
   Set objFileCopy = objFSO.GetFile("default.rcf")
   objFileCopy.Copy (UserProfileFolder &amp; "\" &amp; objSubfolder.name &amp; AppDataFolder &amp; "SonicWALL\SonicWALL Global VPN Client\SonicWALL Global VPN Client.rcf")

 End If

Next</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/421/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/421/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/421/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=421&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/02/26/sonicwall-client-unattended-install-and-rcf-distribution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle RMAN Backups</title>
		<link>http://davelee212.wordpress.com/2011/01/26/oracle-rman-backups/</link>
		<comments>http://davelee212.wordpress.com/2011/01/26/oracle-rman-backups/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 19:01:21 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[General IT Stuff]]></category>

		<guid isPermaLink="false">http://www.davesdomain.co.uk/?p=379</guid>
		<description><![CDATA[Although I&#8217;m not a full time DBA, I&#8217;ve always found myself managing databases of one sort or another.  Although most of my experience as a DBA is with Microsoft SQL Server, I&#8217;ve always had an Oracle database lurking around somewhere!  My current role is no different; we&#8217;re running our purchasing/finance system on an Oracle database.  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=379&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Although I&#8217;m not a full time DBA, I&#8217;ve always found myself managing databases of one sort or another.  Although most of my experience as a DBA is with Microsoft SQL Server, I&#8217;ve always had an Oracle database lurking around somewhere!  My current role is no different; we&#8217;re running our purchasing/finance system on an Oracle database.  Until recently, the Oracle server was hosted in a data centre in London and backed up as part of the managed services package.  We&#8217;ve now moved this box inhouse and upgraded to Oracle 11G so I had to set up some backups.</p>
<p>Note:  This is just how I set things up and not necessarily the right way!  I&#8217;m using Oracle&#8217;s RMAN tool which seems to have all the features you really need for backup and recovery.  Here&#8217;s the steps I took to get it running.</p>
<p><strong> </strong></p>
<p><strong><span style="text-decoration:underline;">Put the database into Archive Log Mode</span></strong></p>
<p>Oracle uses it&#8217;s &#8220;redo logs&#8221; (like SQL Server&#8217;s transaction logs) in rotation and begins overwriting the oldest log file when it fills the log file currently in use.  Running in &#8220;archive log mode&#8221; causes Oracle to copy the log file out to another folder when it switches to the next file.  These can be backed up and used in conjunction with a database backup to provide consistent restores and point in time recovery.</p>
<ol>
<li>Create a folder on the server for the Flash Recovery Area which will store the archived logs.  For instance, I created e:\flash_recovery_area\databasename.<br />
 </li>
<li>Run the following statements on the database to set the path created in step 1 and the max size Oracle should allow the folder to grow to (I picked 30G):<code>Alter system db_recovery_file_dest=E:\flash_recovery_area<br />
Alter system db_recovery_file_dest_size = 30G</code><br />
 </li>
<li>Enable archive log mode on the database (note: this will take the database offline!):<code>Shutdown immediate<br />
Startup mount<br />
Alter database archivelog<br />
Alter database open</code><br />
 </li>
<li>Force a logfile switch (this should cause the current redo log to be archived):<code>Alter system switch logfile</code><br />
 </li>
<li>Go to the flash recovery area and check for the existence of an archived log file.</li>
</ol>
<p> </p>
<p><span style="text-decoration:underline;"><strong>Configure RMAN Options for the Database</strong></span></p>
<p>Before running backups with RMAN, you can configure a number of options in the database to be used by RMAN every time it makes a backup.  These options can be entered at a SQLPlus command prompt or put into a text file to be used as a script.  These are the options I used (the red text:</p>
<p><code># ensures that we have the last 3 backups<br />
CONFIGURE RETENTION POLICY TO REDUNDANCY 3; </code></p>
<p># causes unchanged files to be skipped<br />
CONFIGURE BACKUP OPTIMIZATION ON;</p>
<p># tells it we&#8217;re backing up to disk not tape<br />
CONFIGURE DEFAULT DEVICE TYPE TO DISK;</p>
<p> # backup the controlfile &#8211; not done by default<br />
CONFIGURE CONTROLFILE AUTOBACKUP ON;</p>
<p> # %F generates a random filename<br />
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO &#8216;E:\flash_recovery_area\dbname\rman\controlfile_autobackup_%F&#8217;;</p>
<p> # use one file at a time (only running backup to one set of disks)<br />
CONFIGURE DEVICE TYPE DISK PARALLELISM 1;</p>
<p> # keep one copy of each file backed up<br />
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; </p>
<p># default &#8211; keep one backup copy of archivelog files<br />
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;</p>
<p>CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   &#8216;E:\flash_recovery_area\dbname\rman\backup_%U&#8217;;</p>
<p>CONFIGURE MAXSETSIZE TO UNLIMITED;</p>
<p>CONFIGURE SNAPSHOT CONTROLFILE NAME TO &#8216;E:\flash_recovery_area\dbname\rman\snapshot_controlfile.ORA&#8217;;</p>
<p><span style="text-decoration:underline;"><strong> </strong></span></p>
<p><span style="text-decoration:underline;"><strong>Configure Backup Job Script</strong></span></p>
<p>Once the CONFIGURE statements have been run against the database, create a script with the following commands in it to kick off the RMAN backup job:</p>
<p><code>BACKUP DATABASE PLUS ARCHIVELOG;<br />
RESTORE DATABASE VALIDATE;<br />
DELETE NOPROMPT OBSOLETE;<br />
EXIT;</code></p>
<p>Put the following into a batch file and schedule it to run whenever you want the backups to run (obviously replacing the username, password, instance and script name!):</p>
<p>SQLPLUS <a href="mailto:username/password@instancename">username/password@instancename</a> @c:\scriptname.sql</p>
<p>It&#8217;s probably a good time to run the script now to test things out and get a good backup.</p>
<p><span style="text-decoration:underline;"><strong> </strong></span></p>
<p><span style="text-decoration:underline;"><strong>Script Database Information to File</strong></span></p>
<p>I was advised by an Oracle DBA that it is useful to have up to date information about a databases files, tablespaces, backup history, etc, available if you need to do a restore.  I found a <a href="http://www.davesdomain.co.uk/wp-content/uploads/2011/01/dba_snapshot_database_10g.sql">script</a> to output database information written by a chap called Jeff Hunter on the <a href="http://www.idevelopment.info/data/Oracle/DBA_tips/Database_Administration/DBA_50.shtml">idevelopment.info</a> website.  When you run it, it generates an HTML file containing loads of information about the database.  I downloaded his script and put it at the end of the batch file created to kick off backups.</p>
<p><span style="text-decoration:underline;"><strong>Copy backup data somewhere safe!</strong></span> </p>
<p>Robocopy is part of the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&amp;displaylang=en">Windows Server 2003 Resource Kit tools</a> and is a great (and free!) tool for replicating data from one location to another.  I setup an hourly job to replicate everything from my Flash Recovery Area to a file server we use for archived and backup information.</p>
<p>robocopy e:\flash_recovery_area <a href="//backupserver/oraclebackups">\\backupserver\oraclebackups</a> /R:3 /MIR /V /LOG:&#8221;e:\replication.log&#8221; /TEE</p>
<p>Much thanks to Oracle&#8217;s RMAN documentation and the following Tek Tips post!<br />
 &lt;<a href="http://www.tek-tips.com/viewthread.cfm?qid=1394177&amp;page=39">http://www.tek-tips.com/viewthread.cfm?qid=1394177&amp;page=39</a>&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/379/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=379&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/01/26/oracle-rman-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>Active Directory &quot;Self Service&quot; Tools</title>
		<link>http://davelee212.wordpress.com/2011/01/23/active-directory-self-service-tools/</link>
		<comments>http://davelee212.wordpress.com/2011/01/23/active-directory-self-service-tools/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 13:44:31 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[General IT Stuff]]></category>

		<guid isPermaLink="false">http://www.davesdomain.co.uk/?p=342</guid>
		<description><![CDATA[We now have a number of devices/applications (Sharepoint People Search, Outlook, Lync and Blackberry devices) reading more than just usernames from Active Directory.  So, it&#8217;s becoming increasingly important to keep the information in Active Directory up to date.  We wanted to give people the ability to edit their own information in AD but also to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=342&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We now have a number of devices/applications (Sharepoint People Search, Outlook, Lync and Blackberry devices) reading more than just usernames from Active Directory.  So, it&#8217;s becoming increasingly important to keep the information in Active Directory up to date.  We wanted to give people the ability to edit their own information in AD but also to allow a small group of people (generally the HR department) to edit details for all employees.</p>
<p>The edit profile stuff in MOSS 2007 would edit the information in Sharepoint and there are tools available to do a nightly sync back into AD but this would overwrite any changes anyone had made directory in AD (i.e. changes made by IT).  It also didn&#8217;t allow specific users to edit everyone&#8217;s profiles.  We also didn&#8217;t want to give people access to the &#8220;Active Directory Users &amp; Computers&#8221; tool.  I thought I was going to have to write my own tool so I went looking for examples of code for LDAP queries within ASP.  Whilst doing so, I stumbled across a couple of tools that seemed to do exactly what I was after!</p>
<p>Directory Update (available from <a href="http://www.ithicos.com/">Ithicos Solutions</a>) is an ASP.NET web application that uses Windows Authentication to determine who the user is and dumps them at a page to edit their own information.  It is really configurable, allowing the administrator to pick which fields are visible, which fields can be updated, which fields are pre-populated drop box lists (great for ensuring consistency!) and address lists can be populated based on the selection of an office in another drop down field.  You can expose any attribute in AD so you can use it to allow updates to pretty much anything stored against a user in AD.</p>
<p> </p>
<p><a href="http://davelee212.files.wordpress.com/2011/01/scaledback1.gif"><img title="DirectoryUpdate" src="http://davelee212.files.wordpress.com/2011/01/scaledback1.gif?w=431&#038;h=257" alt="DirectoryUpdate" width="431" height="257" /></a><br />
<strong><span>Directory Update</span></strong></p>
<p><strong><span> </span></strong></p>
<p>Another application, Directory Manager, can be used to search Active Directory and edit details for almost any user.  We&#8217;ve provided this to a small group of users in the HR and Facilities teams.</p>
<p>The only problem we&#8217;ve come up against is that, although we can upload pictures to Active Directory, Sharepoint cannot import the photos.  Sharepoint can only store a URL to a photo against a user profile.  If you try to sync the jpegPhoto or thumbnailPhoto octetstream fields from AD into the picture field in Sharepoint user profiles, it falls over.  We&#8217;ve not yet found a solution to this so, if a users needs a new photo uploading, we ask them to email it to us and we upload it manually.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/342/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/342/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/342/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=342&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/01/23/active-directory-self-service-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>

		<media:content url="http://davelee212.files.wordpress.com/2011/01/scaledback1.gif" medium="image">
			<media:title type="html">DirectoryUpdate</media:title>
		</media:content>
	</item>
		<item>
		<title>Cleaning Up Log Files</title>
		<link>http://davelee212.wordpress.com/2011/01/21/cleaning-up-log-files/</link>
		<comments>http://davelee212.wordpress.com/2011/01/21/cleaning-up-log-files/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 01:15:20 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[General IT Stuff]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.davesdomain.co.uk/?p=345</guid>
		<description><![CDATA[Log files are probably the bain of every administrators life.  They only ever seem to get bigger and have a habit of filling disks up on servers and eventually stopping things working.  Having just cleared about 6Gb of logs off a machine I thought it might be about time to script this&#8230; I am by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=345&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Log files are probably the bain of every administrators life.  They only ever seem to get bigger and have a habit of filling disks up on servers and eventually stopping things working.  Having just cleared about 6Gb of logs off a machine I thought it might be about time to script this&#8230;</p>
<p>I am by no means a programmer but I managed to knock something up in vbscript that did the job.  It&#8217;s not pretty and it&#8217;s probably missing out a whole load of useful things but I&#8217;ll probably build on it as and when I need it to do something else.  For the moment, it does what I need it to.</p>
<p>So, a summary of what it does:</p>
<ol>
<li>Reads the first line of the config that doesn&#8217;t start with # (i.e. not a comment)</li>
<li>Get the 3 items of data on the first line of the config (path, file extension, rentention time)</li>
<li>Check each file under the path given.  If a file has the same extension as listed on the line in the config and is older (in days) than the rentention time set, the file is deleted.</li>
<li>The script then reads the next line in the config and does the same for the next directory.</li>
</ol>
<p>Errors and written out to screen and stored in a log file (more useful as it&#8217;s likely to be run as a scheduled task).</p>
<p>Download the script with config and readme: <a href="http://dl.dropbox.com/u/11421753/Scripts/LogCleaner.zip">LogCleaner.zip</a></p>
<p>The script itself (although not that readable when copied into here!)</p>
<div><code><br />
Dim ScriptDir , objFSO, objConfigFile, objLogFolder, objLogFile, strLeadCharacter, strNextLine, colFiles</code></div>
<div><code>Const ForReading = 1<br />
Const ForWriting = 2</code></div>
<div><code>ScriptDir = Replace(WScript.ScriptFullName,WScript.ScriptName,"")<br />
Set objFSO = CreateObject("Scripting.FileSystemObject")<br />
set objScriptLogFile = objFSO.OpenTextFile (ScriptDir &amp; "logcleaner.log", ForWriting, True)<br />
objScriptLogFile.WriteLine (Now() &amp; ": LogCleaner Started")</code></div>
<p><code>'Check that there is a config file<br />
If not objFSO.FileExists(ScriptDir &amp; "logcleaner.cfg") Then<br />
wscript.echo ("No logcleaner.cfg file found... cannot continue...")<br />
objScriptLogFile.WriteLine (Now() &amp; ": logcleaner.cfg not found")<br />
objScriptLogFile.WriteLine (Now() &amp; ": LogCleaner exited due to error")<br />
wscript.quit<br />
end if</p>
<p>'Open the config file<br />
Set objConfigFile = objFSO.OpenTextFile (ScriptDir &amp; "logcleaner.cfg", ForReading)</p>
<p>Do Until objConfigFile.AtEndOfStream</p>
<p>' Check to see if the config file line begins with # in which case it's a comment and should be skipped<br />
If left(replace(objConfigFile.ReadLine, " ", ""), 1) &lt;&gt; "#" then</p>
<p>' Split the comma separated values and load into the arrFolderDetails array<br />
arrFolderDetails = Split(objConfigFile.Readline , ",")</p>
<p>' Ensure that the trailing char is a slash, if it's not we append a \ to the path<br />
if right(arrFolderDetails(0), 1) &lt;&gt; "\" then<br />
arrFolderDetails(0) = arrFolderDetails(0) &amp; "\"<br />
end if</p>
<p>' Remove any leading or trailing spaces in the extension given<br />
arrFolderDetails(1) = ltrim(rtrim(arrFolderDetails(1)))</p>
<p>' Put list of files in current folder into colFiles<br />
Set objLogFolder = objFSO.GetFolder(arrFolderDetails(0))<br />
Set colFiles = objLogFolder.Files</p>
<p>' Loop through colFiles<br />
For Each objLogFile in colFiles</p>
<p>' Allow script to continue if it hits errors. These will be caught and written to log<br />
On Error Resume Next</p>
<p>' Delete if files ends with extension given and is older than specified days<br />
if right(objLogFile.name,len(arrFolderDetails(1))) = arrFolderDetails(1) and DateDiff("d",objLogFile.DateCreated,now) &gt;= int(arrFolderDetails(2)) Then</p>
<p>' Attempt to delete file<br />
objFSO.DeleteFile(objLogFile.Path)</p>
<p>' Catch errors and write to log file (e.g. permission denied if a file is in use)<br />
If Err.Number &lt;&gt; 0 Then</p>
<p>'Write details of errors to log file<br />
errorMsg = (now() &amp; ": ERROR " &amp; Err.Description &amp; " " &amp; objLogFile.Path)<br />
errorMsg = Replace(errorMsg, " Permission denied ", " Permission Denied (file may be in use) ")<br />
objScriptLogfile.WriteLine errorMsg<br />
WScript.Echo errorMsg<br />
WScript.echo<br />
Err.Clear</p>
<p>Else</p>
<p>' Write successful message to log file<br />
objScriptLogFile.WriteLine (Now() &amp; ": DELETED "&amp; objLogFile.path &amp; " is " &amp; DateDiff("d",objLogFile.DateCreated,now) &amp; " days old and will be deleted")</p>
<p>End If</p>
<p>On Error Goto 0</p>
<p>end if</p>
<p>Next</p>
<p>End If</p>
<p>Loop</p>
<p>' All done! Write to log and quit<br />
objScriptLogFile.WriteLine (Now() &amp; ": LogCleaner Finished")</p>
<p>wscript.quit</p>
<p></code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/345/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/345/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=345&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/01/21/cleaning-up-log-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>Brew #1 Woodfordes Wherry</title>
		<link>http://davelee212.wordpress.com/2011/01/01/brew-1-woodfordes-wherry/</link>
		<comments>http://davelee212.wordpress.com/2011/01/01/brew-1-woodfordes-wherry/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 23:13:55 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[General IT Stuff]]></category>

		<guid isPermaLink="false">http://www.davesdomain.co.uk/?p=332</guid>
		<description><![CDATA[Being New Years Day, this is my first brew of 2011!  It&#8217;s also a fresh start with improved equipment &#8211; I&#8217;ve put a drum tap on the fermenter to aid with taking samples and got a heater to keep the temperature regulated.  So, brew number for a fresh start and a new year! Mixed the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=332&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Being New Years Day, this is my first brew of 2011!  It&#8217;s also a fresh start with improved equipment &#8211; I&#8217;ve put a drum tap on the fermenter to aid with taking samples and got a heater to keep the temperature regulated.  So, brew number for a fresh start and a new year!</p>
<p>Mixed the extract up with 3.5 litres of boiling water then topped up to 23 litres, as per the kit instructions.  The temperature of the resultant wort was 26c, too warm to pitch the yeast I think.  Need to make sure that the additional water is a little cooler next time.  Had to leave the wort a few hours before adding the yeast.</p>
<p>I used a 50w aquarium heater, sanitised and hung into the wort, set at 20c to regulate the temperature.  Wort temp was not taken during fermentation in case I contaminated the brew.  Perhaps I&#8217;ll santise the probe from my digital thermometer and leave it in there for next time.  I left the standard thermometer by the fermentation bucket to take the room temperature during fermentation.</p>
<p><strong>01-Jan-11 2330<br />
</strong>Pitched the yeast.  Original Gravity taken was 1043.  Wort temp at 22c.</p>
<p><strong>04-Jan-11 2300<br />
</strong>Gravity taken was 1020.  Room temp at 18c.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/332/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/332/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/332/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=332&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2011/01/01/brew-1-woodfordes-wherry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
		<item>
		<title>User Permissions On Power Settings</title>
		<link>http://davelee212.wordpress.com/2010/10/04/user-permissions-on-power-settings/</link>
		<comments>http://davelee212.wordpress.com/2010/10/04/user-permissions-on-power-settings/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 18:07:48 +0000</pubDate>
		<dc:creator>davelee212</dc:creator>
				<category><![CDATA[General IT Stuff]]></category>

		<guid isPermaLink="false">http://blog.davesdomain.co.uk/?p=323</guid>
		<description><![CDATA[I&#8217;m updating our Group Policies at the moment and one of the things we want to do is to allow normal non-admin users to change the power settings on their computer.  Because the requires access to a reg key in HKey Local Machine they can&#8217;t do it unless the permissions on the key are changed. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=323&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m updating our Group Policies at the moment and one of the things we want to do is to allow normal non-admin users to change the power settings on their computer.  Because the requires access to a reg key in HKey Local Machine they can&#8217;t do it unless the permissions on the key are changed.</p>
<p>The keys that users need access to change are:</p>
<p>HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\GlobalPowerPolicy<br />
and<br />
HKLM\Software\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg\PowerPolicies</p>
<p>To allow <em>domain</em>\Domain Users to change the power settings on their computers, do the following for each of the reg keys above in the GPO linked to the OU containing your computers:</p>
<ol>
<li>Go to Computer Config -&gt; Windows Settings -&gt; Security Settings -&gt; Registry</li>
<li>Right click then do Add Key</li>
<li>Find the key to add.</li>
<li>Right click on it, select Properties</li>
<li>Select Edit Security</li>
<li>Add the <em>domain\</em>Domain Users group (or another if you want to be more granular about it)</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davelee212.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davelee212.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davelee212.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davelee212.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/davelee212.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/davelee212.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/davelee212.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/davelee212.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davelee212.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davelee212.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davelee212.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davelee212.wordpress.com/323/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davelee212.wordpress.com/323/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davelee212.wordpress.com/323/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davelee212.wordpress.com&amp;blog=6634648&amp;post=323&amp;subd=davelee212&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://davelee212.wordpress.com/2010/10/04/user-permissions-on-power-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c1bb456141e5cc8526be99755403ce92?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davelee212</media:title>
		</media:content>
	</item>
	</channel>
</rss>
