<?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>Tim Bolton - MCITP - MCTS</title>
	<atom:link href="http://timbolton.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://timbolton.net</link>
	<description>Sharing information about IT and things I have broken, fixed, and seen.</description>
	<lastBuildDate>Wed, 11 Apr 2012 11:10:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='timbolton.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/c8706b94dcf061e3472961004dffacf7?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Tim Bolton - MCITP - MCTS</title>
		<link>http://timbolton.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://timbolton.net/osd.xml" title="Tim Bolton - MCITP - MCTS" />
	<atom:link rel='hub' href='http://timbolton.net/?pushpress=hub'/>
		<item>
		<title>Why Should I Learn PowerShell? Real World Example Saves the Day!</title>
		<link>http://timbolton.net/2012/01/30/why-should-i-learn-powershell-real-world-example-saves-the-day/</link>
		<comments>http://timbolton.net/2012/01/30/why-should-i-learn-powershell-real-world-example-saves-the-day/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 18:00:56 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=395</guid>
		<description><![CDATA[Posted on the Hey Scripting Guy BLOG.  Why Should I Learn PowerShell? Real World Example Saves the Day!  Some real life issues that came up. I was very happy to have been asked to contribute. Click On Link Below Why Should I Learn PowerShell? Real World Example Saves the Day!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=395&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Posted on the Hey Scripting Guy BLOG.  Why Should I Learn PowerShell? Real World Example Saves the Day!  Some real life issues that came up.</p>
<p>I was very happy to have been asked to contribute.</p>
<p>Click On Link Below</p>
<p><a href="http://blogs.technet.com/b/heyscriptingguy/archive/2012/01/28/why-should-i-learn-powershell-real-world-example-saves-the-day.aspx">Why Should I Learn PowerShell? Real World Example Saves the Day!</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/395/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=395&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2012/01/30/why-should-i-learn-powershell-real-world-example-saves-the-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>
	</item>
		<item>
		<title>Enforce Plain Text Outlook 2010</title>
		<link>http://timbolton.net/2012/01/10/enforce-plain-text-outlook-2010/</link>
		<comments>http://timbolton.net/2012/01/10/enforce-plain-text-outlook-2010/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 02:19:01 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Group Policy]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=352</guid>
		<description><![CDATA[There are many companies, both large and small, that would like to require their users to use Plain Text only in their Outlook 2010 Emails.  If you have attempted this you have more than likely set up the appropriate settings available in Group Policy shown below. I even went as far to ensure this setting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=352&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are many companies, both large and small, that would like to require their users to use Plain Text only in their Outlook 2010 Emails.  If you have attempted this you have more than likely set up the appropriate settings available in Group Policy shown below.</p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext011.jpg"><img class="aligncenter size-full wp-image-357" title="PlainText01" src="http://timbolton.files.wordpress.com/2012/01/plaintext011.jpg?w=450&#038;h=297" alt="" width="450" height="297" /></a></p>
<p style="text-align:left;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext02.jpg"><img class="aligncenter size-full wp-image-358" title="PlainText02" src="http://timbolton.files.wordpress.com/2012/01/plaintext02.jpg?w=450&#038;h=409" alt="" width="450" height="409" /></a></p>
<p style="text-align:left;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext03.jpg"><img class="aligncenter size-full wp-image-359" title="PlainText03" src="http://timbolton.files.wordpress.com/2012/01/plaintext03.jpg?w=450&#038;h=272" alt="" width="450" height="272" /></a></p>
<p style="text-align:left;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext04.jpg"><img class="aligncenter size-full wp-image-360" title="PlainText04" src="http://timbolton.files.wordpress.com/2012/01/plaintext04.jpg?w=450&#038;h=406" alt="" width="450" height="406" /></a></p>
<p style="text-align:left;">I even went as far to ensure this setting on the Exchange 2010 Server Side via Powershell.<br />
Where * is the Default Domain.</p>
<pre style="text-align:center;">Set-RemoteDomain -Identity:* -ContentType MimeText
Get-RemoteDomain -Identity:* | fl - will show the settings.</pre>
<pre style="text-align:center;"><a href="http://technet.microsoft.com/en-us/library/aa997857.aspx" target="_blank">http://technet.microsoft.com/en-us/library/aa997857.aspx</a></pre>
<pre style="text-align:center;"></pre>
<p style="text-align:left;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext05.jpg"><img class="aligncenter size-full wp-image-361" title="PlainText05" src="http://timbolton.files.wordpress.com/2012/01/plaintext05.jpg?w=450&#038;h=200" alt="" width="450" height="200" /></a></p>
<p style="text-align:left;">After finding that the users were still able to select Format Text and change their text to both Rich Text and HTML I decided I had to dig deeper.</p>
<p style="text-align:left;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext06.jpg"><img class="aligncenter size-full wp-image-365" title="PlainText06" src="http://timbolton.files.wordpress.com/2012/01/plaintext06.jpg?w=450&#038;h=275" alt="" width="450" height="275" /></a></p>
<p style="text-align:left;">I found that I could manually change this feature while logging in with my account but this only affected my logon experience, not the other users.</p>
<p style="text-align:center;">With the New Message open click  File – Options</p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext07.jpg"><img class="aligncenter size-full wp-image-366" title="PlainText07" src="http://timbolton.files.wordpress.com/2012/01/plaintext07.jpg?w=450" alt=""   /></a></p>
<p style="text-align:center;">Click on Mail – Editor Options</p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext08.jpg"><img class="aligncenter size-full wp-image-367" title="PlainText08" src="http://timbolton.files.wordpress.com/2012/01/plaintext08.jpg?w=450&#038;h=118" alt="" width="450" height="118" /></a></p>
<p>Click on Customize Ribbon – Main Tabs from the drop down – Format Text – Format<br />
Now you can remove Format and those options will no longer appear.</p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext09.jpg"><img class="aligncenter size-full wp-image-368" title="PlainText09" src="http://timbolton.files.wordpress.com/2012/01/plaintext09.jpg?w=450&#038;h=364" alt="" width="450" height="364" /></a></p>
<p style="text-align:center;">Notice that the Rich Text and HTML options are now gone and the default is Plain Text.</p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext10.jpg"><img class="aligncenter size-full wp-image-371" title="PlainText10" src="http://timbolton.files.wordpress.com/2012/01/plaintext10.jpg?w=450&#038;h=148" alt="" width="450" height="148" /></a></p>
<p>The next step was to reverse the settings placing the Format Text option back in place. Then I made a backup of the entire registry called B4.REG. I then made the changes listed above and once the settings were in place, I created another backup of the registry called Aftr.REG.<br />
My plan was to use WINMerge to find where they change had occurred in the registry to help me find the control ID for the item that I wanted to disable via Group Policy shown below.</p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext11.jpg"><img class="aligncenter size-full wp-image-372" title="PlainText11" src="http://timbolton.files.wordpress.com/2012/01/plaintext11.jpg?w=450&#038;h=136" alt="" width="450" height="136" /></a></p>
<p>As you can see all I need is the Command Bar ID and I will be able to block it. There is even a link listed<br />
<a href="http://officeredir.microsoft.com/r/rlidOffice14RibbonControlIDsO14?clid-1033">http://officeredir.microsoft.com/r/rlidOffice14RibbonControlIDsO14?clid-1033</a></p>
<p>Thank You Microsoft!</p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext12.jpg"><img class="aligncenter size-full wp-image-373" title="PlainText12" src="http://timbolton.files.wordpress.com/2012/01/plaintext12.jpg?w=450&#038;h=409" alt="" width="450" height="409" /></a></p>
<p>But as you see this link offers no help whatso ever…  Thanks Microsoft&#8230; sigh</p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext131.jpg"><img class="aligncenter size-full wp-image-375" title="PlainText13" src="http://timbolton.files.wordpress.com/2012/01/plaintext131.jpg?w=450&#038;h=200" alt="" width="450" height="200" /></a></p>
<p>Working with the two REG files B4.REG and Aftr.REG showed me nothing of any use. I was not able to find a change in the registry that would show me the needed Command Bar ID’s. I also used Process Explorer and Process Monitor, but again nothing that indicated where this was located in the registry where I could manually change a setting.<br />
After endless Google links that provided endless bad information, I came across a link for this app.</p>
<p><strong>Built-in Control Scanner</strong><br />
You use Built-in Controls Scanner to find command bar names and built-in controls IDs.<br />
<a href="http://www.add-in-express.com/products/commandbars-controls-ids.php" target="_blank">http://www.add-in-express.com/products/commandbars-controls-ids.php</a></p>
<p>I installed this on one of my test machines and opened Outlook 2010 and started a new message then selected the Format Text tab.</p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext14.jpg"><img class="aligncenter size-full wp-image-376" title="PlainText14" src="http://timbolton.files.wordpress.com/2012/01/plaintext14.jpg?w=450&#038;h=275" alt="" width="450" height="275" /></a></p>
<p style="text-align:center;">I then stated the App with Outlook selected.</p>
<p style="text-align:center;"> <strong>THERE WAS MY ANSWER!</strong></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext15.jpg"><img class="aligncenter size-full wp-image-377" title="PlainText15" src="http://timbolton.files.wordpress.com/2012/01/plaintext15.jpg?w=450" alt=""   /></a></p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext16.jpg"><img class="aligncenter size-full wp-image-378" title="PlainText16" src="http://timbolton.files.wordpress.com/2012/01/plaintext16.jpg?w=450&#038;h=497" alt="" width="450" height="497" /></a></p>
<p>In Group Police I updated  -  User Configuration\Administrative Templates\Microsoft Outlook 2010\Disable Items in User Interface\Custom  I entered the Command Bar ID’s along with a description.</p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext17.jpg"><img class="aligncenter size-full wp-image-379" title="PlainText17" src="http://timbolton.files.wordpress.com/2012/01/plaintext17.jpg?w=450&#038;h=136" alt="" width="450" height="136" /></a></p>
<p><a href="http://timbolton.files.wordpress.com/2012/01/plaintext18.jpg"><img class="aligncenter size-full wp-image-380" title="PlainText18" src="http://timbolton.files.wordpress.com/2012/01/plaintext18.jpg?w=450&#038;h=405" alt="" width="450" height="405" /></a></p>
<p style="text-align:center;">Enter the Command Bar ID’s here.  5564 and 5565</p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext19.jpg"><img class="aligncenter size-full wp-image-381" title="PlainText19" src="http://timbolton.files.wordpress.com/2012/01/plaintext19.jpg?w=450&#038;h=297" alt="" width="450" height="297" /></a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext20.jpg"><img class="aligncenter size-full wp-image-382" title="PlainText20" src="http://timbolton.files.wordpress.com/2012/01/plaintext20.jpg?w=450&#038;h=300" alt="" width="450" height="300" /></a></p>
<p style="text-align:left;">I ran Gpupdate /Force on the test machine and reopened Outlook 2010 and started a new email message.  As you can see, the Rich Text and HTML Text options are gone.  This will ensure that they users cannot use this option to bypass policy.</p>
<p style="text-align:left;"><a href="http://timbolton.files.wordpress.com/2012/01/plaintext21.jpg"><img class="aligncenter size-full wp-image-383" title="PlainText21" src="http://timbolton.files.wordpress.com/2012/01/plaintext21.jpg?w=450&#038;h=219" alt="" width="450" height="219" /></a></p>
<p style="text-align:left;">I hope this helps someone that has been trying to configure this setting.  If there is an easier way to do this please post the link here.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/352/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/352/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/352/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=352&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2012/01/10/enforce-plain-text-outlook-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext011.jpg" medium="image">
			<media:title type="html">PlainText01</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext02.jpg" medium="image">
			<media:title type="html">PlainText02</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext03.jpg" medium="image">
			<media:title type="html">PlainText03</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext04.jpg" medium="image">
			<media:title type="html">PlainText04</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext05.jpg" medium="image">
			<media:title type="html">PlainText05</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext06.jpg" medium="image">
			<media:title type="html">PlainText06</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext07.jpg" medium="image">
			<media:title type="html">PlainText07</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext08.jpg" medium="image">
			<media:title type="html">PlainText08</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext09.jpg" medium="image">
			<media:title type="html">PlainText09</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext10.jpg" medium="image">
			<media:title type="html">PlainText10</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext11.jpg" medium="image">
			<media:title type="html">PlainText11</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext12.jpg" medium="image">
			<media:title type="html">PlainText12</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext131.jpg" medium="image">
			<media:title type="html">PlainText13</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext14.jpg" medium="image">
			<media:title type="html">PlainText14</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext15.jpg" medium="image">
			<media:title type="html">PlainText15</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext16.jpg" medium="image">
			<media:title type="html">PlainText16</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext17.jpg" medium="image">
			<media:title type="html">PlainText17</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext18.jpg" medium="image">
			<media:title type="html">PlainText18</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext19.jpg" medium="image">
			<media:title type="html">PlainText19</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext20.jpg" medium="image">
			<media:title type="html">PlainText20</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2012/01/plaintext21.jpg" medium="image">
			<media:title type="html">PlainText21</media:title>
		</media:content>
	</item>
		<item>
		<title>AD Clean up with Powershell for Beginners.</title>
		<link>http://timbolton.net/2011/12/28/ad-clean-up-with-powershell-for-beginners/</link>
		<comments>http://timbolton.net/2011/12/28/ad-clean-up-with-powershell-for-beginners/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 20:32:18 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=289</guid>
		<description><![CDATA[The questions and answers were developed straight from Microsoft Technet and I have included the link. Active Directory Cmdlets in Windows PowerShell Windows PowerShell™ is a task-based command-line shell and scripting language designed especially for system administration. This reference topic for the information technology (IT) professional introduces the 76 Windows PowerShell cmdlets that you can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=289&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The questions and answers were developed straight from Microsoft Technet and I have included the link.</p>
<p><strong>Active Directory Cmdlets in Windows PowerShell</strong></p>
<p>Windows PowerShell™ is a task-based command-line shell and scripting language designed especially for system administration. This reference topic for the information technology (IT) professional introduces the 76 Windows PowerShell cmdlets that you can use to manage and administer the Active Directory® directory service and Active Directory Domain Services (AD DS).</p>
<p><a href="http://technet.microsoft.com/en-us/library/ee617195.aspx">http://technet.microsoft.com/en-us/library/ee617195.aspx</a></p>
<p>The purpose of this crossword was to hopefully introduce some reluctant Administrators to Powershell, especially those that administer Active Directory (AD).</p>
<p>You do not have to be a NASCAR or INDY racer to realize the benefits of being able to drive a car, so what are you waiting for when it comes to learning Powershell?  Powershell will be a mandatory requirement in the very near future, if it is not already in your area.</p>
<p>If you find that Powershell can (will) make your life much easier, then I would highly suggest these links to open your mind and your world to Powershell.</p>
<p><strong>Mark Minasi</strong> &#8211; Mark Minasi is a senior contributing editor for Windows IT Pro, an MCSE, and the author of more than 30 books, including Mastering Windows Server 2008 R2 (Sybex). He writes and speaks around the world about Windows networking.<br />
<a href="http://www.minasi.com/forum/default.asp" target="_blank"> http://www.minasi.com/forum/default.asp</a></p>
<p>Find Users with Get-ADUser - <a href="http://www.windowsitpro.com/article/windows-power-tools/getaduser-determine-logged-141189" target="_blank">http://www.windowsitpro.com/article/windows-power-tools/getaduser-determine-logged-141189</a></p>
<p><span id="more-289"></span></p>
<p><strong>The Lonely Administrator &#8211; Jeffery Hicks</strong></p>
<p>I am certified Microsoft professional, a Microsoft MVP and an IT veteran with almost 20 years of experience, much of it spent as an IT consultant specializing in Windows server technologies.  <a href="http://jdhitsolutions.com/blog/" target="_blank"> http://jdhitsolutions.com/blog/</a></p>
<p>As mentioned &#8211; Add WhatIf Support to Your PowerShell Scripts Posted on December 2, 2011 by Jeffery Hicks <a href="http://jdhitsolutions.com/blog/2011/12/add-whatif-support-to-your-powershell-scripts/" target="_blank">http://jdhitsolutions.com/blog/2011/12/add-whatif-support-to-your-powershell-scripts/</a></p>
<p><!--more--></p>
<p><strong>Concentrated Technology</strong> is the brainchild of IT gurus <strong>Don Jones</strong> and <strong>Greg Shields</strong>. We offer a number of different products and services, depending on which part of the IT industry you work in.   <a href="http://www.concentratedtech.com/" target="_blank">http://www.concentratedtech.com/</a></p>
<p><!--more--></p>
<p><strong>MSFT Scripting Guys &#8211; Ed Wilson</strong><br />
Ed is the Microsoft Scripting Guy. He is an expert on scripting technology such as PowerShell, VBScript and WMI. He is the author of over a dozen books.<br />
<a href="http://www.scriptingguys.com" target="_blank">http://www.scriptingguys.com</a></p>
<p><!--more--></p>
<p><strong>Claus Nielsen</strong> – Microsoft Powershell MVP</p>
<p>Blog: <a href="http://xipher.dk" target="_blank">http://xipher.dk</a>     Public Profile: <a href="http://dk.linkedin.com/pub/claus-nielsen/1/2ab/9b1" target="_blank">http://dk.linkedin.com/pub/claus-nielsen/1/2ab/9b1</a></p>
<p><!--more--></p>
<p>On the<strong> Group Policy / Powershell</strong> side of things <a href="http://www.gpanswers.com/" target="_blank">Jeremy Moskowitz </a> and <a href="http://www.gpoguy.com/" target="_blank">Darren Mar-Elia</a> are a <strong>MUST</strong> reads.</p>
<p><!--more--></p>
<p style="text-align:center;">I have included both the crossword puzzles and their answer keys.</p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-1-of-46.pdf">AD Clean up with Powershell 1 of 4</a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-1-of-4-key3.pdf">AD Clean up with Powershell 1 of 4 KEY</a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-2-of-45.pdf">AD Clean up with Powershell 2 of 4</a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-2-of-4-key3.pdf">AD Clean up with Powershell 2 of 4 KEY</a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-3-of-44.pdf">AD Clean up with Powershell 3 of 4</a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-3-of-4-key3.pdf">AD Clean up with Powershell 3 of 4 KEY</a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-4-of-44.pdf">AD Clean up with Powershell 4 of 4</a></p>
<p style="text-align:center;"><a href="http://timbolton.files.wordpress.com/2011/12/ad-clean-up-with-powershell-4-of-4-key3.pdf">AD Clean up with Powershell 4 of 4 KEY</a></p>
<p style="text-align:center;">
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=289&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2011/12/28/ad-clean-up-with-powershell-for-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>
	</item>
		<item>
		<title>Powershell for Beginners crossword</title>
		<link>http://timbolton.net/2011/12/15/276/</link>
		<comments>http://timbolton.net/2011/12/15/276/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 00:15:03 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://timbolton.wordpress.com/?p=276</guid>
		<description><![CDATA[I put together a Powershell for Beginners crossword puzzle.  I hope you enjoy it.  I even learned a thing or two while  putting it together.  I will be working on a Clean Up AD Version, thanks to my good friend Mark Minasi, soon. I also want to thank Jeffery Hicks and Claus Nielsen for urging me [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=276&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I put together a Powershell for Beginners crossword puzzle.  I hope you enjoy it.  I even learned a thing or two while  putting it together.  I will be working on a Clean Up AD Version, thanks to my good friend Mark Minasi, soon.</p>
<p>I also want to thank Jeffery Hicks and Claus Nielsen for urging me to complete this little project.</p>
<p>PDF can be downloaded from link below.</p>
<p><a href="http://timbolton.files.wordpress.com/2011/12/powershell-for-beginners.pdf">Powershell for Beginners</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/276/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/276/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/276/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=276&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2011/12/15/276/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>
	</item>
		<item>
		<title>New Books!</title>
		<link>http://timbolton.net/2011/02/25/252/</link>
		<comments>http://timbolton.net/2011/02/25/252/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 05:56:09 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Books I Recommend]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=252</guid>
		<description><![CDATA[Learn Windows PowerShell in a Month of Lunches by Don Jones Learn Windows PowerShell in a Month of Lunches is an innovative tutorial designed for busy administrators. Author Don Jones has taught thousands of administrators to use PowerShell, and now he’ll teach you, bringing his years of training techniques to a concise, easy-to-follow book. Just [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=252&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3><em>Learn Windows PowerShell in a Month of Lunches</em><br />
<em>by <a href="http://concentratedtech.com/">Don Jones</a></em></h3>
<div>
<p>Learn Windows PowerShell in a Month of Lunches is an innovative tutorial designed for busy administrators. Author Don Jones has taught thousands of administrators to use PowerShell, and now he’ll teach you, bringing his years of training techniques to a concise, easy-to-follow book. Just set aside one hour a day—lunchtime would be perfect—for an entire month, and you’ll be automating administrative tasks faster than you ever thought possible.</p>
<p><a href="http://timbolton.files.wordpress.com/2011/02/donjonespowerlunch.jpg"><img class="aligncenter size-full wp-image-287" title="DonJonesPowerLunch" src="http://timbolton.files.wordpress.com/2011/02/donjonespowerlunch.jpg?w=450" alt=""   /></a></p>
</div>
<p>Two new books to add today.  Once again Aidan Finn has released yet another book.</p>
<p><span style="font-size:20px;font-weight:bold;"><a title="Mastering Windows 7 Deployment" href="http://www.aidanfinn.com/?p=11063" target="_blank">Mastering Windows 7 Deployment</a></span></p>
<p><span style="font-size:20px;font-weight:bold;"><a href="http://timbolton.files.wordpress.com/2011/02/deploywin7.jpg"><img class="aligncenter size-full wp-image-264" title="DeployWin7" src="http://timbolton.files.wordpress.com/2011/02/deploywin7.jpg?w=450" alt=""   /></a><br />
</span></p>
<p><span style="font-size:20px;font-weight:bold;"><br />
</span></p>
<p><strong>The Great Mark Russinovich has written a thriller, a fictional novel using his experience and knowledge of IT:</strong></p>
<h1><strong><a href="http://www.amazon.com/s/ref=pd_lpo_k2_dp_sr_sq_top?ie=UTF8&amp;keywords=zero%20day%20mark%20russinovich&amp;index=blended&amp;pf_rd_p=1278548962&amp;pf_rd_s=lpo-top-stripe-1&amp;pf_rd_t=201&amp;pf_rd_i=031261246X&amp;pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_r=1T2G8R8DE5M63N99FN7R">Zero Day</a> </strong></h1>
<p><strong><a href="http://timbolton.files.wordpress.com/2011/02/zeroday1.jpg"><img class="aligncenter size-full wp-image-262" title="ZeroDay" src="http://timbolton.files.wordpress.com/2011/02/zeroday1.jpg?w=450" alt=""   /></a><br />
</strong></p>
<p><em>“Arab terrorists, with the collusion of Osama bin Laden, are behind the attack, which is supposed to destroy Western civilization. A New York City law firm enlists cyber expert Jeff Aiken to track down a virus that has knocked out the company’s computer network. While working on this problem, Jeff uncovers the larger threat. With the help of “stunningly attractive” Daryl Haugen, an old friend who becomes his love interest, Jeff attempts to warn the authorities, but to little avail”.</em></p>
<p><strong>You can pre-order the book now on <a href="http://www.amazon.com/Zero-Day-Novel-Mark-Russinovich/dp/031261246X%3FSubscriptionId%3DAKIAIJ5WNI7ZSH7W4OXA%26tag%3Dafm0c-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D031261246X" target="_blank">Amazon.com</a> in paper and for Kindle.  The expected RTM is March 15th, 2011.</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/252/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=252&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2011/02/25/252/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2011/02/donjonespowerlunch.jpg" medium="image">
			<media:title type="html">DonJonesPowerLunch</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2011/02/deploywin7.jpg" medium="image">
			<media:title type="html">DeployWin7</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2011/02/zeroday1.jpg" medium="image">
			<media:title type="html">ZeroDay</media:title>
		</media:content>
	</item>
		<item>
		<title>Mastering Hyper-V Deployment</title>
		<link>http://timbolton.net/2010/10/18/mastering-hyper-v-deployment/</link>
		<comments>http://timbolton.net/2010/10/18/mastering-hyper-v-deployment/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 17:19:24 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Books I Recommend]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=242</guid>
		<description><![CDATA[ Aidan is a friend of mine that has helped me out of &#8220;many&#8221; self induced issues dealing with Hyper-V and Server 2K8.  You can pre-order his new book at Amazon.    Book Info &#8211; http://www.aidanfinn.com/?page_id=10015 Amazon Link Mastering Hyper-V Deployment<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=242&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"> </span></span><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;">Aidan is a friend of mine that has helped me out of &#8220;many&#8221; self induced issues dealing with Hyper-V and Server 2K8.  You can pre-order his new book at Amazon.</span></span></div>
<div><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"> </span></span><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"> </span></span></span></span></div>
<div><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;"><span style="font-family:Helv;font-size:x-small;">Book Info &#8211; <a href="http://www.aidanfinn.com/?page_id=10015">http://www.aidanfinn.com/?page_id=10015</a></span></span></span></span></span></p>
<p dir="ltr">Amazon Link</p>
<div style="width: 421px; text-align: center; background: #fff; border: 1px solid #aaa; margin: 3px; padding: 2px;">
<p style="margin: 10px 10px;"><a href="http://www.amazon.com/Mastering-Hyper-V-Deployment-Aidan-Finn/dp/0470876530%3FSubscriptionId%3DAKIAIJ5WNI7ZSH7W4OXA%26tag%3Dafm0c-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0470876530" target="_blank"><img src="http://ecx.images-amazon.com/images/I/51MoLM15VvL.jpg" height="500" width="401" alt="Mastering Hyper-V Deployment" style="padding:0;margin:0;border:none;" /></a></p>
<p style="font-size: 10px;"><a href="http://www.amazon.com/Mastering-Hyper-V-Deployment-Aidan-Finn/dp/0470876530%3FSubscriptionId%3DAKIAIJ5WNI7ZSH7W4OXA%26tag%3Dafm0c-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0470876530" target="_blank">Mastering Hyper-V Deployment</a></p>
<p style="font-size: 10px;">
<p style="margin: 10px 165.5px;"><a href="http://www.amazon.com/Mastering-Hyper-V-Deployment-Aidan-Finn/dp/0470876530%3FSubscriptionId%3DAKIAIJ5WNI7ZSH7W4OXA%26tag%3Dafm0c-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0470876530" target="_blank"><img alt="Buy from Amazon" src="http://ecx.images-amazon.com/images/G/01/buttons/buy-from-tan.gif"" style="padding:0;margin:0;border:none;" /></a></p>
</p></div>
<div id="attachment_245" class="wp-caption aligncenter" style="width: 460px"><a href="http://timbolton.files.wordpress.com/2010/10/aidanbook.jpg"><img class="size-full wp-image-245" title="AIDANBOOK" src="http://timbolton.files.wordpress.com/2010/10/aidanbook.jpg?w=450&#038;h=563" alt="Mastering Hyper-V - Adian Finn" width="450" height="563" /></a><p class="wp-caption-text">Mastering Hyper-V - Adian Finn</p></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/242/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=242&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2010/10/18/mastering-hyper-v-deployment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2010/10/aidanbook.jpg" medium="image">
			<media:title type="html">AIDANBOOK</media:title>
		</media:content>
	</item>
		<item>
		<title>icacls &#8211; changing permissions on files and folders.</title>
		<link>http://timbolton.net/2010/06/23/icacls-changing-permissions-on-files-and-folders/</link>
		<comments>http://timbolton.net/2010/06/23/icacls-changing-permissions-on-files-and-folders/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 18:04:33 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=233</guid>
		<description><![CDATA[Update &#8211; Excellent Post  How to Handle NTFS Folder Permissions, Security Descriptors and ACLshttp://blogs.technet.com/b/josebda/archive/2010/11/12/how-to-handle-ntfs-folder-permissions-security-descriptors-and-acls-in-powershell.aspx I was asked about changing permissions from the root of a drive and all sub-folders.  My immediate reaction was to use the Microsoft tool that replaced cacls &#8211; icacls.  Apparently the person that came up with the new name  &#8221;must&#8221; have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=233&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Update &#8211; Excellent Post  How to Handle NTFS Folder Permissions, Security Descriptors and ACLs<a href="http://blogs.technet.com/b/josebda/archive/2010/11/12/how-to-handle-ntfs-folder-permissions-security-descriptors-and-acls-in-powershell.aspx">http://blogs.technet.com/b/josebda/archive/2010/11/12/how-to-handle-ntfs-folder-permissions-security-descriptors-and-acls-in-powershell.aspx</a></p>
<p>I was asked about changing permissions from the root of a drive and all sub-folders.  My immediate reaction was to use the Microsoft tool that replaced cacls &#8211; icacls.  Apparently the person that came up with the new name  &#8221;must&#8221; have just received their new iPad. &lt;g&gt;</p>
<p>I remembered a Technet article from a friend Gregg Shields &#8211; <a href="http://technet.microsoft.com/en-us/magazine/2009.07.geekofalltrades.aspx" target="_blank">http://technet.microsoft.com/en-us/magazine/2009.07.geekofalltrades.aspx</a></p>
<p><span id="more-233"></span></p>
<p><span style="color:#0000ff;">&#8220;Setting permissions for the Marketing folder is slightly different. We use the same permissions flow for the Product folder as we did for the subfolders under Finance, but the Restricted folder will be treated a bit differently. Let&#8217;s suppose that folder contains highly secret documents that should be seen by only a very few individuals. Your first thought may be, &#8220;A-ha! Here, I&#8217;ll use the Deny permissions to prevent the wrong users from accessing this folder!&#8221;<br />
But keep in mind that the Deny permissions is actually far too powerful a setting for most situations as it automatically overrides every other permission. Therefore, adding the Deny permission to the Marketing Users group for this folder means that any Restricted users who are also Marketing users would be shut out. A more appropriate solution here is to break the inheritance again and simply eliminate all permissions for the Marketing Users group. Thus, the three icacls command lines required to set the permissions for this structure are&#8221;</span><a href="http://support.microsoft.com/kb/943043" target="_blank"><span style="color:#0000ff;">http://support.microsoft.com/kb/943043</span></a></p>
<p><span style="color:#0000ff;">Icacls C:\Shared\Marketing /inheritance:r /grant:r &#8220;Finance Users&#8221;:(OI)(CI)R /grant:r &#8220;File Admins&#8221;:(OI)(CI)F</span></p>
<p><span style="color:#0000ff;">Icacls C:\Shared\Marketing\Product /grant:r &#8220;Product Users&#8221;:(OI)(CI)M</span></p>
<p><span style="color:#0000ff;">Icacls C:\Shared\Marketing\Restricted /inheritance:r /grant:r &#8220;File Admins&#8221;:(OI)(CI)F /grant:r &#8220;Restricted Users&#8221;:(OI)(CI)M</span></p>
<p><span style="color:#0000ff;">ALSO see -</span></p>
<p><span style="color:#0000ff;">The Icacls.exe utility that is included with Windows Server 2003 Service Pack 2 does not support the inheritance bit<br />
Hotfix Download Available</span></p>
<p><span style="color:#0000ff;">Additionally, you can set the inheritance bit of files or folders by using the updated Icacls.exe utility together with the /inheritance parameter. For more information, see the following sample:<br />
/inheritance:e|d|r<br />
e &#8211; enables inheritance<br />
d &#8211; disables inheritance and copy the ACEs<br />
r &#8211; remove all inherited ACEs</span></p>
<p><strong>So if you are asking yourself WHAT..?  Like I was, here is some more info on the topic.</strong></p>
<p><span style="color:#0000ff;">&#8220;Tim asked me to comment on this question.</span></p>
<p><span style="color:#0000ff;">You’re on the right path. Funny, but I’m actually about to write a three-part series on icacls for TechTarget.</span></p>
<p><span style="color:#0000ff;">You need to break the inheritance (/inheritance:r) and then reset the new directly-applied permissions (/grant). The new perms then inherit down because you’re using (OI)(CI), which are “object inherit” and “container inherit”.</span></p>
<p><span style="color:#0000ff;">So, step one: Break inheritance. Step two: directly set new perm. Step three: Enable inheritance. What’s confusing is that these three steps are all being done in a single line.</span></p>
<p><span style="color:#0000ff;">Does this help?&#8221;</span></p>
<p><span style="color:#0000ff;">/Greg Shields, MVP &#8211; Terminal Services</span></p>
<p><span style="color:#0000ff;">Tips and Tricks for the Jack-of-all-Trades IT Professional</span></p>
<p><a href="http://www.ConcentratedTech.com"><span style="color:#0000ff;">www.ConcentratedTech.com</span></a></p>
<p><strong>The &#8220;single line&#8221; threw me for a but until I realized what he meant was.  In your single command line you need to break the inheritance first then you will apply the permissions you want to grant accordingly.</strong></p>
<p>So for example -</p>
<p>Step 1 is the /inheritance:r</p>
<p>Step 2 is the /grant Domain\username</p>
<p>Step 3 is the (OI)(CI) F</p>
<p>Thus -</p>
<p>icacls pathname /inheritance:r /grant Domain\username (OI)(CI) F</p>
<p>F = full</p>
<p>If there are any other permissions that exist you could also remove those in the same command by using the<strong> :r </strong>switch after the grant command.</p>
<p>icacls pathname /inheritance:r /grant:r Domain\username (OI)(CI) F</p>
<p>Many Thanks to <a title="Gregg Shields" href="http://concentratedtech.com/" target="_blank">Gregg Shields</a>.  I highly anticipate his to be released three-part series on icacls for TechTarget.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/233/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=233&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2010/06/23/icacls-changing-permissions-on-files-and-folders/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>
	</item>
		<item>
		<title>Start &#8211; Stop Service with Powershell and Ping</title>
		<link>http://timbolton.net/2010/06/07/start-stop-service-with-powershell-and-ping/</link>
		<comments>http://timbolton.net/2010/06/07/start-stop-service-with-powershell-and-ping/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 16:09:56 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=194</guid>
		<description><![CDATA[Ran into a request for an OCS Mediation Server that is contacting an OCS Front End Pool over a WAN link. &#8220;We have a remote OCS Mediation server that contacts the OCS Front End Pool over a WAN link. I need that Mediation server to ping those front end servers periodically to verify that the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=194&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ran into a request for an OCS Mediation Server that is contacting an OCS Front End Pool over a WAN link.</p>
<p><em>&#8220;We have a remote OCS Mediation server that contacts the OCS Front End Pool over a WAN link. I need that Mediation server to ping those front end servers periodically to verify that the WAN link is up. If the ping on two of the servers fails,  I need it to stop the OCS Mediation service on the mediation server until it can successfully ping the two front end server across the WAN again at which point it would then bring the Service on the Mediation server back up.&#8221;</em></p>
<p><em> </em></p>
<h5>With a LOT of assitance from <a title="Jeffery Hicks" href="http://jdhitsolutions.com/" target="_blank">Jeffery Hicks</a> and <a title="Claus" href="http://www.xipher.dk/WordPress/" target="_blank">Claus Thude Nielsen</a> a simple script was created.</h5>
<p><span id="more-194"></span></p>
<table style="height:100%;" width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" height="100%">I interpreted the need to stop the service if both computers are unreachable and start the service when they are. Plug in your values. $server1=&#8221;coredc01&#8243;<br />
$server2=&#8221;client1&#8243;<br />
$service=&#8221;spooler&#8221;if ((test-connection $server1 -quiet) -AND (test-connection $server2 -quiet)) {<br />
#both servers are reeachable so make sure service is running<br />
get-service $service | where {$_.status -eq &#8220;Stopped&#8221;} | Start-Service -PassThru<br />
}<br />
else {<br />
#at least one server is unreachable so stop service<br />
write-warning &#8220;One of the servers is unreachable&#8221;<br />
get-service $service | where {$_.status -eq &#8220;Running&#8221;} | Stop-Service -PassThru<br />
}</td>
</tr>
<tr>
<td valign="bottom">
<hr noshade="noshade" size="1" />
<p>Jeffery Hicks<br />
Windows PowerShell MVPNow Available: Windows PowerShell 2.0: TFM</td>
</tr>
</tbody>
</table>
<h5>  In this example the Two Server that are being PINGED are &#8220;coredc01&#8243; and &#8220;client1&#8243;.  The service being stopped and or started is &#8220;spooler&#8221;.</h5>
<p>A scheduled task &#8211; set to run as a System Process - can be used to run the PS1 script.</p>
<div><span style="color:#000000;">Just for future reference&#8230; I simply placed the PS1 file in a temp folder on C:\ for testing. Then I created a scheduled task set to run every minute. In the RUN box (property of the scheduled task) where it was listed -</span></div>
<p><span style="color:#000000;"> </span></p>
<p><span style="color:#000000;"> </span></p>
<div><span style="color:#000000;">C:\temp\restart.ps1 </span></div>
<p><span style="color:#000000;">I added this bit - </span></p>
<p><strong>powershell.exe -noexit</strong> C:\temp\restart.ps1</p>
<p>It was automatically changed to this -</p>
<p><strong>C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noexit C:\temp\restart.ps1 </strong></p>
<p><strong>-noexit </strong>keeps the powershell window open so I could see any warnings or MSG. NOTE! If running via scheduled task, the task will have a status of running and will not open a new window until the first one closes.</p>
<p>Also,,, if you are simply removing the network cable to signify a down connection, make sure you have turned off your wireless connection as well. May save you about 20 Min&#8217;s of head scratching. &lt;g&gt;</p>
<p>Once I was satisfied with the PS1 working I then removed the -noexit. Works like a charm&#8230;<br />
Another example where the PS1 is set to run contniuous -</p>
<p>$server1=&#8221;cropfrontend1&#8243;<br />
$server2=&#8221;corpfrontend2&#8243;<br />
$service=&#8221;OCS Communication Server Mediation&#8221;<br />
do{<br />
if ((test-connection $server1 -quiet) -OR (test-connection $server2 -quiet)) {<br />
#if 1 server is reachable make sure service is running<br />
get-service $service | where {$_.status -eq &#8220;Stopped&#8221;} | Start-Service -PassThru<br />
}<br />
elseif (!(test-connection $server1 -quiet) -AND (test-connection $server2 -quiet)) {<br />
#if both servers are unreachable stop service<br />
write-warning &#8220;Both of the servers are unreachable&#8221;<br />
get-service $service | where {$_.status -eq &#8220;Running&#8221;} | Stop-Service -PassThru<br />
}<br />
start-sleep –s 15<br />
} until ( $true –eq $false)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=194&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2010/06/07/start-stop-service-with-powershell-and-ping/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>
	</item>
		<item>
		<title>Automate the Windows 2003 Defragmenter Without Paying Extra&#8230;</title>
		<link>http://timbolton.net/2010/06/07/automate-the-windows-2003-defragmenter-without-paying-extra-part-1/</link>
		<comments>http://timbolton.net/2010/06/07/automate-the-windows-2003-defragmenter-without-paying-extra-part-1/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 15:12:30 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=190</guid>
		<description><![CDATA[Taken from the Windows IT Pro site  &#8211;  http://www.windowsitpro.com/article/windows-shell-bat-and-cmd/automate-the-windows-2003-defragmenter-without-paying-extra.aspx Excellent Article Daniel..! Defragmentation is a great way to keep workstations and servers running at their best performance. Windows Server 2003 comes with a defragmenter: dfrgntfs.exe. However, you can&#8217;t automate this defragmenter unless you purchase a program such as Diskeeper. I didn&#8217;t have money for such [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=190&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Taken from the Windows IT Pro site  &#8211;  <a href="http://www.windowsitpro.com/article/windows-shell-bat-and-cmd/automate-the-windows-2003-defragmenter-without-paying-extra.aspx">http://www.windowsitpro.com/article/windows-shell-bat-and-cmd/automate-the-windows-2003-defragmenter-without-paying-extra.aspx</a></p>
<p>Excellent Article Daniel..!</p>
<p>Defragmentation is a great way to keep workstations and servers running</p>
<p>at their best performance. Windows Server 2003 comes with a</p>
<p>defragmenter: dfrgntfs.exe. However, you can&#8217;t automate this</p>
<p>defragmenter unless you purchase a program such as Diskeeper. I didn&#8217;t</p>
<p>have money for such a program in my budget, so I created and scheduled a</p>
<p>batch file named Defrag.bat.</p>
<p>As Listing 1 shows,</p>
<p>Listing 1: Defrag.bat</p>
<p>@Echo Off</p>
<p>defrag.exe c: -f</p>
<p>defrag.exe e: -f</p>
<p>defrag.exe f: -f</p>
<p><span id="more-190"></span></p>
<p>Defrag.bat is a simple program. It uses the defragmenter&#8217;s command-line</p>
<p>interface (defrag.exe) to run the defragmenter against each drive.</p>
<p>However, I wasn&#8217;t happy with Defrag.bat for two reasons. First, I had to</p>
<p>let the batch file run while being left logged on with my administrator</p>
<p>ID. Although I locked the screen for security reasons, I didn&#8217;t want to</p>
<p>leave myself logged on all the time. Second, I wanted more automation.</p>
<p>So, I did some digging around and found a means to automate the</p>
<p>procedure. I found that I could use the Windows scheduler but in a</p>
<p>different way that I didn&#8217;t know was possible: I could use the AT</p>
<p>command with a batch file.</p>
<p>I created a new batch file, Defrg. bat, which Listing 2 shows.</p>
<p>Listing 2: Defrg.bat</p>
<p>@Echo Off</p>
<p>&#8216; BEGIN CALLOUT A</p>
<p>Set logfile=f:\defrag.log</p>
<p>&#8216; END CALLOUT A</p>
<p>Echo Started %date%,%time% &gt;&gt;%logfile%</p>
<p>Echo &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &gt;&gt;%logfile% Echo Defragmenting</p>
<p>C: drive &gt;&gt;%logfile% Echo. &gt;&gt;%logfile% defrag.exe c: -f &gt;&gt;%logfile% Echo</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &gt;&gt;%logfile% Echo Defragmenting E:</p>
<p>drive &gt;&gt;%logfile% Echo. &gt;&gt;%logfile% defrag.exe e: -f &gt;&gt;%logfile% Echo</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &gt;&gt;%logfile% Echo Defragmenting F:</p>
<p>drive &gt;&gt;%logfile% Echo. &gt;&gt;%logfile% defrag.exe f: -f &gt;&gt;%logfile% Echo</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &gt;&gt;%logfile% Echo Finished</p>
<p>%date%,%time% &gt;&gt;%logfile% Echo &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>&gt;&gt;%logfile%</p>
<p>Like Defrag.bat, Defrg.bat runs defrag.exe. However, Defrg.bat has a few</p>
<p>more features than Defrag.bat. I included code that documents when the</p>
<p>defragmenter starts and ends in a log file. I also added code that ports</p>
<p>the defragmenter&#8217;s screen output to the same log file (with some titles</p>
<p>in between) to record which drives are being defragmented. That way, I</p>
<p>can easily check to see whether the defragmentation operation ran and</p>
<p>whether any errors occurred.</p>
<p>To use the new script, I log on to the server with my administrator ID,</p>
<p>open a command-shell window, and run command</p>
<p>at 08:00pm /every:M,T,W,Th,F  f:\Defrg.bat</p>
<p>(Although this command appears on several lines here, you would enter it</p>
<p>on one line in the command-shell window.) This command creates a new</p>
<p>scheduled item in Scheduled Tasks that runs Defrg.bat every weeknight at</p>
<p>8 p.m. (which is before our backup runs).</p>
<p>With this new batch file, I don&#8217;t need to be logged on for it to run.</p>
<p>Because Defrg.bat is running as a system process, the defragmentation</p>
<p>operation is performed in the background (i.e., no window comes up), but</p>
<p>Task Manager will show that defrag.exe and dfrgntfs.exe are running.</p>
<p>After Defrg.bat finishes, the scheduler will show 0&#215;0 for a successful</p>
<p>execution. However, I always check the log file to make sure no problems</p>
<p>were encountered.</p>
<p>To use Defrg.bat, you simply need to replace f:\defrag.log in the code</p>
<p>at callout A in Listing 2 with the pathname to your log file. The AT</p>
<p>command and batch file work on Windows Server 2003, Windows XP</p>
<p>Professional, and Windows XP Home Edition. I recommend that you make the</p>
<p>batch file a read-only, hidden file. That way, no one can edit it so</p>
<p>that it damages your computers when the scheduled batch runs.</p>
<p>-Daniel L. Gillard</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=190&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2010/06/07/automate-the-windows-2003-defragmenter-without-paying-extra-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>
	</item>
		<item>
		<title>Whereis with PowerShell</title>
		<link>http://timbolton.net/2010/03/05/whereis-with-powershell/</link>
		<comments>http://timbolton.net/2010/03/05/whereis-with-powershell/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 22:44:49 +0000</pubDate>
		<dc:creator>Tim Bolton</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Tips and Tricks]]></category>

		<guid isPermaLink="false">http://timbolton.net/?p=181</guid>
		<description><![CDATA[The topic of  &#8220;Search function in Vista&#8221; was brought up on the Minasi Forum.  (NOTE! if you are not a member you should be)  The DIR /S command was brought up as a replacement option to use since the old method that existed in XP is no longer available.  I remembered reading this article in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=181&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The topic of  <a href="http://web2.minasi.com/forum/topic.asp?whichpage=1&amp;TOPIC_ID=33100&amp;#165349" target="_blank">&#8220;Search function in Vista&#8221;</a> was brought up on the Minasi Forum.  (NOTE! if you are not a member you should be)  The DIR /S command was brought up as a replacement option to use since the old method that existed in XP is no longer available.  I remembered reading this article in WIN IT PRO and thought that it may be very useful for what the Admins are trying to accomplish.</p>
<p>You can download the WIN IT Pro Article here <a href="http://timbolton.files.wordpress.com/2010/03/find-files-on-local-drives-with-whereis.docx">Find Files on Local Drives with Whereis</a> and the PS1 code snippet here <a href="http://timbolton.files.wordpress.com/2010/03/whereisps1.docx">WhereisPS1</a> .</p>
<p><strong><a title="find files on local drives with whereis" href="http://www.windowsitpro.com/article/windows-powershell/find-files-on-local-drives-with-whereis-ps1.aspx" target="_blank">Find Files on Local Drives with Whereis.ps1</a></strong></p>
<p><strong>From the January 2010 Edition<br />
of Windows IT Pro </strong><br />
December 15, 2009<br />
<a href="http://windowsitpro.com/authors/authorid/1377/1377.html">Bill Stewart</a><br />
<a href="http://windowsitpro.com/departments/departmentid/5/%0d%0a%09%09%09%09%0d%0a%09%09Feature.html">Feature</a><br />
InstantDoc #103096</p>
<p>I often find it useful to search for files from a command line. In the past, I&#8217;ve typically used Cmd.exe&#8217;s dir command with the /b and /s parameters to search for files; combining these parameters provides a list containing the full paths and filenames of matching files. However, dir doesn&#8217;t have a simple syntax for searching multiple locations. For example, to search drives C and D for all files ending in .doc, you would use this command:</p>
<p>dir /b /s c:\*.doc d:\*.doc</p>
<p>The syntax gets even more complex when searching for multiple wildcard patterns (e.g., all .doc, .xls, and .ppt files) in multiple locations because you have to type each location and each wildcard pattern separately.</p>
<p>Windows PowerShell&#8217;s Get-ChildItem cmdlet makes this task simpler. For example, to search drives C and D for all .doc, .xls, and .ppt files, you can use this command:</p>
<p>get-childitem c:\*,d:\*<br />
-include *.doc,*.xls,*.ppt -recurse</p>
<p>Get-ChildItem&#8217;s first parameter is a list of paths to search, and the -Include parameter specifies a list of wildcard patterns that qualify the paths. The -Recurse parameter is analogous to the dir command&#8217;s /s parameter.</p>
<p><strong>Introducing Whereis.ps1</strong></p>
<p><strong> </strong><span id="more-181"></span><br />
Although the Get-ChildItem cmdlet is quite powerful, I still found myself wanting additional functionality. For example, I wanted to be able to omit the -Recurse parameter and to automatically search local fixed drives if I didn&#8217;t type a path. Before long, I began writing a full-featured script that augments the Get-ChildItem cmdlet with several additional features. The result is the Whereis.ps1 script, which you can download by clicking the<em>Download the Code Here</em> button at the top of the page. (Note that the Whereis.ps1 script isn&#8217;t an equivalent to the whereis command you might find on a UNIX-like OS.)</p>
<p>Whereis.ps1 uses the following syntax:</p>
<p>Whereis.ps1 -Name &lt;String[]&gt;<br />
[-Path &lt;String[]&gt;]<br />
[-LastWriteTimeRange &lt;DateTime[]&gt;]<br />
[-SizeRange &lt;UInt64[]&gt;] [-OneLevel]<br />
[-Files] [-Dirs] [-Force] [-DefaultFormat]</p>
<p>The -Name parameter specifies a wildcard pattern. This parameter&#8217;s argument can be an array. Files and directories that match the wildcard patterns are included in the script&#8217;s output. The -Name parameter is the only required command-line parameter. For information about the wildcard patterns you can use, type</p>
<p>get-help about_wildcard</p>
<p>at a PowerShell prompt. Because -Name is a positional parameter, you can omit the parameter name (-Name) and type only its argument if it&#8217;s the first parameter on the command line after the script name.</p>
<p>The -Path parameter specifies a path, and its argument can be an array. If you don&#8217;t specify this parameter, Whereis.ps1 searches all local fixed drives. The -Path parameter is also positional, so you can omit the parameter name (-Path) and type only its argument if it&#8217;s the second parameter on the command line after the script name.</p>
<p>The -LastWriteTimeRange parameter specifies an inclusive date range, and the argument can be an array. Items that have a LastWriteTime property within the range are included in the script&#8217;s output. If you specify strings for this parameter&#8217;s argument, Whereis.ps1 attempts to convert them to DateTime objects. If you specify a single date, Whereis.ps1 interprets the date range as &#8220;the specified date or later.&#8221; If you specify an array, Whereis.ps1 interprets the first element in the array as the earlier date boundary and the second element in the array as the later date boundary. You can specify an &#8220;older than&#8221; date range by using zero as the first element in the array.<a href="http://www.windowsitpro.com/Common/adforceimages/103096Table1.jpg" target="_blank">Table 1</a> shows some examples for the -LastWriteTimeRange parameter.</p>
<p>The -SizeRange parameter specifies an inclusive size range, in bytes. This parameter&#8217;s argument can be an array. Files that have a Length property within the range are included in the script&#8217;s output. If you specify a single number, Whereis.ps1 interprets the range as &#8220;files of at least the specified size.&#8221; If you specify an array, Whereis.ps1 interprets the first element in the array as the smaller size boundary and the second element in the array as the larger size boundary. You can also use PowerShell&#8217;s numeric multiplier suffixes (kb, mb, and gb) when specifying the arguments for -SizeRange. Table 2 shows some examples for the -SizeRange parameter. Note that the -SizeRange parameter is ignored if you use only the -Dirs parameter (which I describe later), because directories don&#8217;t have a Length property.</p>
<p><a href="http://timbolton.files.wordpress.com/2010/03/ps101.jpg"><img class="aligncenter size-full wp-image-184" title="ps101" src="http://timbolton.files.wordpress.com/2010/03/ps101.jpg?w=450" alt=""   /></a></p>
<p>The -OneLevel parameter searches within the specified directories but not their subdirectories. That is, it&#8217;s the inverse of Get-ChildItem&#8217;s -Recurse parameter.</p>
<p>The -Files parameter causes Whereis.ps1 to <a href="http://windowsitpro.com/articles/print.cfm?articleid=103096" target="undefined">include files</a> in its output, and the -Dirs parameter causes Whereis.ps1 to include directories. The default is -Files. If you want to search for both files and directories, use -Files and -Dirs together. Use -Dirs by itself to search only for directories.</p>
<p>The -Force parameter corresponds to Get-ChildItem&#8217;s -Force parameter. It causes Whereis.ps1 to search for items with hidden or <a href="http://windowsitpro.com/articles/print.cfm?articleid=103096" target="undefined">system</a> attributes.</p>
<p>The -DefaultFormat parameter causes Whereis.ps1 to output file-system objects instead of custom formatted string output. Figure 1 shows an example of Whereis.ps1&#8242;s custom output, which is easier to read than if you output file-system objects, particularly if you have a large number of results, but you can&#8217;t use the custom output as input for other scripts or cmdlets that expect file-system objects. The -DefaultFormat parameter helps you avoid this problem.</p>
<p><a href="http://timbolton.files.wordpress.com/2010/03/ps102.jpg"><img class="aligncenter size-full wp-image-185" title="ps102" src="http://timbolton.files.wordpress.com/2010/03/ps102.jpg?w=450" alt=""   /></a></p>
<p><strong>Inside Whereis.ps1</strong><br />
The param statement at the top of the script defines the script&#8217;s command-line parameters. I typically use mixed-case variable names for script parameters (and other global variables) in PowerShell scripts, but this is only a convention and isn&#8217;t required. After the param statement, the script declares the usage, isNumeric, writeItem, and main functions. Whereis.ps1 then calls the main function. Note that in PowerShell scripts, functions must be defined before they&#8217;re called, which is why Whereis.ps1 doesn&#8217;t call the main function until the last line in the script.</p>
<p>The usage function outputs a message explaining the script and how to use it, then exits the script. The main function calls the usage function if the -Name parameter is missing from the command line or if the -Help parameter is present.</p>
<p>The main function calls the isNumeric function to ensure that the arguments specified for the -SizeRange parameter are numeric. The isNumeric function works by using the -contains operator to see if its parameter&#8217;s type is in the list of numeric types (e.g., Decimal, Double).</p>
<p>The writeItem function controls the format of the script&#8217;s output. If the -DefaultFormat parameter exists on the command line, the writeItem function simply outputs its argument, which is a file-system object; otherwise, the function outputs a formatted string. It uses the standard .NET string formatting codes and the -f operator to produce the formatted string. For more information about string formatting, see the MSDN article <a href="http://msdn.microsoft.com/en-us/library/fbxft59x.aspx" target="_blank">&#8220;Formatting Types.&#8221;</a></p>
<p><strong>The main Function</strong><br />
The main function, which <a href="http://windowsitpro.com/Windows/Articles/ArticleID/103096/pg/3/3.html" target="_blank">Listing 1</a> shows, contains the bulk of the script&#8217;s code. The function&#8217;s first job is to verify that the -Name parameter is present. If the -Name parameter is missing or if the -Help parameter is present, the main function calls the usage function, which outputs a usage message and ends the script.</p>
<p>The main function next converts the $Name variable into an array; the variable remains unchanged if it already contains an array. The function then uses a for loop to iterate the array. If an array element contains the * wildcard, it replaces the array with the $NULL value. This step is necessary to prevent the Get-ChildItem cmdlet, which runs later in the script, from outputting the contents of subdirectories underneath a directory.</p>
<p>Next, the main function checks to see if the -Path parameter is present. If the -Path parameter is missing, the function uses the Get-WmiObject cmdlet to retrieve a list of local fixed drives, as the code in <a href="http://windowsitpro.com/Windows/Articles/ArticleID/103096/pg/3/3.html#callouta" target="_blank">callout A</a> shows. Therefore, the $Path variable contains either the path or paths specified with the -Path parameter or a list of local fixed drives. The main function then converts the $Path variable into an array; the variable remains unchanged if it already contains an array.</p>
<p>As the code in <a href="http://windowsitpro.com/Windows/Articles/ArticleID/103096/pg/3/3.html#calloutb" target="_blank">callout B</a> shows, the function then uses a for loop to iterate the $Path array. For each element in the array, it checks whether the element ends with a backslash (\). If it does, the function adds the * wildcard to the path. Then the function checks whether the element ends with \*. If it doesn&#8217;t, the function appends \*. When the for loop is complete, each element in the path array ends with \*. This process lets us specify a path such as C:\Files, and the script interprets the path as C:\Files\*. This script step not only saves typing when entering paths, but it&#8217;s also required because the main function uses the Get-ChildItem cmdlet&#8217;s -Include parameter. See the sidebar &#8220;Get-ChildItem&#8217;s -Include Parameter&#8221; for more information about how the -Include parameter works.</p>
<p>The main function next determines if the -LastWriteTimeRange parameter exists. If this parameter doesn&#8217;t exist, the function creates a two-element array. The function stores the earliest possible date (i.e., 1 January 0001, 00:00:00) in the first element, and it stores the latest possible date (i.e., 31 December 9999, 23:59:59) in the second element. The function gets the earliest and latest possible dates by retrieving the DateTime type&#8217;s MinValue and MaxValue static properties.</p>
<p>If the -LastWriteTimeRange parameter exists, the main function converts the $LastWriteTimeRange variable into an array; the variable remains unchanged if it already contains an array. If the array contains only one element, the function appends a second element to the array containing the latest possible date. The main function next checks whether the array&#8217;s first element is zero; if it is, the function uses the earliest possible date as the first element. Then the function attempts to convert both elements of the array into DateTime objects by using the DateTime type&#8217;s Parse static method, as the code in <a href="http://windowsitpro.com/Windows/Articles/ArticleID/103096/pg/3/3.html#calloutc" target="_blank">callout C</a> shows. If the Parse method throws an error, the script block following the trap statement runs, which outputs an error message and halts the script. The function then ensures that the first date is earlier than the second date; if this isn&#8217;t true, the function throws an error, ending the script.</p>
<p>Next, the main function checks whether the -SizeRange parameter exists. If it doesn&#8217;t exist, the function creates a two-element array, with a zero as the first element and the maximum value for a 64-bit unsigned integer (UInt64) as the second element. If the -SizeRange parameter exists, the function converts the $SizeRange variable into an array; the variable remains unchanged if it already contains an array. If the array contains only a <a href="http://windowsitpro.com/articles/print.cfm?articleid=103096" target="undefined">single element</a>, the function appends a second element to the array with the maximum value of the UInt64 type. The code in<a href="http://windowsitpro.com/Windows/Articles/ArticleID/103096/pg/3/3.html#calloutd" target="_blank">callout D</a> shows how the main function then checks to see if both elements contain numeric values by calling the isNumeric function I described earlier. If either element contains a value that isn&#8217;t numeric, the function throws an error, ending the script. The function also throws an error if the first array element is greater than the second element.</p>
<p>The main function then checks for the nonexistence of the -Files and -Dirs parameters. If neither parameter exists, the function sets $Files to $TRUE. It then sets two counter variables to zero: One to keep track of the number of items found ($count) and the other to accumulate the size of all files ($sizes).</p>
<p>At this stage, the main function has parsed and validated all of the script&#8217;s parameters, so it executes the Get-ChildItem cmdlet. The function pipes Get-ChildItem&#8217;s output to the ForEach-Object cmdlet so that it can perform further filtering for each object. If the -Files parameter exists and the object&#8217;s PsIsContainer property is False (i.e., the object is a file and not a directory), then the main function checks to see if the object&#8217;s LastWriteTime and Length properties are within the date and size ranges, respectively. If the object&#8217;s properties are within specified criteria, the main function increments the $count and $sizes variables and calls the writeItem function to output the object. The main function performs similar checks to see if the -Dirs parameter exists and the object&#8217;s PsIsContainer property is True (i.e., the object is a directory and not a file), except that it doesn&#8217;t verify the object&#8217;s size range or increment the $sizes variable because directory objects don&#8217;t have a Length property.</p>
<p><strong>Sample Commands</strong><br />
Now let&#8217;s look at some commands that illustrate how to use Whereis.ps1 to perform various tasks. For instance, if you want to search for video and <a href="http://windowsitpro.com/articles/print.cfm?articleid=103096" target="undefined">audio files</a> on all local drives, you would use the following command:</p>
<p>whereis.ps1 *.asf,*.avi,*.mov,*.mp3,<br />
*.mp4,*.mpg,*.mpeg,*.qt,*.wav,*.wm,*.wmv</p>
<p>Note that although commands here are shown with line breaks for space, you would enter them all on one line; it&#8217;s also important that you don&#8217;t put spaces around the commas.</p>
<p>Next, to search for PowerPoint files that are 10MB or larger in C:\Data and its subdirectories, try this command:</p>
<p>whereis.ps1 *.pp[st]*<br />
C:\Data -sizerange 10mb</p>
<p>To search for files in C:\Data that have been modified within the past 60 days, use</p>
<p>whereis.ps1 * C:\Data<br />
-daterange ((get-date)<br />
- (new-timespan -days 60)),(get-date)<br />
-onelevel</p>
<p>If you want to delete all files in C:\Logs that were modified 30 days ago or earlier, you would use this command:</p>
<p>whereis.ps1 * c:\Logs<br />
-daterange 0,((get-date)<br />
- (new-timespan -days 30))<br />
-onelevel -defaultformat | remove-item</p>
<p><strong>Get-ChildItem on Steroids</strong><br />
PowerShell&#8217;s Get-ChildItem cmdlet has powerful native functionality, but Whereis.ps1 adds some useful functionality of its own. Add Whereis.ps1 to your toolkit and find what you&#8217;re looking for even faster. Furthermore, you can build on the scripting concepts demonstrated here to customize and enhance your use of PowerShell cmdlets to suit your personal workload.</p>
<p><strong>Listing 1: Whereis.ps1&#8242;s main Function</strong></p>
<p>function main {</p>
<p># If -help is present or the -name parameter is missing, output</p>
<p># the usage message.</p>
<p>if (($Help) -or (-not $Name)) {</p>
<p>usage</p>
<p>}</p>
<p># Convert $Name to an array. If any array element contains *,</p>
<p># change the array to $NULL. This is because</p>
<p>#   get-childitem c:\* -include *</p>
<p># recurses to one level even if you don&#8217;t use -recurse.</p>
<p>$Name = @($Name)</p>
<p>for ($i = 0; $i -lt $Name.Length; $i++) {</p>
<p>if ($Name[$i] -eq &#8220;*&#8221;) {</p>
<p>$Name = $NULL</p>
<p>break</p>
<p>}</p>
<p>}</p>
<p>#CALLOUT A</p>
<p># If no -path parameter, use WMI to collect a list of fixed drives.</p>
<p>if (-not $Path) {</p>
<p>$Path = get-wmiobject Win32_LogicalDisk -filter DriveType=3 | foreach-</p>
<p>object {</p>
<p>$_.DeviceID</p>
<p>}</p>
<p>}</p>
<p>#END CALLOUT A</p>
<p># Convert $Path into an array so we can iterate it.</p>
<p>$Path = @($Path)</p>
<p>#CALLOUT B</p>
<p># If a path ends with &#8220;\&#8221;, append &#8220;*&#8221;. Then, if it doesn&#8217;t end with</p>
<p># &#8220;\*&#8221;, append &#8220;\*&#8221; so each path in the array ends with &#8220;\*&#8221;.</p>
<p>for ($i = 0; $i -lt $Path.Length; $i++) {</p>
<p>if ($Path[$i].EndsWith(&#8220;\&#8221;)) {</p>
<p>$Path[$i] += &#8220;*&#8221;</p>
<p>}</p>
<p>if (-not $Path[$i].EndsWith(&#8220;\*&#8221;)) {</p>
<p>$Path[$i] += &#8220;\*&#8221;</p>
<p>}</p>
<p>}</p>
<p>#END CALLOUT B</p>
<p># If no -LastWriteTimeRange parameter, assume all dates.</p>
<p>if (-not $LastWriteTimeRange) {</p>
<p>$LastWriteTimeRange = @([DateTime]::MinValue, [DateTime]::MaxValue)</p>
<p>}</p>
<p>else {</p>
<p># Convert $LastWriteTimeRange to an array (if it&#8217;s not already).</p>
<p>$LastWriteTimeRange = @($LastWriteTimeRange)</p>
<p># If only one element, add max date as second element.</p>
<p>if ($LastWriteTimeRange.Length -eq 1) {</p>
<p>$LastWriteTimeRange += [DateTime]::MaxValue</p>
<p>}</p>
<p># Zero for first element means [DateTime]::MinValue.</p>
<p>if ($LastWriteTimeRange[0] -eq 0) {</p>
<p>$LastWriteTimeRange[0] = [DateTime]::MinValue</p>
<p>}</p>
<p>#CALLOUT C</p>
<p># Throw an error if [DateTime]::Parse() fails.</p>
<p>trap [System.Management.Automation.MethodException] {</p>
<p>throw &#8220;Error parsing date range. String not recognized as a valid</p>
<p>DateTime.&#8221;</p>
<p>}</p>
<p># Parse the first two array elements as DateTimes.</p>
<p>for ($i = 0; $i -lt 2; $i++) {</p>
<p>$LastWriteTimeRange[$i] = [DateTime]::Parse($LastWriteTimeRange[$i])</p>
<p>}</p>
<p>#END CALLOUT C</p>
<p>}</p>
<p># Throw an error if the date range is invalid.</p>
<p>if ($LastWriteTimeRange[0] -gt $LastWriteTimeRange[1]) {</p>
<p>throw &#8220;Invalid date range. The first date is greater than the second.&#8221;</p>
<p>}</p>
<p># If no -sizerange parameter, assume all sizes.</p>
<p>if (-not $SizeRange) {</p>
<p>$SizeRange = @(0, [UInt64]::MaxValue)</p>
<p>}</p>
<p>else {</p>
<p># Convert $SizeRange to an array (if it&#8217;s not already).</p>
<p>$SizeRange = @($SizeRange)</p>
<p># If no second element, add max value as second element.</p>
<p>if ($SizeRange.Length -eq 1) {</p>
<p>$SizeRange += [UInt64]::MaxValue</p>
<p>}</p>
<p>}</p>
<p>#CALLOUT D</p>
<p># Ensure the elements in the size range are numeric.</p>
<p>for ($i = 0; $i -lt 2; $i++) {</p>
<p>if (-not (isNumeric $SizeRange[$i])) {</p>
<p>throw &#8220;Size range must contain numeric value(s).&#8221;</p>
<p>}</p>
<p>}</p>
<p>#END CALLOUT D</p>
<p># Throw an error if the size range is invalid.</p>
<p>if ($SizeRange[0] -gt $SizeRange[1]) {</p>
<p>throw &#8220;Invalid size range. The first size is greater than the second.&#8221;</p>
<p>}</p>
<p># If both -files and -dirs are missing, assume -files.</p>
<p>if ((-not $Files) -and (-not $Dirs)) {</p>
<p>$Files = $TRUE</p>
<p>}</p>
<p># Keep track of the number of files and their sizes.</p>
<p>$count = $sizes = 0</p>
<p># Use the get-childitem cmdlet to search the file system, and use</p>
<p># the writeItem function to output matching items. For files, check</p>
<p># the date and size ranges. For directories, only the date range is</p>
<p># meaningful.</p>
<p>get-childitem $Path -include $Name -force: $Force -recurse: (-not</p>
<p>$OneLevel) | foreach-object {</p>
<p>if ($Files -and (-not $_.PsIsContainer)) {</p>
<p>if (($_.LastWriteTime -ge $LastWriteTimeRange[0]) -and</p>
<p>($_.LastWriteTime -le $LastWriteTimeRange[1]) -and</p>
<p>($_.Length -ge $SizeRange[0]) -and ($_.Length -le $SizeRange[1])) {</p>
<p>$count++</p>
<p>$sizes += $_.Length</p>
<p>writeItem $_</p>
<p>}</p>
<p>}</p>
<p>if ($Dirs -and ($_.PsIsContainer)) {</p>
<p>if (($_.LastWriteTime -ge $LastWriteTimeRange[0]) -and</p>
<p>($_.LastWriteTime -le $LastWriteTimeRange[1])) {</p>
<p>$count++</p>
<p>writeItem $_</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p># Output statistics if not using -defaultformat.</p>
<p>if (-not $DefaultFormat) {</p>
<p>&#8220;Found {0:N0} item(s), {1:N0} byte(s)&#8221; -f $count, $sizes</p>
<p>}</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timbolton.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timbolton.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timbolton.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timbolton.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timbolton.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timbolton.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timbolton.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timbolton.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timbolton.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timbolton.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timbolton.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timbolton.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timbolton.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timbolton.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timbolton.net&amp;blog=10673686&amp;post=181&amp;subd=timbolton&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timbolton.net/2010/03/05/whereis-with-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://1.gravatar.com/avatar/d499a51084bc367c0c8244e08a9c9eda?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jsclmedave</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2010/03/ps101.jpg" medium="image">
			<media:title type="html">ps101</media:title>
		</media:content>

		<media:content url="http://timbolton.files.wordpress.com/2010/03/ps102.jpg" medium="image">
			<media:title type="html">ps102</media:title>
		</media:content>
	</item>
	</channel>
</rss>
