<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PowerShell Station &#187; Uncategorized</title>
	<atom:link href="http://powershellstation.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://powershellstation.com</link>
	<description>Mike&#039;s PowerShell Musings</description>
	<lastBuildDate>Thu, 05 Apr 2012 03:05:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PowerShell Station issues</title>
		<link>http://powershellstation.com/2011/10/11/powershell-station-issues/</link>
		<comments>http://powershellstation.com/2011/10/11/powershell-station-issues/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 02:53:54 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=343</guid>
		<description><![CDATA[I&#8217;m officially an idiot.  I am in good company, though.  The funny (not really funny) thing, is that I read Jeff&#8217;s post 2 years ago and did absolutely nothing about it.  So when my hosting provider had some issues and rebuilt the server this site is on, I was completely unprepared (i.e. I had no [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m officially an idiot.  I am in <a title="good company" href="http://www.codinghorror.com/blog/2009/12/international-backup-awareness-day.html">good company</a>, though.  The funny (not really funny) thing, is that I read Jeff&#8217;s post 2 years ago and did absolutely nothing about it.  So when my hosting provider had some issues and rebuilt the server this site is on, I was completely unprepared (i.e. I had no recent backups).</p>
<p>Let me say that I&#8217;m very pleased with <a title="nosupportlinuxhosting" href="http://nosupportlinuxhosting.com">nosupportlinuxhosting</a> and especially how they handled this outage.  I was informed promptly about the issue, the solution they were pursuing, and was notified when they server was back online.  For a &#8220;no support&#8221; company, I can definitely say that I&#8217;ve had better responses from them than the previous company that was handling the site.</p>
<p>I hope to have (most of) the posts back online in the next day or 2.  Fortunately I did have a backup from january (ouch), but that was just posts, pages, and comments.  If you receive some posts in your feed reader over the next few days, that&#8217;s probably me adding posts from the last 9 months or so.  I doubt I&#8217;ll be able to reconstruct the comments, so I apologize for that lack.</p>
<p>The easy &#8220;take away&#8221; from this is:  <strong>Make sure you have offsite backups for all of your systems.</strong></p>
<p>The not so easy &#8220;take away&#8221; from this is: <strong>No, really, make sure you have offsite backups for all of your systems.</strong></p>
<p>Maybe I&#8217;ll learn my lesson this time.</p>
<p>Mike</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2011%2F10%2F11%2Fpowershell-station-issues%2F&amp;title=PowerShell%20Station%20issues" id="wpa2a_2"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2011/10/11/powershell-station-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PowerShell Tools and Books That I Use (Revisited)</title>
		<link>http://powershellstation.com/2011/05/19/powershell-tools-and-books-that-i-use-revisited/</link>
		<comments>http://powershellstation.com/2011/05/19/powershell-tools-and-books-that-i-use-revisited/#comments</comments>
		<pubDate>Thu, 19 May 2011 17:38:18 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=354</guid>
		<description><![CDATA[A friend of mine found this blog yesterday and commented on “PowerShellToolsandBooksThatIUse“. I thought that it would be good to update the list since it’s almost 2 years old.  The changes are mostly incremental: version changes, a few new items, a few I don’t use much anymore. Without further ado, here we go (now with [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine found this blog yesterday and commented on “<a href="../2009/09/10/powershell-tools-and-books-that-i-use/">PowerShell</a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/">Tools</a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/">and</a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/">Books</a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/">That</a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/">I</a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/">Use</a>“. I thought that it would be good to update the list since it’s almost 2 years old.  The changes are mostly incremental: version changes, a few new items, a few I don’t use much anymore.</p>
<p>Without further ado, here we go (now with linky-goodness!):</p>
<p>Tools I Use (note…these are all free!):</p>
<ul>
<li>PowerShell ISE (I know it’s part of the install, but I use it a lot!)</li>
<li><a href="http://powergui.org/index.jspa">PowerGUI</a><a href="http://powergui.org/index.jspa">Script</a><a href="http://powergui.org/index.jspa">Editor</a> (I still haven’t gotten the hang of PowerGUI itself)</li>
<li><a href="http://pscx.codeplex.com/">Powershell</a><a href="http://pscx.codeplex.com/">Community</a><a href="http://pscx.codeplex.com/">Extensions</a><a href="http://pscx.codeplex.com/"> 2.0</a> (PSCX)</li>
<li><a href="http://sqlpsx.codeplex.com/">SQL</a><a href="http://sqlpsx.codeplex.com/">PowerShell</a><a href="http://sqlpsx.codeplex.com/">Extensions</a><a href="http://sqlpsx.codeplex.com/"> 2.3</a> (SQLPSX)</li>
<li><a href="http://www.sapien.com/downloads">PrimalForms</a><a href="http://www.sapien.com/downloads">Community</a><a href="http://www.sapien.com/downloads">Edition</a> (free registration required) Download under “Free Tools/32-bit”</li>
</ul>
<p>Books:</p>
<ul>
<li><a href="http://www.manning.com/payette2/">PowerShell</a><a href="http://www.manning.com/payette2/">In</a><a href="http://www.manning.com/payette2/">Action</a><a href="http://www.manning.com/payette2/">,2</a><a href="http://www.manning.com/payette2/">nd</a><a href="http://www.manning.com/payette2/">Edition</a> by Bruce Payette (just released yesterday, 5/18!)</li>
<li><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">Professional</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">Windows</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">PowerShell</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">Programming</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">: </a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">Snapins</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">, </a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">Cmdlets</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">, </a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">Hosts</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">and</a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939">Providers</a> by Arul Kumaravel et. al. (PowerShell 1.0, but still has good info about building hosts)</li>
<li><a href="http://powershell.com/cs/blogs/ebook/">Mastering</a><a href="http://powershell.com/cs/blogs/ebook/">PowerShell</a> by Dr. Tobias Weltner</li>
<li><a href="http://www.manning.com/siddaway/">PowerShell</a><a href="http://www.manning.com/siddaway/">in</a><a href="http://www.manning.com/siddaway/">Practice</a>, by Richard Siddaway</li>
</ul>
<p>In addition to these, there are any number of blogs (I really need to update <a href="../blogs/">my</a><a href="../blogs/">list</a>) that I subscribe to in google reader. Also, there’s a very active community on <a href="http://stackoverflow.com/questions/tagged/powershell">StackOverflow</a> that will usually be able to provide direction if you’re not sure what’s going on.</p>
<p>As I said the last time, there are lots of other tools and books, but these are the ones I keep coming back to.</p>
<p>Let me know if you think I missed something super-important.</p>
<p>Mike</p>
<p><!--[if gte mso 9]><xml><br />
 <o:OfficeDocumentSettings><br />
  <o:TargetScreenSize>800&#215;600</o:TargetScreenSize><br />
 </o:OfficeDocumentSettings><br />
</xml><![endif]--><!--[if gte mso 9]><xml><br />
 <w:WordDocument><br />
  <w:View>Normal</w:View><br />
  <w:Zoom>0</w:Zoom><br />
  <w:TrackMoves/><br />
  <w:TrackFormatting/><br />
  <w:PunctuationKerning/><br />
  <w:ValidateAgainstSchemas/><br />
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><br />
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent><br />
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><br />
  <w:DoNotPromoteQF/><br />
  <w:LidThemeOther>EN-US</w:LidThemeOther><br />
  <w:LidThemeAsian>X-NONE</w:LidThemeAsian><br />
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><br />
  <w:Compatibility><br />
   <w:BreakWrappedTables/><br />
   <w:SnapToGridInCell/><br />
   <w:WrapTextWithPunct/><br />
   <w:UseAsianBreakRules/><br />
   <w:DontGrowAutofit/><br />
   <w:SplitPgBreakAndParaMark/><br />
   <w:EnableOpenTypeKerning/><br />
   <w:DontFlipMirrorIndents/><br />
   <w:OverrideTableStyleHps/><br />
  </w:Compatibility><br />
  <w:DoNotOptimizeForBrowser/><br />
  <m:mathPr><br />
   <m:mathFont m:val="Cambria Math"/><br />
   <m:brkBin m:val="before"/><br />
   <m:brkBinSub m:val="&#45;-"/><br />
   <m:smallFrac m:val="off"/><br />
   <m:dispDef/><br />
   <m:lMargin m:val="0"/><br />
   <m:rMargin m:val="0"/><br />
   <m:defJc m:val="centerGroup"/><br />
   <m:wrapIndent m:val="1440"/><br />
   <m:intLim m:val="subSup"/><br />
   <m:naryLim m:val="undOvr"/><br />
  </m:mathPr></w:WordDocument><br />
</xml><![endif]--><!--[if gte mso 9]><xml><br />
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"<br />
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"<br />
  LatentStyleCount="267"><br />
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/><br />
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/><br />
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/><br />
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/><br />
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/><br />
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Title"/><br />
  <w:LsdException Locked="false" Priority="0" Name="Default Paragraph Font"/><br />
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/><br />
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/><br />
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/><br />
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Table Grid"/><br />
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/><br />
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/><br />
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Shading"/><br />
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light List"/><br />
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Grid"/><br />
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 1"/><br />
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 2"/><br />
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 1"/><br />
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 2"/><br />
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 1"/><br />
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 2"/><br />
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 3"/><br />
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Dark List"/><br />
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Shading"/><br />
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful List"/><br />
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Grid"/><br />
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/><br />
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light List Accent 1"/><br />
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/><br />
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/><br />
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/><br />
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/><br />
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/><br />
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/><br />
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/><br />
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/><br />
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/><br />
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/><br />
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/><br />
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/><br />
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Dark List Accent 1"/><br />
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/><br />
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/><br />
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/><br />
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/><br />
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light List Accent 2"/><br />
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/><br />
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/><br />
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/><br />
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/><br />
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/><br />
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/><br />
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/><br />
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/><br />
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Dark List Accent 2"/><br />
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/><br />
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/><br />
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/><br />
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/><br />
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light List Accent 3"/><br />
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/><br />
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/><br />
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/><br />
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/><br />
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/><br />
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/><br />
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/><br />
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/><br />
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Dark List Accent 3"/><br />
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/><br />
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/><br />
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/><br />
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/><br />
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light List Accent 4"/><br />
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/><br />
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/><br />
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/><br />
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/><br />
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/><br />
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/><br />
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/><br />
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/><br />
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Dark List Accent 4"/><br />
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/><br />
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/><br />
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/><br />
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/><br />
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light List Accent 5"/><br />
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/><br />
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/><br />
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/><br />
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/><br />
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/><br />
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/><br />
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/><br />
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/><br />
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Dark List Accent 5"/><br />
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/><br />
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/><br />
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/><br />
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/><br />
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light List Accent 6"/><br />
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/><br />
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/><br />
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/><br />
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/><br />
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/><br />
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/><br />
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/><br />
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/><br />
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Dark List Accent 6"/><br />
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/><br />
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/><br />
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"<br />
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/><br />
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/><br />
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/><br />
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/><br />
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/><br />
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"<br />
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/><br />
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/><br />
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/><br />
 </w:LatentStyles><br />
</xml><![endif]--><!--[if gte mso 10]></p>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
</style>
<p><![endif]--></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">A friend of mine found this blog yesterday and commented on “</span><a href="../2009/09/10/powershell-tools-and-books-that-i-use/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PowerShell</span></a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Tools</span></a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">and</span></a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Books</span></a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">That</span></a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">I</span></a><a href="../2009/09/10/powershell-tools-and-books-that-i-use/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Use</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">“. I thought that it would be good to update the list since it’s almost 2 years old.  The changes are mostly incremental: version changes, a few new items, a few I don’t use much anymore.</span></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Without further ado, here we go (now with linky-goodness!):</span></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Tools I Use (note…these are all free!):</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">PowerShell ISE (I know it’s part of the install, but I use it a lot!)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://powergui.org/index.jspa"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PowerGUI</span></a><a href="http://powergui.org/index.jspa"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Script</span></a><a href="http://powergui.org/index.jspa"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Editor</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> (I still haven’t gotten the hang of PowerGUI itself)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://pscx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Powershell</span></a><a href="http://pscx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Community</span></a><a href="http://pscx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Extensions</span></a><a href="http://pscx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;"> 2.0</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> (PSCX)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://sqlpsx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">SQL</span></a><a href="http://sqlpsx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PowerShell</span></a><a href="http://sqlpsx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Extensions</span></a><a href="http://sqlpsx.codeplex.com/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;"> 2.3</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> (SQLPSX)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://www.sapien.com/downloads"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PrimalForms</span></a><a href="http://www.sapien.com/downloads"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Community</span></a><a href="http://www.sapien.com/downloads"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Edition</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> (free registration required) Download under “Free Tools/32-bit”</span></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Books:</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://www.manning.com/payette2/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PowerShell</span></a><a href="http://www.manning.com/payette2/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">In</span></a><a href="http://www.manning.com/payette2/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Action</span></a><a href="http://www.manning.com/payette2/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">,2</span></a><a href="http://www.manning.com/payette2/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">nd</span></a><a href="http://www.manning.com/payette2/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Edition</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> by Bruce Payette (just released yesterday, 5/18!)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Professional</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Windows</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PowerShell</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Programming</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">: </span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Snapins</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">, </span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Cmdlets</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">, </span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Hosts</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">and</span></a><a href="http://www.amazon.com/Professional-Windows-PowerShell-Programming-Providers/dp/0470173939"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Providers</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> by Arul Kumaravel et. al. (PowerShell 1.0, but still has good info about building hosts)</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://powershell.com/cs/blogs/ebook/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Mastering</span></a><a href="http://powershell.com/cs/blogs/ebook/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PowerShell</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> by Dr. Tobias Weltner</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0.0001pt 0.5in; text-indent: -0.25in; line-height: normal;"><span style="font-size: 10pt; font-family: 'Verdana','sans-serif';"><span>●<span style="font: 7pt 'Times New Roman';">      </span></span></span><a href="http://www.manning.com/siddaway/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">PowerShell</span></a><a href="http://www.manning.com/siddaway/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">in</span></a><a href="http://www.manning.com/siddaway/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">Practice</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">, by Richard Siddaway</span></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">In addition to these, there are any number of blogs (I really need to update </span><a href="../blogs/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">my</span></a><a href="../blogs/"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">list</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">) that I subscribe to in google reader. Also, there’s a very active community on </span><a href="http://stackoverflow.com/questions/tagged/powershell"><span style="font-size: 12pt; font-family: 'Times New Roman','serif'; color: blue;">StackOverflow</span></a><span style="font-size: 12pt; font-family: 'Times New Roman','serif';"> that will usually be able to provide direction if you’re not sure what’s going on.</span></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">As I said the last time, there are lots of other tools and books, but these are the ones I keep coming back to.</span></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Let me know if you think I missed something super-important.</span></p>
<p class="MsoNormal" style="margin: 5pt 0in; line-height: normal;"><span style="font-size: 12pt; font-family: 'Times New Roman','serif';">Mike</span></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2011%2F05%2F19%2Fpowershell-tools-and-books-that-i-use-revisited%2F&amp;title=PowerShell%20Tools%20and%20Books%20That%20I%20Use%20%28Revisited%29" id="wpa2a_4"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2011/05/19/powershell-tools-and-books-that-i-use-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A few functions for working with SQL Agent Job data</title>
		<link>http://powershellstation.com/2011/05/09/a-few-functions-for-working-with-sql-agent-job-data/</link>
		<comments>http://powershellstation.com/2011/05/09/a-few-functions-for-working-with-sql-agent-job-data/#comments</comments>
		<pubDate>Tue, 10 May 2011 02:04:39 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/wordpress/?p=338</guid>
		<description><![CDATA[If you’ve ever looked at sysjobhistory, you know that the way SQL Server stores datetimes and durations in this table are not very friendly. Well, that’s not quite true. They are human-readable if they are small, but if you’ve got a job that runs for hours (days?), it becomes more and more difficult. For example, [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve ever looked at sysjobhistory, you know that the way SQL Server stores datetimes and durations in this table are not very friendly. Well, that’s not quite true. They are human-readable if they are small, but if you’ve got a job that runs for hours (days?), it becomes more and more difficult.<br />
For example, a job which started at 9:05AM today (5/9/2011) would have a run_time of 905 and a run_date of 20110905. Both of those are recognizable, but since they are integers, it’s complicated to get them into a datetime variable in PowerShell in order to manipulate them. I have seen several posts on how to create a UDF (user-defined function) to convert these values to a datetime, and that’s usually a good solution. Unfortunately, it’s not always possible (politically) to create a UDF on a SQL instance. For example, if you are simply monitoring a box to make sure that backups are run, and don’t have much control over the box besides that function, you might not be allowed to create the necessary UDFs. Similarly, a SQL solution involving a select statement that kneads the data into the value you want is not a great solution because it’s not reusable, except in the cut-paste sense.<br />
For that reason, I have written 4 different functions to assist with managing job data.</p>
<pre class="brush:powershell">
function convertfrom-SqlAgentDuration{
param($sql_duration)
    return New-TimeSpan -seconds ($sql_duration % 100) -minutes (($sql_duration / 100) % 100) -hours ($sql_duration /10000)
}

function convertfrom-SQLAgentDateTime{
param($sql_startdate,$sql_starttime)
    return (get-date -year ($sql_startdate/10000) -month ($sql_startdate/100 % 100) -day ($sql_startdate %100) -hour ($sql_starttime/10000 % 100) -minute ($sql_starttime/100 % 100) -sec ($sql_starttime % 100))
}

function convertto-SQLAgentDuration{
param([System.TimeSpan]$duration)
    return $duration.seconds+100*$duration.minutes+10000*($duration.hours+24*$duration.days)
}

function convertto-SQLAgentDateTime{
param([datetime]$date)
    return (new-object PSObject -property @{date=[int](get-date $date -uformat "%Y%m%d");time=[int](get-date $date -uformat "%H%M%S")})
}
</pre>
<p>Obviously, these are not high-performance functions, but given the volume of data you would be getting out of the SQL Agent, that shouldn’t pose any kind of problem. Here are some example usages:</p>
<pre>
PS>get-date

Monday, May 09, 2011 9:01:58 PM
_________________________________________________________________________________
PS>convertto-sqlagentdatetime (get-date) | ft -auto

    date   time
    ----   ----
20110509 210648
_________________________________________________________________________________
PS>convertfrom-sqlagentdatetime 20110509 210648

Monday, May 09, 2011 9:06:48 PM
_________________________________________________________________________________
PS>convertfrom-SqlAgentDuration 12345

Days              : 0
Hours             : 1
Minutes           : 23
Seconds           : 45
Milliseconds      : 0
Ticks             : 50250000000
TotalDays         : 0.0581597222222222
TotalHours        : 1.39583333333333
TotalMinutes      : 83.75
TotalSeconds      : 5025
TotalMilliseconds : 5025000
</pre>
<p>I hope these functions are useful to you. Let me know what you think.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2011%2F05%2F09%2Fa-few-functions-for-working-with-sql-agent-job-data%2F&amp;title=A%20few%20functions%20for%20working%20with%20SQL%20Agent%20Job%20data" id="wpa2a_6"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2011/05/09/a-few-functions-for-working-with-sql-agent-job-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershellstation.com has moved</title>
		<link>http://powershellstation.com/2011/01/30/powershellstation-com-has-moved/</link>
		<comments>http://powershellstation.com/2011/01/30/powershellstation-com-has-moved/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 21:58:20 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=350</guid>
		<description><![CDATA[I mentioned a while back that I was thinking about moving my site to NoSupportLinuxHosting.com.  They offer $1 per month basic shared hosting with the caveat that they don’t provide tech support.  Since I’m not doing anything fancy on this site (i.e. hosting wordpress only), and I’m not to the point where I need to [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned a while back that I was thinking about moving my site to NoSupportLinuxHosting.com.  They offer $1 per month basic shared hosting with the caveat that they don’t provide tech support.  Since I’m not doing anything fancy on this site (i.e. hosting wordpress only), and I’m not to the point where I need to be concerned about storage or bandwidth, it seemed like a good fit.  I’ve not had any real issues with my previous host (godaddy.com…yes, I know), but figured I could be saving a bit of money.</p>
<p>If you’re reading this, the transformation went well.  It only took 30-ish minutes to accomplish.</p>
<p>Let me know if you find something missing or not working.</p>
<p>Mike</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2011%2F01%2F30%2Fpowershellstation-com-has-moved%2F&amp;title=Powershellstation.com%20has%20moved" id="wpa2a_8"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2011/01/30/powershellstation-com-has-moved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy (Belated) Anniversary!</title>
		<link>http://powershellstation.com/2010/10/07/happy-belated-anniversary/</link>
		<comments>http://powershellstation.com/2010/10/07/happy-belated-anniversary/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 03:06:50 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=309</guid>
		<description><![CDATA[I didn’t manage to post anything on the 1 year anniversary of powershellstation.com, but I did remember.  I was hoping to have posted more, but all in all, it wasn’t a bad year.  I have some plans for this year: Write a post or 2 about remoting Kill off the powershellworkbench project (I can’t stand writing [...]]]></description>
			<content:encoded><![CDATA[<p>I didn’t manage to post anything on the 1 year anniversary of powershellstation.com, but I did remember.  I was hoping to have posted more, but all in all, it wasn’t a bad year.  I have some plans for this year:</p>
<ul>
<li>Write a post or 2 about remoting</li>
<li>Kill off the powershellworkbench project (I can’t stand writing WPF)</li>
<li>Start a new host project using Windows Forms and the Puzzle.SyntaxBox edit control (probably using C#)</li>
<li>Update the Books/Tools/Sites pages (and keep them more or less up to date)</li>
</ul>
<p>I was really hoping that there would be some interest in the powershellworkbench project, but I’ve not heard anything (except for a comment that there were some missing icons).  Since I really didn’t enjoy writing WPF code (I might like it if I did a lot of it, but this is a hobby project), I don’t see much of a future for that project.  I am comfortable with Windows Forms, though, so I’ll be rebooting that project with a new name.  I’m also going to switch to the Puzzle.SyntaxBox control, because I know it will do the things I need to and not get in the way.  I haven’t found a similar component that wasn’t extremely complicated.  My goal with the project is to make something that an administrator with limited time could customize for their environment.  I’m afraid that the complexity of WPF and the Avalon controls would make that improbable at best.</p>
<p>I was also hoping that there would be more feedback.  I’m sure that this is a common frustration among bloggers (especially bloggers in a niche like this), so I’m not going to worry about that.  I am, however, going to make a concerted effort to comment on blogs that I read.  If you have any comments, they are always welcome.  If you have suggestions on topics, I’m open to that, as well.</p>
<p>One final thing.  I’ve been thinking about moving my blog to “<a href="http://www.nosupportlinuxhosting.com/">No Support Linux Hosting</a>”.  I’m not a Linux expert, but they have a WordPress setup tutorial, and you can’t beat $1 per month.  If I do change, I hope I can do it without any disruption, but who knows?</p>
<p>-Mike</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2010%2F10%2F07%2Fhappy-belated-anniversary%2F&amp;title=Happy%20%28Belated%29%20Anniversary%21" id="wpa2a_10"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2010/10/07/happy-belated-anniversary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My new favorite cmdlet: set-strictmode</title>
		<link>http://powershellstation.com/2010/08/18/my-new-favorite-cmdlet-set-strictmode/</link>
		<comments>http://powershellstation.com/2010/08/18/my-new-favorite-cmdlet-set-strictmode/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 19:42:50 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=304</guid>
		<description><![CDATA[If you’ve ever written Visual Basic or VB.Net code, you’re aware that it’s highly recommended that you use “Option Strict” in all of your code.&#160; Similarly, Perl scripters have a “use strict” that comes highly suggested. The idea of these options is that there’s quite a bit of flexibility built into these languages, and sometimes [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve ever written Visual Basic or VB.Net code, you’re aware that it’s highly recommended that you use “Option Strict” in all of your code.&#160; Similarly, Perl scripters have a “use strict” that comes highly suggested.</p>
<p>The idea of these options is that there’s quite a bit of flexibility built into these languages, and sometimes that flexibility backfires on you.&#160; Using these options actually limits the flexibility of the languages in question in ways that help coders to keep from making certain types of mistakes in their code.&#160; Writing code professionally in VB.Net (you may scoff, but it happens quite a lot) or Perl (it’s not my language of choice, but again, there’s a lot out there) without using these options is not a good idea at all.</p>
<p>I’ve been writing code in PowerShell for about 2 years, and have probably written about 10,000 lines, mostly code that’s used on a daily basis.&#160; I’ve read several PowerShell books, online tutorials, and watched several webcasts.&#160; I may have not been paying attention, but I’ve completely missed any emphasis on the analogous option in PowerShell, “set-strictmode”.&#160; One of my co-workers asked if there was something like this in PowerShell, and I found it almost instantly.&#160; Google, and the PowerShell help file both explain how the cmdlet works.&#160; He and I started using it, and to our dismay, found dozens of errors in code that we had been trusting, in some case, for over a year.</p>
<p>First of all, let me explain that I’m not complaining that there’s not any information about how set-strictmode works in the “ecology” of the PowerShell community.&#160; I’m confident that each book and tutorial explains how this cmdlet works.&#160; What I’m concerned about is how I could have read as much as I have from as many people are talking about PowerShell without hearing anyone (or everyone) shouting at the top of their collective voices, “Add this to your profile…it will save you countless hours and tears in the long run”.&#160; Hopefully, I’ve just missed it, and everyone has been saying this all along.&#160; In case this has not been the case, let me say:</p>
<p><span style="font-size: x-large">Add set-strictmode to your profile.</span></p>
<p><span style="font-size: x-large">It will save you countless hours and tears in the long run.</span></p>
<p>So….how do I use set-strictmode, and what does it help with?&#160; First, to turn on “strict mode” you need to decide which version of strictmode you want.&#160; The options are:</p>
<table border="1" cellspacing="0" cellpadding="2" width="565">
<tbody>
<tr>
<td valign="top" width="200">Version</td>
<td valign="top" width="363">Effect</td>
</tr>
<tr>
<td valign="top" width="200">1.0</td>
<td valign="top" width="363">References to uninitialized variables(except in a string) are errors</td>
</tr>
<tr>
<td valign="top" width="200">2.0</td>
<td valign="top" width="363">
<ul>
<li>References to uninitialized variables(including in a string) are errors </li>
<li>References to undefined properties are errors </li>
<li>Calling a function using method-call syntax is an error </li>
<li>${} (an un-named variable) is a syntax error </li>
</ul>
</td>
</tr>
<tr>
<td valign="top" width="200">Latest</td>
<td valign="top" width="363">Uses the most strict mode available for this version of PowerShell.&#160; (Currently the same as 2.0)</td>
</tr>
</tbody>
</table>
<p>I would advise that you use “set-strictmode –version Latest” in your profile.</p>
<p>Let’s look at the different restrictions.&#160; First, if you’ve written any PowerShell scripts, you’re aware that you don’t have to declare your variables.&#160; That’s a “good thing”, and strictmode 1.0 doesn’t change that in any way.&#160; What it does do is make sure that you’re not retrieving values from variables you haven’t assigned anything to.&#160; Here’s some sample code that strictmode will choke on.</p>
<pre class="brush: powershell">$servername=read-host -prompt &quot;Enter name of server&quot;
$wmi=get-wmiobject -class Win32_Service -computername $server_name</pre>
<p>This is a pretty simple example, but it’s almost certain that sooner or later you’ll typo a variable name in a script.&#160; Strictmode will help keep you from getting in this kind of trouble.&#160; With strictmode Version 1.0, you won’t be warned about using uninitialized variables in double-quoted string, e.g. “Server=$server_name”…(they’ll be replaced with $null).&#160; Version 2.0 will cause references to uninitialized variablesinside strings to be an error as well.</p>
<p>Here’s an example of code that illustrates property restrictions in StrictMode 2.0.</p>
<pre class="brush: powershell">$servername=&quot;Server123&quot;
$length=$servername.lenght</pre>
<p>I would write up an example of using the method-call syntax for a function, but Thomas Lee just <a href="http://tfl09.blogspot.com/2010/09/calling-functions-in-powershell.html">blogged about this</a> in his blog <a href="http://tfl09.blogspot.com/">Under the Stairs</a>.</p>
<p>The final “restriction” in strict mode 2.0 says that you can’t have a variable with no name.&#160; The syntax ${varname} is a way of expressing $varname, when varname contains characters that are not generally allowed in variable names.&#160; I haven’t ever had a really convincing use for this syntax (I’ve thought about using it to associate variables with filenames using the full path as the variable name, but it seems like a dictionary would be cleaner).</p>
<p>I should note that <a href="http://leeholmes.com/blog/">Lee Holmes</a> has done a great thing in his recently published <a href="http://www.leeholmes.com/blog/PowerShellCookbookV2NowAvailable.aspx">PowerShell Cookbook V2</a>.&#160; Each script in the cookbook starts with “set-strictmode –version Latest”.&#160;&#160; In my opinion, this is a best practice.</p>
<p>If you’re just now hearing about set-strictmode for the first time, and already have a body of powershell scripts in your toolbox (I’m in this category), I’d recommend the following steps:</p>
<ol>
<li>Add set-strictmode –version Latest to the profile on the machine you do your script development on</li>
<li>Add set-strictmode –version Latest&#160; to any scripts you create from this time forward</li>
<li>Add set-strictmode –version Latest to scripts that you have tested to make sure they comply with strictmode.</li>
</ol>
<p>I’m going to avoid turning on strictmode on servers that I’m running PowerShell on for now, because I’m sure stuff will break.&#160; I’m slowly refurbishing scripts as I run them on my development box and see the strictmode errors pop up, and since set-strictmode is a scoped change (if you set it in a script or function, it reverts to the old setting when you exit the script or function), I can take advantage of it in a script-by-script basis.</p>
<p>If you are just starting to build a PowerShell script library, I would recommend turning strictmode on in the profile on every machine that you run PowerShell scripts.&#160; You’ll be glad you did.</p>
<p>Hopefully this was not too much of a rant.&#160; Please let me know what experiences you’ve had with with set-strictmode.</p>
<p>Mike</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2010%2F08%2F18%2Fmy-new-favorite-cmdlet-set-strictmode%2F&amp;title=My%20new%20favorite%20cmdlet%3A%20set-strictmode" id="wpa2a_12"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2010/08/18/my-new-favorite-cmdlet-set-strictmode/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PowerShell and MongoDB</title>
		<link>http://powershellstation.com/2010/08/10/powershell-and-mongodb/</link>
		<comments>http://powershellstation.com/2010/08/10/powershell-and-mongodb/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 02:23:31 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=293</guid>
		<description><![CDATA[I recently saw this link on using NoSQL with Windows.  Now, I&#8217;m a SQL Server DBA, so I haven&#8217;t really had any reason to use NoSQL.  I was curious about how easy it was going to be to set up and if I could get it working with PowerShell. I selected MongoDB from the list [...]]]></description>
			<content:encoded><![CDATA[<p>I recently saw <a title="this link" href="http://www.dotnetconvo.com/post/view/2010/8/9/nosql-on-the-microsoft-platform">this link</a> on using NoSQL with Windows.  Now, I&#8217;m a SQL Server DBA, so I haven&#8217;t really had any reason to use NoSQL.  I was curious about how easy it was going to be to set up and if I could get it working with PowerShell.</p>
<p>I selected MongoDB from the list because it looked more like something that would be used on smaller-scale projects.</p>
<p>I then googled &#8220;MongoDB PowerShell&#8221; and found <a title="this link" href="http://www.dougfinke.com/blog/index.php/2009/10/25/how-to-use-mongodb-from-powershell-and-f/">this link</a> from Doug Finke about using MongoDB with PowerShell (and F#, which is another &#8220;cool thing&#8221; I haven&#8217;t managed to find a need for).  Doug links to <a title="another article" href="http://odetocode.com/blogs/scott/archive/2009/10/13/experimenting-with-mongodb-from-c.aspx">another article</a> which explains setting up MongoDB and an open-source .Net driver for MongoDB called <a title="mongo-csharp" href="http://github.com/samus/mongodb-csharp">mongo-csharp</a>.  He then follows up with a straight-forward script showing simple usage of MongoDB.  It looks like an almost literal translation of the C# code from the article he references.  With those in hand, I thought it was going to be a slam dunk.</p>
<p>It was, but I had a few hurdles to get over before I could get it working.  There weren&#8217;t any problems with the code;  it was written about a year ago, so it was using PowerShell 1.0 and an older version of mongo-csharp.  I had to update the script in a couple of places to make it work.  I probably wouldn&#8217;t even write it up, given how minor the changes are, but I was somewhat disappointed with the number of hits I got for &#8220;MongoDB PowerShell&#8221;.</p>
<p>Here&#8217;s the updated script:</p>
<pre class="brush: powershell">add-type -Path .MongoDB.Driver.dll

$mongo=new-object mongodb.driver.mongo
$mongo.connect()
$db=$mongo.GetDataBase("movieReviews")
$movies=$db.GetCollection('Movies')

$movie=new-object Mongodb.driver.document
$movie['title']='Star Wars'
$movie['releaseDate']=get-date
$movies.Insert($movie)

$spec=new-object Mongodb.driver.document
$spec['title']='Star Wars'
$movies.FindOne($spec)
</pre>
<p>The two changes were</p>
<ol>
<li>added the parameter name (-path) to add-type, since the default param is looking for an assembly name, not a path to a DLL</li>
<li>changed $mongo.GetDB to $mongo.GetDatabase to reflect a change in the driver</li>
</ol>
<p>Worked fine.  Not sure how I&#8217;ll use this, but if I need to, I know I can from PowerShell.</p>
<p>-Mike</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2010%2F08%2F10%2Fpowershell-and-mongodb%2F&amp;title=PowerShell%20and%20MongoDB" id="wpa2a_14"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2010/08/10/powershell-and-mongodb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Identity Function</title>
		<link>http://powershellstation.com/2010/08/01/the-identity-function/</link>
		<comments>http://powershellstation.com/2010/08/01/the-identity-function/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 02:44:20 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=284</guid>
		<description><![CDATA[In mathematics, an identity function is a function that returns the arguments that are passed to it unchanged.  While the concept of an identity function is quite often useful in formulating proofs, it is not something that I ever expected to use in a programming environment.   Here&#8217;s the identity function written in PowerShell: function identity{ [...]]]></description>
			<content:encoded><![CDATA[<p>In mathematics, an <a title="identity function" href="http://en.wikipedia.org/wiki/Identity_function">identity function</a> is a function that returns the arguments that are passed to it unchanged.  While the concept of an identity function is quite often useful in formulating proofs, it is not something that I ever expected to use in a programming environment.   Here&#8217;s the identity function written in PowerShell:</p>
<pre class="brush:powershell">
function identity{
    return $args
}
</pre>
<p>The surprising thing about this function is that it&#8217;s actually pretty useful.  PowerShell&#8217;s array literal syntax is considerably more involved than it&#8217;s argument syntax.  Using this function lets us do this:</p>
<pre class="brush:powershell">identity arg1 arg2 arg3</pre>
<p>instead of this:</p>
<pre class="brush:powershell">@('arg1','arg2','arg3')</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2010%2F08%2F01%2Fthe-identity-function%2F&amp;title=The%20Identity%20Function" id="wpa2a_16"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2010/08/01/the-identity-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Versions of PowerShell Community Extensions (PSCX) and SQL PowerShell Extensions (SQLPSX)</title>
		<link>http://powershellstation.com/2010/05/19/new-versions-of-pscx-and-sqlpsx/</link>
		<comments>http://powershellstation.com/2010/05/19/new-versions-of-pscx-and-sqlpsx/#comments</comments>
		<pubDate>Wed, 19 May 2010 13:00:37 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=279</guid>
		<description><![CDATA[In case you haven&#8217;t heard, the PowerShell Community Exetensions (PSCX) and SQL PowerShell Extensions (SQLPSX) projects have both recently released version 2.0 (and each followed shortly after with quick bug fixes). Both 2.0 releases are module-based and include advanced functions to solve lots of frequently encountered problems. If you haven&#8217;t ever used these toolsets, I [...]]]></description>
			<content:encoded><![CDATA[<p>In case you haven&#8217;t heard, the PowerShell Community Exetensions (PSCX) and SQL PowerShell Extensions (SQLPSX) projects have both recently released version 2.0 (and each followed shortly after with quick bug fixes).  Both 2.0 releases are module-based and include advanced functions to solve lots of frequently encountered problems.  If you haven&#8217;t ever used these toolsets, I would recommend giving them a try.</p>
<p><a href="http://pscx.codeplex.com">PowerShell Community Extensions</a></p>
<p><a href="http://sqlpsx.codeplex.com/">SQL PowerShell Extensions</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2010%2F05%2F19%2Fnew-versions-of-pscx-and-sqlpsx%2F&amp;title=New%20Versions%20of%20PowerShell%20Community%20Extensions%20%28PSCX%29%20and%20SQL%20PowerShell%20Extensions%20%28SQLPSX%29" id="wpa2a_18"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2010/05/19/new-versions-of-pscx-and-sqlpsx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passing Predicates as Parameters in PowerShell</title>
		<link>http://powershellstation.com/2010/05/18/passing-predicates-as-parameters-in-powershell/</link>
		<comments>http://powershellstation.com/2010/05/18/passing-predicates-as-parameters-in-powershell/#comments</comments>
		<pubDate>Wed, 19 May 2010 02:30:33 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=275</guid>
		<description><![CDATA[This is just a quick trick that I figured out today. I had a process that manipulated a dataset, and I needed to be able to change the process to allow me to filter the data that was processed. Also, it wasn&#8217;t clear exactly what kind of filter would specifically be needed in any given [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick trick that I figured out today.  I had a process that manipulated a dataset, and I needed to be able to change the process to allow me to filter the data that was processed.  Also, it wasn&#8217;t clear exactly what kind of filter would specifically be needed in any given scenario.</p>
<p>Normally, I would just filter the data using <strong>where-object</strong> and pass it in to the function in question.  The problem here was that the data retrieval was somewhat cumbersome, and I didn&#8217;t want to push that complexity outside of the function.  And since the filtering criteria wasn&#8217;t clear-cut, I couldn&#8217;t (and didn&#8217;t want to) use a bunch of switches and parameters along with a nest of if/else conditions.</p>
<p>What I wanted, was to pass a predicate (an expression that would evaluate to true or false depending on whether I want a row in the dataset) in to the function.  Essentially, I wanted to insert a <strong>where-object</strong> into the middle of the function.</p>
<p>Amazingly, PowerShell allows me to do that.  The code looks a bit strange to me at first, but it works very well and isn&#8217;t complicated at all.</p>
<p>Here&#8217;s an example:</p>
<pre class="brush: powershell">
function process-data{
Param( [scriptblock]$filter = {$true})

	#retrieve the data

	#filter the data
	$data = $data | where-object $filter

	#process the data
}

process-data -filter {$_.UpdatedDateTime -gt (get-date '1/1/2010')}
</pre>
<p>It&#8217;s not earth-shattering, but I think this will come in handy in several places for me.</p>
<p>Let me know what you think.</p>
<p>-Mike</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2010%2F05%2F18%2Fpassing-predicates-as-parameters-in-powershell%2F&amp;title=Passing%20Predicates%20as%20Parameters%20in%20PowerShell" id="wpa2a_20"><img src="http://powershellstation.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://powershellstation.com/2010/05/18/passing-predicates-as-parameters-in-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  powershellstation.com/category/uncategorized/feed/ ) in 0.29358 seconds, on May 20th, 2012 at 1:26 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on May 21st, 2012 at 1:26 am UTC -->
