<?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; Tools</title>
	<atom:link href="http://powershellstation.com/category/tools/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>Verifying Automation</title>
		<link>http://powershellstation.com/2011/01/06/verifying-automation/</link>
		<comments>http://powershellstation.com/2011/01/06/verifying-automation/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 00:59:16 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Scheduled Tasks]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=317</guid>
		<description><![CDATA[If you&#8217;re anything like me, you&#8217;ve been bitten by the PowerShell bug and are using it among other automation sources to make you life in IT much more enjoyable. If this is not the case&#8230;you need to get started!&#160; There&#8217;s no time like the present, and a PowerShell New Year&#8217;s resolution should be something to [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re anything like me, you&#8217;ve been bitten by the PowerShell bug and are using it among other automation sources to make you life in IT much more enjoyable.  If this is not the case&#8230;you need to get started!&nbsp; There&#8217;s no time like the present, and a PowerShell New Year&#8217;s resolution should be something to consider.</p>
<p>For those of you that are with me in the PowerShell camp, I have something that I&#8217;d like to discuss.&nbsp; You probably have hundreds (dozens?) of scripts scheduled on multiple servers, possibly in multiple domains or geographical locations to perform things like these:</p>
<ul>
<li>Gather information about servers</li>
<li>Generate reports about application usage</li>
<li>Copy information from one place to another</li>
<li>Validate security setup</li>
<li>Start and Stop processes</li>
<li>Scan log files for error conditions</li>
<li>Lots of other things (you get the point)</li>
</ul>
<p>How do you know that the scripts that you have written carefully and scheduled are actually running successfully?&nbsp; At first, this seems like a silly question.&nbsp; When you deployed the script, surely you ran it once to make sure it worked.&nbsp; What could have gone wrong?</p>
<p>Here are some examples that come to mind:</p>
<ul>
<li>A policy was pushed which set the execution policy to Restricted</li>
<li>The credentials you scheduled the script with have been revoked</li>
<li>A file share that the scripts depend on is unavailable</li>
<li>Firewall rules change and now WMI queries aren&#8217;t working</li>
<li>The Task Scheduler service is stopped</li>
</ul>
<p>You can probably think of a lot more examples of things that would keep scripts from working, but you get the idea.&nbsp; I&#8217;ve given some thought to how to do this, but haven&#8217;t come to any real conclusions.&nbsp; Obviously, having your scripts log results is helpful, but only if you monitor the logs for success/failure.&nbsp; Also, if you have a script which is supposed to run every 10 minutes, it doesn&#8217;t help if you don&#8217;t get alerted when it only runs once in a day, even if&nbsp; it runs successfully.&nbsp; Also, if there is more than one person writing scripts, how do you make sure that everyone is using the same techniques to log progress?</p>
<p>Here are some of my thoughts:</p>
<ul>
<li>Use a &#8220;launcher&#8221; to run scripts (see below)</li>
<li>Keep a database of processes with an expected # of runs per day</li>
<li>Monitor matching start/end of scripts</li>
<li>Log all output streams (<a title="example" href="http://www.nivot.org/2009/08/19/PowerShell20AConfigurableAndFlexibleScriptLoggerModule.aspx">example</a>)</li>
</ul>
<p>The first item in the list (the launcher) has been something I&#8217;ve been considering because it&#8217;s not trivial to run a PowerShell script in a scheduled task.&nbsp; Even with the -file parameter which was added in PowerShell 2.0, it can involve a fairly long command-line.&nbsp; With the added difficulty of trying to capture output streams (most of which are not exposed to the command shell) it becomes a process that is almost hard to get right every time.&nbsp; Some features I&#8217;m planning for the launcher are:</p>
<ul>
<li>Load appropriate profiles</li>
<li>Log all output streams (with timestamps) to file or database</li>
<li>Log application start/end times</li>
<li>Email owner of script if there are unhandled exceptions</li>
</ul>
<p>I know this topic is not specific to PowerShell, but as Windows administrators get more used to scripting solutions to their automation problems with PowerShell (which I am confident that they are doing), it&#8217;s something that every organization will need to consider.&nbsp; I&#8217;ll try to follow up with some posts that have some actual code to address some of these points.</p>
<p>Mike</p>
<p>P.S.  I&#8217;m specifically not discussing &#8220;enterprise job scheduling&#8221; solutions like JAMS because of the high cost involved.  I&#8217;d like to see the community come up with something a little more budget-friendly.</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%2F06%2Fverifying-automation%2F&amp;title=Verifying%20Automation" 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/01/06/verifying-automation/feed/</wfw:commentRss>
		<slash:comments>0</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_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/2010/08/10/powershell-and-mongodb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The PowerShell Bug That Wasn&#8217;t, and More Package Management</title>
		<link>http://powershellstation.com/2010/01/20/the-powershell-bug-that-wasnt-and-more-package-management/</link>
		<comments>http://powershellstation.com/2010/01/20/the-powershell-bug-that-wasnt-and-more-package-management/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 05:04:26 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[V2.0 Features]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Require]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=255</guid>
		<description><![CDATA[Have you ever tracked down a bug, been confident that you had found the root of your problems, only to realize shortly afterwords that you missed it completely? What I posted yesterday as a bug in PowerShell (having to do with recursive functions, dot-sourcing, and parameters) seemed during my debugging session to clearly be a [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tracked down a bug, been confident that you had found the root of your problems, only to realize shortly afterwords that you missed it completely?</p>
<p>What I posted yesterday as a bug in PowerShell (having to do with recursive functions, dot-sourcing, and parameters) seemed during my debugging session to clearly be a bug.  After all, I watched the parameter value change from b to a, didn&#8217;t I?  Sure did.  And in almost every language I&#8217;ve ever used, that would be a bug.  On the other hand, PowerShell is the only language that I know of that has dot-sourcing.  Here&#8217;s a much simpler code example which shows my faulty thinking:</p>
<pre class="brush: powershell">function f($x){
   if ($x -eq 1){
      write-host $x
      . f ($x+1)
      write-host $x
   }
}

f 1</pre>
<p>Here, we have a simple &#8220;recursive function&#8221; which uses dot-sourcing to call itself.  In my mind, how this would have worked is as follows:</p>
<ul>
<li>We call the function, passing 1 for $x</li>
<li>The if condition is true, so it prints 1 and calls the function, passing 2 for $x</li>
<li>In the inner call, the if condition is false, so nothing happens</li>
<li>We pop back to the calling frame, where $x is 1 and print it</li>
</ul>
<p>If it weren&#8217;t for that pesky dot operator, that would have been accurate.</p>
<p>The problem is, the dot operator changes the scoping of the inner call.  Here&#8217;s what the about_operators help topic, has to say about the dot sourcing operator:</p>
<pre>        Description: Runs a script so that the items in the script are part of the calling scope.</pre>
<p>Which is not a surprise&#8230;really.  The reason I was using the dot operator in my package management code was to make sure that functions defined in the scripts it was calling would be included in the existing scope, rather than their script scope.  The problem was one of nearsightedness.  I was so focused on the fact that the dot sourcing was making the functions part of the caller&#8217;s scope that I didn&#8217;t consider that variable declarations (including parameters) would also be in the caller&#8217;s scope.</p>
<p>So, the correct interpretation of the above script is:</p>
<ul>
<li>We call the function, passing 1 for $x</li>
<li>The if condition is true, so it prints 1 and calls the function, passing 2 for $x</li>
<li>The parameter is named $x, so $x in is set to 2 (overwriting the $x that was set to 1)</li>
<li>In the inner call, the if condition is false, so nothing happens</li>
<li>We pop back to the calling frame, where $x is 2 and print 2.</li>
</ul>
<p>The trick here is that the function f dot-sourced something that set $x to 2.  The fact that it was f is incidental.  It didn&#8217;t have to be.</p>
<p>Maybe this example will make it more clear:</p>
<pre class="brush:powershell">function f($x){
    write-host $x
    . g
    write-host $x
 }

function g{
   $x = "Hello, World!"
}
f 1</pre>
<p>If we were doing this without dot-sourcing, we would expect to see the number 1 printed out twice.  However, since we dot-sourced g, the assignment in the function body of g happens in the scope of f.  In other words, it&#8217;s as if the $x=&#8221;Hello, World!&#8221; were executed inside f.  Thus, the output of this script is 1, followed by &#8220;Hello, World!&#8221;.</p>
<p>So, it wasn&#8217;t a bug, it was just me not being thorough in applying my understanding of dot-sourcing.</p>
<p>Now, on with Package Management.<br />
First, to fix the problem caused by the parameter being overwritten (which it is, it&#8217;s just that it&#8217;s expected to be).  I hadn&#8217;t worked out a way to fix the problem before I went to bed last night, but as I was rolling this stuff around in my head (which is when I figured out that it wasn&#8217;t really a <em>bug</em>), I thought of a simple solution.  Since we can expect that sometimes the $filename parameter in the require (and reload) function will be overwritten by the a value in the dot-sourced script, we just need to make sure we&#8217;re done using it at that point.  So, I simply made the assignment to the dictionary before dot-sourcing.   Here&#8217;s the updated code:</p>
<pre class="brush: powershell">$global:loaded_scripts=@{pkg_utils='INITIAL'}

function require($filename){
	if (!$global:loaded_scripts[$filename]){
	   $global:loaded_scripts[$filename]=get-date
	   . scripts:$filename.ps1
	}
}
function reload($filename){
	$global:loaded_scripts[$filename]=get-date
	. scripts:$filename.ps1
}</pre>
<p>To add modules, we need to do a few extra things:</p>
<ul>
<li>We need to detect if we&#8217;re running in 2.0 or not</li>
<li>We need to see if there is a module with the given name</li>
<li>We need to see if the module is already loaded or not (in the case of require&#8230;it won&#8217;t matter for reload</li>
</ul>
<p>Fortunately, none of those are very difficult.  Here&#8217;s the updated code (including modules).  I even added some comments to make the flow more clear:</p>
<pre class="brush:powershell">
$global:loaded_scripts=@{pkg_utils='INITIAL'}

function require($filename){
    if ($global:loaded_scripts[$filename]){
          # this function has already loaded this (script or module)
          return
    }
    if ($psversiontable){
       # we're in 2.0
       if (get-module $filename -listavailable){
               #the module exists in the module path
         	   $global:loaded_scripts[$filename]=get-date
               import-module $filename
               return
       }
    }
    #it wasn't a module...so dot-source the script
    $global:loaded_scripts[$filename]=get-date
    . scripts:$filename.ps1

}
function reload($filename){
    if ($psversiontable){
        # we're in 2.0
        if (get-module $filename -listavailable){
           #the module exists in the module path
           $global:loaded_scripts[$filename]=get-date
           import-module $filename
           return
        }
    }
    # it wasn't a module...so dot-source the script.
  	$global:loaded_scripts[$filename]=get-date
	. scripts:$filename.ps1
}
</pre>
<p>That&#8217;s it for today.  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%2F01%2F20%2Fthe-powershell-bug-that-wasnt-and-more-package-management%2F&amp;title=The%20PowerShell%20Bug%20That%20Wasn%E2%80%99t%2C%20and%20More%20Package%20Management" 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/2010/01/20/the-powershell-bug-that-wasnt-and-more-package-management/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Package Management and a PowerShell Bug</title>
		<link>http://powershellstation.com/2010/01/19/package-management-and-a-powershell-bug/</link>
		<comments>http://powershellstation.com/2010/01/19/package-management-and-a-powershell-bug/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 05:41:58 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Require]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=237</guid>
		<description><![CDATA[UPDATE: I have worked out how the behavior described at the end of this post is not a bug, but in fact just PowerShell doing what it&#8217;s told. Don&#8217;t have time to explain right now, but I&#8217;ll write something up later today. I also worked out how to &#8220;fix&#8221; the behavior. For a long time [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:  I have worked out how the behavior described at the end of this post is not a bug, but in fact just PowerShell doing what it&#8217;s told.  Don&#8217;t have time to explain right now, but I&#8217;ll write something up later today.  I also worked out how to &#8220;fix&#8221; the behavior.</strong></p>
<p>For a long time now, I&#8217;ve been dissatisfied with what I call &#8220;package management&#8221; in PowerShell.  Those of you who know me will be shocked that anything in PowerShell is less than perfect in my eyes, but this is one place that I feel let down.  Modules in 2.0 remedy the situation somewhat, but it still isn&#8217;t quite what I want or am used to in other languages.</p>
<p>Let me give an example.  In VB.NET, if you need to use the functions in an assembly, you put &#8220;Imports AssemblyName&#8221; at the top of your script.  In C#, you would have &#8220;Using AssemblyName&#8221;.  In Python, there would be &#8220;Import Something&#8221;.</p>
<p>In PowerShell 1.0, you had nothing.  In 2.0, you could create a module manifest which would specify either RequiredModules or ScriptsToProcess (or several other things to do upon loading the module).  The problems I see  with using the module manifest are:</p>
<ul>
<li>What if I&#8217;m not writing a module?  There&#8217;s no such thing as a &#8220;script manifest&#8221;</li>
<li>What if the script or module that is required performs some initialization that should only be done once per session?</li>
<li>What if the script or module that is required performs <em>expensive</em> initialization?</li>
</ul>
<p>Because of these reasons (and because I only started using 2.0 when it went RTM) I wrote a couple of quick functions to do what I thought made sense.</p>
<pre class="brush: powershell">
$global:loaded_scripts=@{pkg_utils='INITIAL'}

function require($filename){
	if (!$global:loaded_scripts[$filename]){
	   . scripts:$filename.ps1
	   $global:loaded_scripts[$filename]=get-date
	}
}
function reload($filename){
	. scripts:$filename.ps1
	$global:loaded_scripts[$filename]=get-date
}
</pre>
<p>To use these you need to create a psdrive called scripts: with code like this (probably in your profile):</p>
<pre class="brush:powershell">New-PSdrive -name scripts -PSprovider filesystem -root PathToYourLibraries | Out-Null</pre>
<p>Then, also in your profile, you&#8217;ll want to dot-source the file you put these functions in (for example, package_tools.ps1):</p>
<pre class="brush: powershell">. scripts:package_tools.ps1</pre>
<p>Once you have those set up, you can dot-source the <strong>require</strong> function to make sure that a script has been loaded as such:</p>
<pre class="brush:powershell">. require somelibrary</pre>
<p>I have the functions I use divided by &#8220;subject&#8221; into several library scripts, and make sure that at the top of each script, I use &#8220;. require&#8221; to ensure that any prerequisites are already loaded.</p>
<p>Now for the PowerShell bug (which took me a long time to track down).<br />
Create 2 files, a.ps1 and b.ps1 in your scripts: directory.</p>
<pre class="brush:powershell">
# a.ps1
write-host "this is script a"
</pre>
<pre class="brush: powershell">
#b.ps1
write-host "this is script b"
write-host "this script loads a"
. require a
</pre>
<p>After dot-sourcing package_tools, run the following commands:</p>
<pre class="brush: powershell">
. require b
</pre>
<p>You should get output that looks something like this:</p>
<pre>
this is script b
this script loads a
this is script a
</pre>
<p>Everything looks good until you inspect the $global:loaded_scripts variable:</p>
<pre>
ps> $loaded_scripts

Name                           Value
----                           -----
a                              1/19/2010 11:23:09 PM
package_tools                  INITIAL
</pre>
<p>Although b.ps1 was indeed dot-sourced (you can see the output), and the only code-path through the  require function that would dot-source it would also add an entry to $loaded_scripts, there is no such entry.  The problem is that when b.ps1 called the require function (to load a.ps1), the $filename variable in the calling context (where it should have been &#8220;b&#8221;) was overwritten by the call with &#8220;a&#8221; as a parameter.  Walking through the code in a debugger confirms the problem.</p>
<p>Have you ever seen problems with recursion and dot-sourcing in PowerShell?  Can you see any way around the problem I&#8217;ve described?  For instance, saving the $filename in a variable and restoring it after the dot-source call (line 5 above) doesn&#8217;t help, because the same code-path is followed in the recursive call, and that variable is overwritten as well.</p>
<p>Even with this bug, I find the require function (and reload, which I didn&#8217;t discuss, but always loads the script in question) to be very helpful.  I also have extended them to include importing modules, if they exist.  I&#8217;ll discuss them in my next post, coming soon.</p>
<p>-Mike</p>
<p>P.S.  <a href="http://stackoverflow.com/questions/279974/importing-libraries-in-powershell">Here</a>&#8216;s a question I posted to StackOverflow.com about these functions back in November of 2008.</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%2F01%2F19%2Fpackage-management-and-a-powershell-bug%2F&amp;title=Package%20Management%20and%20a%20PowerShell%20Bug" 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/2010/01/19/package-management-and-a-powershell-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL PowerShell Extensions (SQLPSX) 2.0 Released</title>
		<link>http://powershellstation.com/2010/01/05/sql-powershell-extensions-sqlpsx-2-0-released/</link>
		<comments>http://powershellstation.com/2010/01/05/sql-powershell-extensions-sqlpsx-2-0-released/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 00:39:17 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=233</guid>
		<description><![CDATA[The first module-based release of the SQL PowerShell Extensions (SQLPSX) was released recently on CodePlex.  It features very handy wrappers for most of the SMO objects used to manipulate SQL Server metadata, SSIS packages, Replication, and (new in the 2.0 release) an ADO.NET module which I wrote based on the code in this post.  There&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>The first module-based release of the SQL PowerShell Extensions (SQLPSX) was released recently on CodePlex.  It features very handy wrappers for most of the SMO objects used to manipulate SQL Server metadata, SSIS packages, Replication, and (new in the 2.0 release) an ADO.NET module which I wrote based on the code in this <a href="http://powershellstation.com/2009/09/15/executing-sql-the-right-way-in-powershell/">post</a>.  There&#8217;s also a data-collection process and Reporting Services reports to help you get your SQL Server installations under control.</p>
<p>Chad Miller, the driving force behind SQLPSX, has put a lot of effort into this release, and you&#8217;ll find really good examples of advanced functions (with comment-based help, even).</p>
<p>If you deal with SQL Server in any way, you&#8217;ll almost certainly be able to use this set of modules to streamline your scripting experience (and probably learn something about SMO in the process).</p>
<p>You can find the release <a href="http://sqlpsx.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=38047">here</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%2F01%2F05%2Fsql-powershell-extensions-sqlpsx-2-0-released%2F&amp;title=SQL%20PowerShell%20Extensions%20%28SQLPSX%29%202.0%20Released" 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/01/05/sql-powershell-extensions-sqlpsx-2-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerShell Tools and Books That I Use</title>
		<link>http://powershellstation.com/2009/09/10/powershell-tools-and-books-that-i-use/</link>
		<comments>http://powershellstation.com/2009/09/10/powershell-tools-and-books-that-i-use/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 05:13:19 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Discussion]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Books]]></category>

		<guid isPermaLink="false">http://powershellstation.com/?p=8</guid>
		<description><![CDATA[Tools I Use (note&#8230;these are all free!): PowerGUI Script Editor (I haven&#8217;t ever gotten the hang of PowerGUI itself) Powershell Community Extensions 1.2  (PSCX) PowerTab SQL PowerShell Extensions 1.61 (SQLPSX) PrimalForms Community Edition Books: PowerShell In Action by Bruce Payette Professional Windows PowerShell Programming: Snapins, Cmdlets, Hosts and Providers by  Arul Kumaravel et. al. Mastering [...]]]></description>
			<content:encoded><![CDATA[<p>Tools I Use (note&#8230;these are all free!):</p>
<ul>
<li>PowerGUI Script Editor (I haven&#8217;t ever gotten the hang of PowerGUI itself)</li>
<li>Powershell Community Extensions 1.2  (PSCX)</li>
<li>PowerTab</li>
<li>SQL PowerShell Extensions 1.61 (SQLPSX)</li>
<li>PrimalForms Community Edition</li>
</ul>
<p>Books:</p>
<ul>
<li>PowerShell In Action by Bruce Payette</li>
<li>Professional Windows PowerShell Programming: Snapins, Cmdlets, Hosts and Providers by  Arul Kumaravel et. al.</li>
<li>Mastering PowerShell by Dr. Tobias Weltner</li>
</ul>
<p>I&#8217;ve tried a lot of other tools (several IDE&#8217;s, for example), but this is the list I keep returning to.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fpowershellstation.com%2F2009%2F09%2F10%2Fpowershell-tools-and-books-that-i-use%2F&amp;title=PowerShell%20Tools%20and%20Books%20That%20I%20Use" 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/2009/09/10/powershell-tools-and-books-that-i-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  powershellstation.com/category/tools/feed/ ) in 0.21590 seconds, on May 20th, 2012 at 1:23 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on May 21st, 2012 at 1:23 am UTC -->
