<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>/usr/local.com</title>
	
	<link>http://usrlocal.com</link>
	<description>half true, half interesting, mostly BS</description>
	<lastBuildDate>Fri, 20 Apr 2012 05:28:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MattPatterson" /><feedburner:info uri="mattpatterson" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>MattPatterson</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Error 25113.Setup failed to generate the JRE SSL keys.</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/kLVEZjsFQic/</link>
		<comments>http://usrlocal.com/2012/04/vmware-error-25113-setup-failed-to-generate-the-jre-ssl-keys/#comments</comments>
		<pubDate>Fri, 20 Apr 2012 05:24:58 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[VUM]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1758</guid>
		<description><![CDATA[While working on an upgrade from vSphere 4.1u1 to vSphere5.0, I ran into the following error when I got to the upgrade manager portion of the upgrade. Error 25113.Setup failed to generate the JRE SSL keys. If you do any sort of googling for this, you&#8217;ll find people that suggest looking for openssl.exe and renaming [...]]]></description>
			<content:encoded><![CDATA[<p>While working on an upgrade from vSphere 4.1u1 to vSphere5.0, I ran into the following error when I got to the upgrade manager portion of the upgrade. </p>
<blockquote><p>Error 25113.Setup failed to generate the JRE SSL keys.</p></blockquote>
<p>If you do any sort of googling for this, you&#8217;ll find people that suggest looking for openssl.exe and renaming it temporarily.  I didn&#8217;t have openssl.exe so that wasn&#8217;t going to work.  Another person gave the old windows &#8220;fix&#8221; of just reboot the box.  Guess what, that didn&#8217;t work either.</p>
<p>In the end, the fix was pretty straight forward.  Remove the old Update Manager install and do a fresh install of the update manager.  Pretty painless and works like a champ.  </p>
<p>&nbsp;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/jbFIgS_3iEX_OeEAcgAWw6omzSM/0/da"><img src="http://feedads.g.doubleclick.net/~a/jbFIgS_3iEX_OeEAcgAWw6omzSM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jbFIgS_3iEX_OeEAcgAWw6omzSM/1/da"><img src="http://feedads.g.doubleclick.net/~a/jbFIgS_3iEX_OeEAcgAWw6omzSM/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/kLVEZjsFQic" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/04/vmware-error-25113-setup-failed-to-generate-the-jre-ssl-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/04/vmware-error-25113-setup-failed-to-generate-the-jre-ssl-keys/</feedburner:origLink></item>
		<item>
		<title>SQL exploits</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/9q_cWMxDEJY/</link>
		<comments>http://usrlocal.com/2012/04/sql-exploits/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 03:39:50 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[SQL Exploits]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1370</guid>
		<description><![CDATA[You know its going to be a bad day when you get the following email: Did someone hack our website? It looks like a Chinese news listing entry has been added with today’s date. Ballsack! Time to roll up the sleeves. How bad is the damage? From the looks of it, other sites on the [...]]]></description>
			<content:encoded><![CDATA[<p>You know its going to be a bad day when you get the following email:</p>
<blockquote><p>Did someone hack our website?  It looks like a Chinese news listing entry has been added with today’s date.</p></blockquote>
<p>Ballsack!</p>
<p>Time to roll up the sleeves.  How bad is the damage?  </p>
<p>From the looks of it, other sites on the web server had not been damaged.  Doing a search for modified files found nothing out of the ordinary had been changed.  Log files sure but nothing out of the ordinary.     A search through the web logs of the site showed that this appeared to be an attack on the Content Management System (CMS) for the site.   </p>
<p>Whichever jackass wrote that code should be beaten!  Get the torches and pitchforks, death to the programmer!!  Oh wait, that was me.  Death to the evil script kiddie that attacked my beautiful code!!!!!!!!!</p>
<p>Searching through the logs, I started seeing some interesting logs.  A bunch of them that had variations such as this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">http://unigleeclub.com/news.phtml?id=-999.9%20UNION%20ALL%20SELECT%200x31303235343830303536,(SELECT%20concat(0x7e,0x27,Hex(cast(user.username%20as%20char)),0x27,0x7e)%20FROM%20`gleeclub`.user%20LIMIT%203,1)%20,0x31303235343830303536,0x31303235343830303536--</div></div>
<p>This one is actually after a lot of hits from the attacker of figuring out the tables and then getting down to the nitty gritty of pulling out a username and password.  </p>
<p>The issue was that I had forgotten to sanitize my data. Like a jackass, I didn&#8217;t check that $id was an actual integer variable and when they ran thier script they were able to pull out a hex string that, with the use of such tools as <a href="http://home2.paulschou.net/tools/xlate/ " target="_blank">this site</a>, you can easily translate this into text.  </p>
<h2>The Quick Fix</h2>
<p>I put in 2 fixes to ensure that we were dealing with an integer value here.  First, I did some simple math to the variable that changes its type if it is not an integer.</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$id</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></div></div>
<p>If you have a string, you&#8217;ll get back a zero.  If you have an integer value, you&#8217;re good to go.  </p>
<p>Also in the code, I expanded the if statement that was around the code to grab the specific news item.  Instead of just checking to see if the $id variable was set, I now check to see if it is set and greater than zero, another layer in ensuring that we have a number instead of a string of text.</p>
<div class="codecolorer-container php dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">//Before:</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//After:</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$id</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span></div></div>
<p>We&#8217;re all human and humans make mistakes. This code that was exploited was written 8 years ago at a time when I should have known better, but missed it.  It lived in the wild up until last year when it was finally exploited.  I&#8217;m lucky that it took that long for it to expose itself, but kind of embarrassed that it was there in the first place.  While I tend to come down hard on people for not doing these sort of things, its only because I&#8217;ve learned my lesson the hard way and have seen people continually mess this stuff up.  While this happened to me a while ago, I&#8217;ve had friends get bit by this very recently so I figured it was time to finish off this post and get it out the door.  An ounce of prevention sort of thing.    </p>
<p>To lear more about SQL Inject attacks, here is a <a href="http://www.softwarequalityconnection.com/2011/01/how-to-understand-and-prevent-sql-injection-attacks/" target="_blank">good article</a> by Bhanu Mahesh on <a href="http://www.softwarequalityconnection.com/" target="_blank">Quality Software Connection</a> on how to prevent them.</p>
<p>&nbsp;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/HAAxA8GJ7B1VHK0QeE6ouNaN-m8/0/da"><img src="http://feedads.g.doubleclick.net/~a/HAAxA8GJ7B1VHK0QeE6ouNaN-m8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/HAAxA8GJ7B1VHK0QeE6ouNaN-m8/1/da"><img src="http://feedads.g.doubleclick.net/~a/HAAxA8GJ7B1VHK0QeE6ouNaN-m8/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/9q_cWMxDEJY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/04/sql-exploits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/04/sql-exploits/</feedburner:origLink></item>
		<item>
		<title>Keeping Myself Honest…</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/CHKnfdD76ZI/</link>
		<comments>http://usrlocal.com/2012/04/keeping-myself-honest/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 04:43:34 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[In the news]]></category>
		<category><![CDATA[Goals]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1735</guid>
		<description><![CDATA[In order to make sure I keep track on all my goals, I&#8217;m going to check in every quarter and see where I&#8217;m at. So seeing as it is the first day of April, time for the 1st quarter review. Goal #1: Sleep More! With the help of mercuryapp.com, I&#8217;ve been able to track my [...]]]></description>
			<content:encoded><![CDATA[<p>In order to make sure I keep track on all my <a href="http://usrlocal.com/2012/01/2012-goals/" target="_blank">goals</a>, I&#8217;m going to check in every quarter and see where I&#8217;m at.  So seeing as it is the first day of April, time for the 1st quarter review.  </p>
<p>Goal #1: Sleep More!  With the help of <a href="http://mercuryapp.com" target="_blank">mercuryapp.com</a>, I&#8217;ve been able to track my sleep time and so far for 3 months I&#8217;m averaging 6.86 hours of sleep a night.  I&#8217;m shooting for 7+ so I&#8217;m not too far off.</p>
<p>Goal #2: Time for family &#8211; Check and check.  Work hasn&#8217;t gotten in the way too much so that&#8217;s all good there.</p>
<p>Goal #3: Ship Code.  Have a small idea that I&#8217;m working on.  Need to find the time. Hopefully this summer.</p>
<p>Goal #4: 5×5.  One down, 3 more on my radar.  Need one in the fallish timeframe which I think I have 1 or 2 that I&#8217;m looking at.  I&#8217;ve been putting the miles on as I have logged over 70+ miles so far this year.</p>
<p>Goal #5: Top Secret.  Still top secret.</p>
<p>&nbsp;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/lbCsmh1dcIkL4GxT5bfk8QknT5s/0/da"><img src="http://feedads.g.doubleclick.net/~a/lbCsmh1dcIkL4GxT5bfk8QknT5s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lbCsmh1dcIkL4GxT5bfk8QknT5s/1/da"><img src="http://feedads.g.doubleclick.net/~a/lbCsmh1dcIkL4GxT5bfk8QknT5s/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/CHKnfdD76ZI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/04/keeping-myself-honest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/04/keeping-myself-honest/</feedburner:origLink></item>
		<item>
		<title>We Stopped Dreaming…</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/0sS3-qDDovA/</link>
		<comments>http://usrlocal.com/2012/03/we-stopped-dreaming/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 17:50:36 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Cool Videos]]></category>
		<category><![CDATA[NASA]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1721</guid>
		<description />
			<content:encoded><![CDATA[<p><object width="450" height="370"><param name="movie" value="http://www.liveleak.com/e/da3_1331394029"></param><param name="wmode" value="transparent"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.liveleak.com/e/da3_1331394029" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" width="450" height="370"></embed></object></p>

<p><a href="http://feedads.g.doubleclick.net/~a/cR5dvFgw-azMXlt96Dy_NvBbPgQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/cR5dvFgw-azMXlt96Dy_NvBbPgQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cR5dvFgw-azMXlt96Dy_NvBbPgQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/cR5dvFgw-azMXlt96Dy_NvBbPgQ/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/0sS3-qDDovA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/03/we-stopped-dreaming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/03/we-stopped-dreaming/</feedburner:origLink></item>
		<item>
		<title>App Boom</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/MhKuPAygTNA/</link>
		<comments>http://usrlocal.com/2012/03/app-boom/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 02:45:29 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[In the news]]></category>
		<category><![CDATA[iPhone App Reviews]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[WTF]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1720</guid>
		<description><![CDATA[We&#8217;re doomed to repeat history. Wait&#8230;what? Isn&#8217;t that the point of history to study it so we DON&#8217;T make the same boneheaded mistakes. Yes, that&#8217;s exactly why you read history books. Yet, we are in another round of the IT glory days. Read TechCrunch for 5 minutes and you&#8217;ll just be shaking your head. What [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re doomed to repeat history.  Wait&#8230;what?  Isn&#8217;t that the point of history to study it so we DON&#8217;T make the same boneheaded mistakes.  Yes, that&#8217;s exactly why you read history books.</p>
<p>Yet, we are in another round of the IT glory days.  Read TechCrunch for 5 minutes and you&#8217;ll just be shaking your head.  What was the .com boom of the late 90s has become the new app explosion of today.   Money is flying at companies that have a cool new app with a bunch of users but NO REVENUE!!!</p>
<p>The latest example is an app that I really like.  Its being reported that <a href="http://j.mp/z3Bmt0" target="_blank">Instagram</a> is raising <a href="http://techcrunch.com/2012/03/08/no-filter-required-instagram-reportedly-raising-40m-at-500m-valuation/" target="_blank">40 million dollars with a 500M company valuation</a>.  While its great that they can keep the lights on and servers running, but how are they going to make money?  Maybe giving away the app wasn&#8217;t your best plan.  I would have paid $0.99 for the full version with maybe a free version with only a few filters.  <a href="http://www.cnn.com/2012/03/11/tech/mobile/instagram-sxsw/index.html?hpt=hp_t2">27 millions users</a> you say, It would have been rough having 18.9 million (27M * 70% after Apple&#8217;s cut) coming in the door if you charged for the app.  </p>
<p>I&#8217;ve <a href="http://usrlocal.com/2010/08/flipboard/" target="_blank">bitched</a> <a href="http://usrlocal.com/2011/10/flipboard-revisited/" target="_blank">before</a> about FlipBoard doing some of the <a href="http://usrlocal.com/2011/03/more-vc-money-for-flipboard/" target="_blank">same shit</a>.</p>
<p>Ladies and Gentlemen&#8230;if you want to run a successful company, you need to have money coming in the door.  And I&#8217;m not talking about VC money.  It may help you out in the short term, but guess what, those VC guys and gals expect to get paid at some point.  Stop bullshitting us with the &#8220;oh we&#8217;ll figure out a way to make money in the future, we have X million users now&#8221;.  If you haven&#8217;t figured it out by now, you&#8217;re not going to asshole.  And the VC that invest in you deserve every bit of loss that they get.  Just don&#8217;t got public with it, screw up my 401K, and the rest of the stock market in the process. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/z2qDqcPEtsbWS90tIyfZIJMPsfA/0/da"><img src="http://feedads.g.doubleclick.net/~a/z2qDqcPEtsbWS90tIyfZIJMPsfA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/z2qDqcPEtsbWS90tIyfZIJMPsfA/1/da"><img src="http://feedads.g.doubleclick.net/~a/z2qDqcPEtsbWS90tIyfZIJMPsfA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/MhKuPAygTNA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/03/app-boom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/03/app-boom/</feedburner:origLink></item>
		<item>
		<title>Powershell Error checking</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/ED9nfr6Rjlc/</link>
		<comments>http://usrlocal.com/2012/03/powershell-error-checking/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 15:36:38 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[DevDog]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1666</guid>
		<description><![CDATA[Being a programmer by trade, I get thrown into many projects that aren&#8217;t always my forte, but I can figure them out and get them working the way that I want. I&#8217;ve been messing with powershell for a while now with VMware, but never really getting into big time scripting with it. Its mainly be [...]]]></description>
			<content:encoded><![CDATA[<p>Being a programmer by trade, I get thrown into many projects that aren&#8217;t always my forte, but I can figure them out and get them working the way that I want.  </p>
<p>I&#8217;ve been messing with powershell for a while now with VMware, but never really getting into big time scripting with it.  Its mainly be something to use to accomplish some various tasks on mutliple hosts.  Very little error checking in the scripts since I&#8217;m watching them was they run.  If I want to put them into a scheduled task or automate them from a web page, more error checking is needed.</p>
<p>Recently, we starting messing around with automation of Exchange 2010 provisioning using Powershell.  There are some great cmdlets to accomplish this, but I ran into a particular issue that really bothered me as a programmer and since I spent more than 5 minutes unsuccessfully googling the answer, I figured I&#8217;d write this post.</p>
<p>My issue was this, I was attempting to put some wrappers around certain cmdlets to get back whether or not they completed successfully.  I hate to be the bearer of bad news, but shit doesn&#8217;t always run as you think it would.<br />
I think I found a good way of handling the powershell scripts that do not return a true or false and were causing some false positives.</p>
<p>The issue occurred in the functions such as remove-mailcontact where I would have something along the lines of:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">if(remove-mailcontact -identity $ID -Confirm:$false)<br />
{<br />
&nbsp; &nbsp; &quot;+OK Contact Removed&quot;<br />
}<br />
else<br />
{<br />
&nbsp; &nbsp; &quot;-ERR Unable to remove contact.&quot;<br />
}</div></div>
<p>This would alway return the -ERR statement.</p>
<p>So now I have expanded upon that and have the following:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Remove-Mailcontact -Identity $ID -Confirm:$false -DomainController $DC -ErrorVariable:err<br />
if($err)<br />
{<br />
&nbsp; &nbsp; &quot;-ERR Unable to remove contact&quot;<br />
}<br />
else<br />
{<br />
&nbsp; &nbsp; &quot;+OK Contact Removed&quot;<br />
}</div></div>
<p>This second method seems to be doing what I want and goes to the appropriate domain controller so I think I&#8217;m on the right track…we just need to update the various scripts now.  For a little more information on the errorVariable adn other default switches you can pass a cmdlet, check out <a href="http://blogs.msdn.com/b/powershell/archive/2006/11/03/erroraction-and-errorvariable.aspx">this blog post</a> from the <a href="http://blogs.msdn.com/b/powershell/">Microsoft PowerShell Blog</a>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/p0Wuq-Re1EnLctCRG08HzCr3tuA/0/da"><img src="http://feedads.g.doubleclick.net/~a/p0Wuq-Re1EnLctCRG08HzCr3tuA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/p0Wuq-Re1EnLctCRG08HzCr3tuA/1/da"><img src="http://feedads.g.doubleclick.net/~a/p0Wuq-Re1EnLctCRG08HzCr3tuA/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/ED9nfr6Rjlc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/03/powershell-error-checking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/03/powershell-error-checking/</feedburner:origLink></item>
		<item>
		<title>TEDxAustin Robyn O’Brien 2011</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/mMlBhmVPnmw/</link>
		<comments>http://usrlocal.com/2012/02/tedxaustin-robyn-obrien-2011/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 13:00:27 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Cool Videos]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1711</guid>
		<description><![CDATA[Another video about our food supply. Its about choices, awareness, and helping spread the word.]]></description>
			<content:encoded><![CDATA[<p>Another video about our food supply.  Its about choices, awareness, and helping spread the word. </p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/rixyrCNVVGA" frameborder="0" allowfullscreen></iframe></p>

<p><a href="http://feedads.g.doubleclick.net/~a/P6J3pSMKls7MO_V1_aGsLhr9V8g/0/da"><img src="http://feedads.g.doubleclick.net/~a/P6J3pSMKls7MO_V1_aGsLhr9V8g/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/P6J3pSMKls7MO_V1_aGsLhr9V8g/1/da"><img src="http://feedads.g.doubleclick.net/~a/P6J3pSMKls7MO_V1_aGsLhr9V8g/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/mMlBhmVPnmw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/02/tedxaustin-robyn-obrien-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/02/tedxaustin-robyn-obrien-2011/</feedburner:origLink></item>
		<item>
		<title>Red Flannel Run 2012</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/nwx5VJWi9s8/</link>
		<comments>http://usrlocal.com/2012/02/red-flannel-run-2012/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 04:37:04 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[In the news]]></category>
		<category><![CDATA[Goals]]></category>
		<category><![CDATA[Running]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1701</guid>
		<description><![CDATA[Today marked the official start to the race season for me. I&#8217;m not competitive in these things by any means but calling it a race season makes it seem like I know what I&#8217;m doing. Signup, run, don&#8217;t die. Pretty much in that order. In the end, its all about knocking out one of my [...]]]></description>
			<content:encoded><![CDATA[<p>Today marked the official start to the race season for me.  I&#8217;m not competitive in these things by any means but calling it a race season makes it seem like I know what I&#8217;m doing.  Signup, run, don&#8217;t die.  Pretty much in that order.  In the end, its all about knocking out one of my <a href="http://usrlocal.com/2012/01/2012-goals/" target="_blank">goals for 2012</a>.  </p>
<p>There were a lot of things different about the Red Flannel Run in 2012 compared to <a href="http://usrlocal.com/2011/02/red-flannel-run/" target="_blank">last year</a>.  First and foremost, the temps.    Last year we were in the mid-30s and I was warm as could be in my gear.   This year, I wore pretty much the same thing except the temps were 7 degrees with a -6 windchill.  It was cold out there.  But with the gear I had on and the running, I warmed up pretty quickly.  I just wish I would have had some sort of neck gator on.  That would have made a pretty big difference for me.  I kept having some breathing issues after the first 1.5 miles and I&#8217;m pretty sure it was due to things (mouth, lungs etc) freezing up a bit.  </p>
<p>Second big difference, I ran a heck of a lot faster than in 2011.  Too fast for the first mile but over all, I shaved off 4+ minutes from the previous year and beat my fastest time from 2011.</p>
<p>The <a href="http://www.fitnesssports.com/Feb.races/red_flannel/12/Results.htm" target="_blank">official stats</a> come in as this:<br />
Time: 23:51<br />
Age Group rank: 12<br />
Overall: 70</p>
<p>Not bad for the first time out.  I&#8217;m hoping for some stronger finishes later in the year when I can get some better training in.   Running on the dreadmill is boring and I never want to go more than 2 miles.  I&#8217;m hoping that once we get over the snow, ice and cold temps I can put some longer runs in and build up the endurance for a faster time.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/eOElWSrFAhLc-DnIDlI1xXXixK4/0/da"><img src="http://feedads.g.doubleclick.net/~a/eOElWSrFAhLc-DnIDlI1xXXixK4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/eOElWSrFAhLc-DnIDlI1xXXixK4/1/da"><img src="http://feedads.g.doubleclick.net/~a/eOElWSrFAhLc-DnIDlI1xXXixK4/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/nwx5VJWi9s8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/02/red-flannel-run-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/02/red-flannel-run-2012/</feedburner:origLink></item>
		<item>
		<title>LightEdge Data Center Tour</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/Z70TV5xLLSg/</link>
		<comments>http://usrlocal.com/2012/02/lightedge-data-center-tour/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 19:36:56 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Cool Videos]]></category>
		<category><![CDATA[LightEdge]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1697</guid>
		<description><![CDATA[Check out the nice data center we have.]]></description>
			<content:encoded><![CDATA[<p>Check out the nice data center we have.</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/rQXp5Xjh4dk" frameborder="0" allowfullscreen></iframe></p>

<p><a href="http://feedads.g.doubleclick.net/~a/7CgiD7zdUWEXWz5UUL6zN9SDaqQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/7CgiD7zdUWEXWz5UUL6zN9SDaqQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/7CgiD7zdUWEXWz5UUL6zN9SDaqQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/7CgiD7zdUWEXWz5UUL6zN9SDaqQ/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/Z70TV5xLLSg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/02/lightedge-data-center-tour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/02/lightedge-data-center-tour/</feedburner:origLink></item>
		<item>
		<title>Puppet Presentation</title>
		<link>http://feedproxy.google.com/~r/MattPatterson/~3/9dZwGkr8DTE/</link>
		<comments>http://usrlocal.com/2012/01/puppet-presentation-2/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 15:56:13 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Puppet]]></category>

		<guid isPermaLink="false">http://usrlocal.com/?p=1692</guid>
		<description><![CDATA[For those looking for the slides from the puppet presentation that I gave last week, here they are. I&#8217;ll be working on getting a screen cast of the demo up in the next week or so. Too many other things distracting me at this moment.]]></description>
			<content:encoded><![CDATA[<p>For those looking for the slides from the puppet presentation that I gave last week, here they are.  <iframe src="https://docs.google.com/presentation/embed?id=1iC-ML8YD-2lT9v7LwHs68FwhnvG-eZaCljJ9aSLTXHU&#038;start=false&#038;loop=false&#038;delayms=5000" frameborder="0" width="480" height="389" allowfullscreen="true" webkitallowfullscreen="true"></iframe></p>
<p>I&#8217;ll be working on getting a screen cast of the demo up in the next week or so.  Too many other things distracting me at this moment.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/dB9I11Vsehv8FMSyOCXfiBRvcUo/0/da"><img src="http://feedads.g.doubleclick.net/~a/dB9I11Vsehv8FMSyOCXfiBRvcUo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/dB9I11Vsehv8FMSyOCXfiBRvcUo/1/da"><img src="http://feedads.g.doubleclick.net/~a/dB9I11Vsehv8FMSyOCXfiBRvcUo/1/di" border="0" ismap="true"></img></a></p><img src="http://feeds.feedburner.com/~r/MattPatterson/~4/9dZwGkr8DTE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://usrlocal.com/2012/01/puppet-presentation-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://usrlocal.com/2012/01/puppet-presentation-2/</feedburner:origLink></item>
	</channel>
</rss>

