<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Noob Nuggets</title>
	<atom:link href="http://mcdrummerman.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mcdrummerman.wordpress.com</link>
	<description>some helpful info I found to be..uh....helpful</description>
	<lastBuildDate>Fri, 19 Jun 2009 14:50:39 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='mcdrummerman.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/7abc05d7932b3bdaca07df5d5acfc540?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Noob Nuggets</title>
		<link>http://mcdrummerman.wordpress.com</link>
	</image>
			<item>
		<title>Page Up/Page Down doesn&#8217;t work correctly in Firefox</title>
		<link>http://mcdrummerman.wordpress.com/2009/02/27/page-uppage-down-doesnt-work-correctly-in-firefox/</link>
		<comments>http://mcdrummerman.wordpress.com/2009/02/27/page-uppage-down-doesnt-work-correctly-in-firefox/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 22:56:11 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=135</guid>
		<description><![CDATA[OK so I think this one is entirely my fault but it was still driving me nuts.  Whenever I tried to use the Page Up or Page Down key while viewing a web page in Firefox it would move the page down then almost immediately shoot back to where I was viewing before.
In addition to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=135&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>OK so I think this one is entirely my fault but it was still driving me nuts.  Whenever I tried to use the Page Up or Page Down key while viewing a web page in Firefox it would move the page down then almost immediately shoot back to where I was viewing before.</p>
<p>In addition to this using the arrow keys to move up and down was also a iffy prospect.  One day when I was low on sleep and using my computer this happened.  I had simply been ignoring it for so long.  I finally typed this sentence into Google search:</p>
<blockquote><p>firefox page up page down fuck</p></blockquote>
<p><span id="more-135"></span></p>
<p>And obviously I wasn&#8217;t the only one who was incredibly irritated by this because one of the first forum posts I read had my answer.</p>
<p><strong>Go to Tools&#8211;&gt;Options&#8211;&gt;Advanced&#8211;&gt;General.  Turn off the option to &#8220;Always use cursor keys to navigate within pages&#8221;.  Also try turning off the &#8220;Search for text when I start typing&#8221; option.</strong></p>
<p>After this your Page up/Down buttons should function like normal.  You can toggle between this caret browsing mode by simply hitting the F7 key.  And alternatively in Firefox you can page down with the Space bar and page up with Shift+Space bar.</p>
<p>I&#8217;m not sure if I was the one who enabled this function or it comes that way by default but whoever thought it was a good idea should be flogged.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=135&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2009/02/27/page-uppage-down-doesnt-work-correctly-in-firefox/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>
	</item>
		<item>
		<title>Active Directory Users and Computers Error: &#8220;the application has requested the runtime to terminate it in an unusual way&#8221;</title>
		<link>http://mcdrummerman.wordpress.com/2008/08/27/active-directory-users-and-computers-error-the-application-has-requested-the-runtime-to-terminate-it-in-an-unusual-way/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/08/27/active-directory-users-and-computers-error-the-application-has-requested-the-runtime-to-terminate-it-in-an-unusual-way/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 16:03:39 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Active Directory Users and Computers]]></category>
		<category><![CDATA[RSAT 64bit]]></category>
		<category><![CDATA[the application has requested the runtime to terminate]]></category>
		<category><![CDATA[Vista RSAT]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=105</guid>
		<description><![CDATA[UPDATE [6/19/2009]:  Below is my original fix for this problem however in the comments section frymaster provided an alternative.  I am no longer running Vista 64 so haven&#8217;t tested it but another user has confirmed it worked for him.
Try deleting this file:
%userprofile%\appdata\Roaming\Microsoft\MMC\dsa
It will be recreated after you shut down your MMC console.
Thanks to frymaster for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=105&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:left;"><strong>UPDATE [6/19/2009]:  Below is my original fix for this problem however in the comments section frymaster provided an alternative.  I am no longer running Vista 64 so haven&#8217;t tested it but another user has confirmed it worked for him.</strong></p>
<p style="text-align:left;"><strong>Try deleting this file:</strong></p>
<p style="text-align:left;"><strong>%userprofile%\appdata\Roaming\Microsoft\MMC\dsa</strong></p>
<p style="text-align:left;"><strong>It will be recreated after you shut down your MMC console.</strong></p>
<p style="text-align:left;"><strong>Thanks to frymaster for the update!</strong></p>
<hr /><strong>[Original Post]</strong></p>
<p style="text-align:left;">
<p style="text-align:left;">
<p style="text-align:left;">I installed the newest version of <a title="RSAT for Vista sp1" href="http://windowsvistablog.com/blogs/windowsvista/archive/2008/03/25/remote-server-administration-tools-rsat-now-available-for-windows-vista-sp1.aspx" target="_blank">RSAT</a> for Vista Service Pack 1.  I am running the 64-bit Version of Vista.</p>
<p style="text-align:left;">After installing this newest version I got this error when trying to start Active Directory Users and Computers:</p>
<blockquote>
<p style="text-align:left;">Microsoft Visual C++ Runtime Library<br />
&#8220;the application has requested the runtime to terminate it in an unusual way&#8221;</p>
<p style="text-align:center;"><a href="http://mcdrummerman.files.wordpress.com/2008/08/activedirectoryerror.jpg"><img class="size-full wp-image-107 aligncenter" src="http://mcdrummerman.files.wordpress.com/2008/08/activedirectoryerror.jpg?w=424&#038;h=201" alt="" width="424" height="201" /><span id="more-105"></span></a></p>
</blockquote>
<p style="text-align:left;">I could not find an answer anywhere, I was able to open up the Management Console (mmc.exe) and browse to the .msc file (dsa.msc) manually and it would open just fine.</p>
<p style="text-align:left;">I went looking for command line parameters for mmc.exe and here is what I found:</p>
<blockquote>
<h2 class="heading">MMC command-line options</h2>
<p>Using MMC command-line options, you can open a specific MMC console, open MMC in author mode, or specify that the 32-bit or 64-bit version of MMC is opened.</p>
<h4 class="subHeading">Syntax</h4>
<div class="subSection">
<p><strong>mmc</strong><em>path</em><strong>\</strong><em>filename.msc</em>[<strong>/a</strong>]  [<strong>/64</strong>] [<strong>/32</strong>]</div>
<h4 class="subHeading">Parameters</h4>
<div class="subSection">
<dl>
<dt><strong><em>path </em><strong>\ </strong><em>filename.msc </em></strong></dt>
<dd> Starts MMC and opens a saved console. You need to specify the complete path and file name for the saved console file. If you do not specify a console file, MMC opens a new console.</dd>
</dl>
<dl>
<dt><strong><strong>/a </strong></strong></dt>
<dd> Opens a saved console in author mode.  Used to make changes to saved consoles.</dd>
</dl>
<dl>
<dt><strong><strong>/64</strong></strong></dt>
<dd> Opens the 64-bit version of MMC (MMC64). Use this option only if you are running a Microsoft 64-bit operating system and want to use a 64-bit snap-in.</dd>
</dl>
<dl>
<dt><strong><strong>/32</strong></strong></dt>
<dd> Opens the 32-bit version of MMC (MMC32). When running a Microsoft 64-bit operating system, you can run 32-bit snap-ins by opening MMC with this command-line option when you have 32-bit only snap-ins.</dd>
</dl>
</div>
<ul>
<li> Source: <a href="http://technet.microsoft.com/en-us/library/cc757725.aspx" target="_blank">http://technet.microsoft.com/en-us/library/cc757725.aspx</a></li>
</ul>
</blockquote>
<p>The short cut for Active Directory Users and Computers points to:</p>
<blockquote><p>%SystemRoot%\system32\dsa.msc</p>
<p><a href="http://mcdrummerman.files.wordpress.com/2008/08/shortcut1.jpg"><img class="aligncenter size-full wp-image-109" src="http://mcdrummerman.files.wordpress.com/2008/08/shortcut1.jpg?w=370&#038;h=199" alt="" width="370" height="199" /></a></p></blockquote>
<p>Adding the &#8220;/64&#8243; flag to the Target of the shortcut fixed the problem</p>
<blockquote><p>%SystemRoot%\system32\dsa.msc /64</p>
<p><a href="http://mcdrummerman.files.wordpress.com/2008/08/shortcut2.jpg"><img class="aligncenter size-full wp-image-113" src="http://mcdrummerman.files.wordpress.com/2008/08/shortcut2.jpg?w=370&#038;h=201" alt="" width="370" height="201" /></a></p></blockquote>
<p>After that, no more errors!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/105/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/105/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/105/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/105/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/105/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=105&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/08/27/active-directory-users-and-computers-error-the-application-has-requested-the-runtime-to-terminate-it-in-an-unusual-way/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/08/activedirectoryerror.jpg" medium="image" />

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/08/shortcut1.jpg" medium="image" />

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/08/shortcut2.jpg" medium="image" />
	</item>
		<item>
		<title>Get Members of an Active Directory Group Using Powershell</title>
		<link>http://mcdrummerman.wordpress.com/2008/08/11/get-members-of-an-active-directory-group-using-powershell/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/08/11/get-members-of-an-active-directory-group-using-powershell/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 16:01:21 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=95</guid>
		<description><![CDATA[I use this one quite a lot because people always want to know who all is in an Active Directory Group.  Here is my quick and ugly Powershell script to find this info.

$ldap = &#8220;your ldap path here&#8220;
$de = new-object directoryservices.directoryentry(&#8220;LDAP://&#8221; + $ldap)
$ds = new-object directoryservices.directorysearcher($de)
$ds.filter = &#8216;(&#38;(samaccountname=*))&#8217;
$rc = $ds.findall()
$rc[0].properties(&#8216;member&#8217;)
      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=95&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://mcdrummerman.files.wordpress.com/2008/08/untitled.jpg"><img class="alignright size-medium wp-image-98" src="http://mcdrummerman.files.wordpress.com/2008/08/untitled.jpg?w=300&#038;h=115" alt="" width="300" height="115" /></a>I use this one quite a lot because people always want to know who all is in an Active Directory Group.  Here is my quick and ugly Powershell script to find this info.</p>
<p><span id="more-95"></span></p>
<blockquote><p>$ldap = &#8220;<span style="color:#ff9900;">your ldap path here</span>&#8220;<br />
$de = new-object directoryservices.directoryentry(&#8220;LDAP://&#8221; + $ldap)<br />
$ds = new-object directoryservices.directorysearcher($de)<br />
$ds.filter = &#8216;(&amp;(samaccountname=*))&#8217;<br />
$rc = $ds.findall()<br />
$rc[0].properties(&#8216;member&#8217;)</p></blockquote>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/95/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/95/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/95/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/95/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/95/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=95&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/08/11/get-members-of-an-active-directory-group-using-powershell/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/08/untitled.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>HP Director Won&#8217;t Start</title>
		<link>http://mcdrummerman.wordpress.com/2008/08/11/hp-director-wont-start/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/08/11/hp-director-wont-start/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 14:57:48 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Hardware]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=92</guid>
		<description><![CDATA[I got a call at the Helpdesk today about a scanner in one of the faculty&#8217;s labs.  It was an HP 4570 Scanjet.  The scanner worked fine it was the software that came with it that was a problem.
They wanted to use the HP Director software, which is fine it just wouldn&#8217;t start when you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=92&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I got a call at the Helpdesk today about a scanner in one of the faculty&#8217;s labs.  It was an HP 4570 Scanjet.  The scanner worked fine it was the software that came with it that was a problem.</p>
<p><span id="more-92"></span>They wanted to use the HP Director software, which is fine it just wouldn&#8217;t start when you clicked on the program icon.  I was pretty stumped until I thought &#8220;Why not look at HP&#8217;s site?&#8221;  So I did.</p>
<p>And there it was a patch to fix this very problem (<a title="http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=oj-46104-1&amp;lc=en&amp;cc=us&amp;lang=en&amp;os=228&amp;product=77368&amp;dlc=en" href="http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?softwareitem=oj-46104-1&amp;lc=en&amp;cc=us&amp;lang=en&amp;os=228&amp;product=77368&amp;dlc=en" target="_blank">link</a>)</p>
<p>It turns out that IE 7 causes a problem.  Why??!?!  I have no idea but the patch fixed it.</p>
<p>Every once in a while I have to remind my self that the soultion is probably easier than I think AND someone else has already fixed it.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/92/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/92/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=92&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/08/11/hp-director-wont-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>
	</item>
		<item>
		<title>Get an Active Directory Property from Powershell</title>
		<link>http://mcdrummerman.wordpress.com/2008/06/27/get-an-active-directory-property-from-powershell/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/06/27/get-an-active-directory-property-from-powershell/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 22:33:26 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Script]]></category>
		<category><![CDATA[Active Directory from Powershell]]></category>
		<category><![CDATA[Powershell script]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=76</guid>
		<description><![CDATA[In an earlier post I mentioned a useful link for Powershell users.  I am happy to say I used the cheat sheet today.
Sometimes you want to grab a property from an Active Directory entry.  I wanted to be able to do it from Powershell.
One of the cool things about PowerShell is that you can access [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=76&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://mcdrummerman.files.wordpress.com/2008/06/psscript.jpg"><img class="alignleft size-medium wp-image-77" src="http://mcdrummerman.files.wordpress.com/2008/06/psscript.jpg?w=300&#038;h=195" alt="" width="300" height="195" /></a>In an <a title="Powershell cheat sheet" href="http://mcdrummerman.wordpress.com/2008/06/27/powershell-cheat-sheet/" target="_blank">earlier post</a> I mentioned a useful link for Powershell users.  I am happy to say I used the cheat sheet today.</p>
<p>Sometimes you want to grab a property from an Active Directory entry.  I wanted to be able to do it from Powershell.</p>
<p>One of the cool things about PowerShell is that you can access the Namespaces in the .net framework.  So you can put together a script that can access Active Directory the same way you do it from .net Code using Directory Services.</p>
<p>Here is what I came up with:<span id="more-76"></span></p>
<blockquote><p>Write-Host <span style="color:#999999;">&#8220;&#8221;</span><br />
$id = Read-Host <span style="color:#999999;">&#8220;Which username?&#8221;</span><br />
$prop = Read-Host <span style="color:#999999;">&#8220;Which Property(Leave blank for all or type &#8216;list&#8217; for property names)?&#8221;</span></p>
<p>$de = <span style="color:#0000ff;">new</span>-object directoryservices.directoryentry(&#8220;LDAP://<span style="color:#ff9900;">your_LDAP_path</span>&#8220;)<br />
$ds = <span style="color:#0000ff;">new</span>-object directoryservices.directorysearcher($de)<br />
$ds.filter = &#8216;(&amp;(samaccountname=&#8217; + $id + &#8216;))&#8217;<br />
$results = $ds.findall()</p>
<p><span style="color:#0000ff;">if</span> ($prop -eq <span style="color:#999999;">&#8220;&#8221;</span>)<br />
{<br />
Write-Host <span style="color:#999999;">&#8220;&#8221;</span><br />
$results.item(0).properties | more<br />
}<br />
<span style="color:#0000ff;">elseif</span> ($prop -eq <span style="color:#999999;">&#8220;list&#8221;</span>)<br />
{<br />
Write-Host <span style="color:#999999;">&#8220;&#8221;</span><br />
$results.item(0).properties.propertynames | more<br />
}<br />
<span style="color:#0000ff;">else</span><br />
{<br />
Write-Host <span style="color:#999999;">&#8220;&#8221;</span><br />
$results.item(0).properties.item($prop)<br />
}<br />
Write-Host <span style="color:#999999;">&#8220;&#8221;</span><br />
Write-Host <span style="color:#999999;">&#8220;&#8221;</span></p></blockquote>
<p>So you just save this script as your_filename.ps1 and run it.</p>
<p>The LDAP filter is set to filter by the &#8220;samaccountname&#8221; which is usually the user name/id of the user.  If you wanted to filter by something else you could do so by changing the filter string.</p>
<p>After you run it you will be prompted for the variables and presto!  Some kick-assery ensues.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/76/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/76/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=76&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/06/27/get-an-active-directory-property-from-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/06/psscript.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>Powershell Cheat Sheet</title>
		<link>http://mcdrummerman.wordpress.com/2008/06/27/powershell-cheat-sheet/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/06/27/powershell-cheat-sheet/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 21:22:05 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=63</guid>
		<description><![CDATA[Ever use Powershell?  I run into situations every once in a while where it is really useful but I always seem to forget the syntax.  I found a link to a really cool cheat sheet that I just tacked onto my wall so I won&#8217;t ever be lost again.
Check it here: http://blogs.msdn.com/powershell/attachment/1521595.ashx
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=63&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ever use Powershell?  I run into situations every once in a while where it is really useful but I always seem to <a href="http://mcdrummerman.files.wordpress.com/2008/06/ps1.jpg"><img class="size-medium wp-image-65 alignright" src="http://mcdrummerman.files.wordpress.com/2008/06/ps1.jpg?w=300&#038;h=197" alt="" width="300" height="197" /></a>forget the syntax.  I found a link to a really cool cheat sheet that I just tacked onto my wall so I won&#8217;t ever be lost again.</p>
<p>Check it here: <a title="PS Cheat Sheet" href="http://blogs.msdn.com/powershell/attachment/1521595.ashx" target="_blank">http://blogs.msdn.com/powershell/attachment/1521595.ashx</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/63/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/63/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=63&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/06/27/powershell-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/06/ps1.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>My First C++ Program, the generic Hello World!</title>
		<link>http://mcdrummerman.wordpress.com/2008/06/27/my-first-c-program-the-generic-hello-world/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/06/27/my-first-c-program-the-generic-hello-world/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 07:48:41 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[C++ HelloWorld]]></category>
		<category><![CDATA[Hello World]]></category>
		<category><![CDATA[Linux C++ compile]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=51</guid>
		<description><![CDATA[I have a base of knowledge in Java and VB ,net but coming up in my school career is a class called &#8220;Problem Solving in C++&#8221; So where do you start learning a new language? The Hello World! program

This summer while I waste some time at work my plan is to get prepared for this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=51&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I have a base of knowledge in Java and VB ,net but coming up in my school career is a class called &#8220;Problem Solving in C++&#8221; So where do you start learning a new language? The <a title="Wiki Entry" href="http://en.wikipedia.org/wiki/Hello_world" target="_blank">Hello World!</a> program</p>
<p><span id="more-51"></span></p>
<p>This summer while I waste some time at work my plan is to get prepared for this course by grabbing a <a title="Books are  your friend" href="http://mcdrummerman.wordpress.com/2008/06/17/books-are-your-friend/#more-26" target="_blank">book</a> and learning about the C++ language.</p>
<p>I chose a book called &#8220;<span style="text-decoration:underline;">C++ From the Ground Up</span>&#8221; by Herbert Schildt.  So far it is well written and seems like an excellent choice.</p>
<p>This is probably the same example you are going to find if you do a search for a C++ Hello World!  It&#8217;s nothing special but it always fun when you start learning something new.</p>
<p>So here it is, enjoy!</p>
<blockquote><p><span style="color:#0000ff;">/* Hello World in C++*/<br />
</span></p>
<p><span style="color:#cc99ff;">#include</span> <span style="color:#ff69b4;">&lt;iostream&gt;</span><br />
using namespace std;<br />
<span style="color:#0000ff;">//this is so you don&#8217;t have to qualify<br />
//each thing like std::cout, you can just use cout</span><br />
<span style="color:#339966;"><br />
int</span> main()</p>
<p><span style="color:#0000ff;">// main() is where program execution begins</span><br />
{<br />
cout &lt;&lt; &#8220;\n<span style="color:#ff69b4;">Hello World!!</span>\n\n&#8221;;     <span style="color:#0000ff;">//write the string to the buffer</span><br />
cout &lt;&lt; endl;            <span style="color:#0000ff;">//clears the buffer</span><br />
<span style="color:#993300;">return</span> <span style="color:#ff69b4;">0</span>;           <span style="color:#0000ff;"> //return success 0</span><br />
}</p></blockquote>
<p>That&#8217;s it! Exciting stuff I know.  I saved it as <strong>HelloWorld.cpp</strong>. As far as compiling it I am using Ubuntu Linux at home so I used the g++ compiler you can install the compiler using this command in the terminal:</p>
<blockquote><p>sudo apt-get install g++</p></blockquote>
<p>Then to compile you can use this command (make sure you are in the directory where your code file is located:</p>
<blockquote><p>g++ <span style="color:#ff0000;">filename</span> -o <span style="color:#ff0000;">what_you_want_executable_to_be_called</span></p>
<p>so in my case</p>
<p>g++ HelloWorld.cpp -o -hello</p></blockquote>
<p>Then to run this bad boy you just type:</p>
<blockquote><p>./<span style="color:#ff0000;">name_of_executable</span></p>
<p>in my case</p>
<p>./hello</p></blockquote>
<p>Obviously this is just a incredibly small peek into the very basics of C++.  There are different compilers for different systems and even different versions of C++.  Hopefully this was helpful to another noob like myself.  Leave a comment if it was.</p>
<p>Further Reading:</p>
<ul>
<li><a href="http://en.wikibooks.org/wiki/C%2B%2B_Programming/TOC2" target="_blank">WikiBook on C++</a></li>
<li><a href="http://www.amazon.com/Ground-Up-Third-Herbert-Schildt/dp/0072228970/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1214552721&amp;sr=8-1" target="_blank">C++ From the Ground Up</a> (Amazon Link)</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/51/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/51/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=51&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/06/27/my-first-c-program-the-generic-hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft Outlook Auto Complete: location, backup</title>
		<link>http://mcdrummerman.wordpress.com/2008/06/22/microsoft-outlook-auto-complete-location-backup/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/06/22/microsoft-outlook-auto-complete-location-backup/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 05:35:34 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Office 2007]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Auto Complete]]></category>
		<category><![CDATA[Outlook 2007]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=33</guid>
		<description><![CDATA[Ever typed an email in Microsoft Outlook and went to put in the recipient and you were delighted to see that after you typed a few letters it had already guessed the right person?

Cool, ever reinstalled an OS or Office and went to do the same thing and Outlook did not finish your thoughts for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=33&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ever typed an email in Microsoft Outlook and went to put in the recipient and you were delighted to see that after you typed a few letters it had already guessed the right person?</p>
<p><a href="http://mcdrummerman.files.wordpress.com/2008/06/autocomplete.jpg"><img class="size-medium wp-image-47 alignright" src="http://mcdrummerman.files.wordpress.com/2008/06/autocomplete.jpg?w=300&#038;h=173" alt="Outlook 2007 Auto Complete" width="300" height="173" /></a></p>
<p>Cool, ever reinstalled an OS or Office and went to do the same thing and Outlook did not finish your thoughts for you?  Crap!  Were you depending on the auto complete?</p>
<p><span id="more-33"></span></p>
<p>First off don&#8217;t do that!</p>
<p>Working in an IT office I have had a few calls from people asking why Outlook isn&#8217;t auto completing their To: field and they have lost the contact.  They were actually using the auto complete function as a contact list!</p>
<p>Things can happen: re-installs, crashes, etc.  So relying on the auto complete is a bad idea <em>but</em> if you would like to back up your auto complete data you are in luck.</p>
<p>The auto complete data is stored in a file with the extension of <strong>nk2 </strong>and can be found in the following locations:</p>
<p style="padding-left:30px;"><strong>Windows Vista</strong>:<strong><span style="color:#ff0000;"><em></em></span></strong></p>
<p style="padding-left:30px;"><strong><span style="color:#ff0000;"><em>drive</em></span></strong>:\Users\<em><span style="color:#ff0000;"><strong>your_username</strong></span></em>\AppData\Roaming\Microsoft\Outlook<em><strong></strong></em></p>
<p style="padding-left:30px;"><strong>Windows XP</strong><strong>:</strong></p>
<p style="padding-left:30px;"><em><strong><span style="color:#ff0000;">drive</span></strong>:</em>\Documents and Settings\<em><span style="color:#ff0000;"><strong>your_username</strong></span></em>\Application Data\Microsoft\Outlook<strong></strong></p>
<p>Your .nk2 file will be named the same as your Outlook profile.  By default it will probably be called outlook.nk2</p>
<p>Copy this file and save it into a safe location for use later.  I suggest an external drive.</p>
<p>Now if you ever need to transfer this file to another install of Outlook you know where to look.  Just copy and paste it into the directories listed above.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/33/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/33/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=33&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/06/22/microsoft-outlook-auto-complete-location-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/06/autocomplete.jpg?w=300" medium="image">
			<media:title type="html">Outlook 2007 Auto Complete</media:title>
		</media:content>
	</item>
		<item>
		<title>Retrieving the connection string in a .net application</title>
		<link>http://mcdrummerman.wordpress.com/2008/06/18/retrieving-the-connection-string-in-a-net-application/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/06/18/retrieving-the-connection-string-in-a-net-application/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 22:49:32 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[connection strings]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=29</guid>
		<description><![CDATA[In a website created using ASP .net there is a file called web.config . This file holds information about the website&#8217;s configuration.

From web.config&#8217;s Wikipedia entry:
Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application. The web.config file contains [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=29&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In a website created using ASP .net there is a file called web.config . This file holds information about the website&#8217;s configuration.<a href="http://mcdrummerman.files.wordpress.com/2008/06/webconfig.png"><img class="alignright size-medium wp-image-49" src="http://mcdrummerman.files.wordpress.com/2008/06/webconfig.png?w=300&#038;h=184" alt="" width="300" height="184" /></a></p>
<p><span id="more-29"></span></p>
<p>From web.config&#8217;s Wikipedia entry:</p>
<blockquote><p><strong>Web.config</strong> is the main settings and configuration file for an <a title="ASP.NET" href="http://en.wikipedia.org/wiki/ASP.NET">ASP.NET</a> web application. The file is an <a class="mw-redirect" title="XML document" href="http://en.wikipedia.org/wiki/XML_document">XML document</a> that defines configuration information regarding the web application. The web.config file contains information that control module loading, security configuration, <a class="mw-redirect" title="ASP.NET state management" href="http://en.wikipedia.org/wiki/ASP.NET_state_management">session state</a> configuration, and application language and compilation settings.</p></blockquote>
<p>One setting that is useful is the connection string setting.  If you are connected to a database you can store all the connection string variables in the web.config file and reference them from pages within the website.</p>
<p>This is a good thing since there is only one place to edit the connection string.  So if something changes you only have to look once for the string.</p>
<p>But how do you retrieve the string from the config file and use it in a page?</p>
<p>Let&#8217;s say you are creating a connection to an SQL database in the <a href="http://mcdrummerman.wordpress.com/2008/06/18/what-is-a-code-behind-file-in-net/" target="_blank">VB code behind</a>.  Instead of writing out the connection string each time you write some code to connect to the database, try using the <span style="color:#3366ff;">ConfigurationManager.ConnectionStrings()</span> method.</p>
<ul>
<li>SqlConnection = the connection object.  It takes a connection string as it&#8217;s parameter.</li>
</ul>
<p><span style="text-decoration:underline;">Example in VB w/ color enhancements!:</span></p>
<blockquote><p>Using conn As New SqlConnection(<span style="color:#3366ff;">ConfigurationManager.ConnectionStrings</span>(&#8220;<span style="color:#ff0000;">name of connection string from web.config</span>&#8220;).<span style="color:#3366ff;">ConnectionString</span>)</p>
<p style="padding-left:30px;"><span style="color:#339966;">&#8216;in here will be the rest of your code</span></p>
<p>End Using</p></blockquote>
<p>See, now if something changes you can go to one place: the web.config file, instead of having to change code in multiple locations.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=29&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/06/18/retrieving-the-connection-string-in-a-net-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>

		<media:content url="http://mcdrummerman.files.wordpress.com/2008/06/webconfig.png?w=300" medium="image" />
	</item>
		<item>
		<title>What is a Code-Behind file in .net?</title>
		<link>http://mcdrummerman.wordpress.com/2008/06/18/what-is-a-code-behind-file-in-net/</link>
		<comments>http://mcdrummerman.wordpress.com/2008/06/18/what-is-a-code-behind-file-in-net/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 22:31:38 +0000</pubDate>
		<dc:creator>mcdrummerman</dc:creator>
				<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[code-behind]]></category>

		<guid isPermaLink="false">http://mcdrummerman.wordpress.com/?p=30</guid>
		<description><![CDATA[So you are putting together a web page using Microsoft&#8217;s ASP .net. You are looking through forums and examples for help and people keep talking about the code-behind.

What the hell is it?  Well, in classic ASP (i.e older) the programming code was actually written into the same page as the HTML. This would make [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=30&subd=mcdrummerman&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So you are putting together a web page using Microsoft&#8217;s ASP .net. You are looking through forums and examples for help and people keep talking about the code-behind.</p>
<p><span id="more-30"></span></p>
<p>What the hell is it?  Well, in classic ASP (i.e older) the programming code was actually written into the same page as the HTML. This would make the pages unwieldy.  Apparently some developers prefer to have all of their code in the same place but a better method might be to separate the visual presentation from the logical.</p>
<p>Enter code-behind.  So basically if you simplify it; in ASP .net you have a file that is the web file.  This is the file that holds the HTML and such.  After all the server side processes have finished this file is sent to your browser.</p>
<p>The code-behind file sits on the server and is executed there, not on the client side.  This keeps the two separate.  The  code-behind file is where you write your computer code such as VB or C#.  It is kept hidden from the user so you do not have to worry about them seeing your code and possibly the inner workings of your system.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/mcdrummerman.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/mcdrummerman.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/mcdrummerman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/mcdrummerman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/mcdrummerman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/mcdrummerman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/mcdrummerman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/mcdrummerman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/mcdrummerman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/mcdrummerman.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/mcdrummerman.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/mcdrummerman.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=mcdrummerman.wordpress.com&blog=1283990&post=30&subd=mcdrummerman&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://mcdrummerman.wordpress.com/2008/06/18/what-is-a-code-behind-file-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/788ff3ba9e83fbc9e11ba00b0c785a75?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">mcdrummerman</media:title>
		</media:content>
	</item>
	</channel>
</rss>