<?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>Use PowerShell &#187; Development</title>
	<atom:link href="http://blog.usepowershell.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.usepowershell.com</link>
	<description>Real Admins Script</description>
	<lastBuildDate>Fri, 26 Feb 2010 18:46:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PowerShell in Azure</title>
		<link>http://blog.usepowershell.com/2009/07/powershell-in-azure/</link>
		<comments>http://blog.usepowershell.com/2009/07/powershell-in-azure/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 16:53:34 +0000</pubDate>
		<dc:creator>Steven Murawski</dc:creator>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://blog.usepowershell.com/2009/07/powershell-in-azure/</guid>
		<description><![CDATA[The July CTP release of the Windows Azure SDK contains a new sample project called PowerShellRole which demonstrates that PowerShell is available in the cloud!
Previous versions of the CTP have come with a sample Provider which you could use to access Azure storage (blobs, queues, and tables), but this actually provides demonstration of creating runspaces [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=aa40f3e2-afc5-484d-b4e9-6a5227e73590&amp;displaylang=en" target="_blank">July CTP release of the Windows Azure SDK</a> contains a new sample project called PowerShellRole which demonstrates that PowerShell is available in the cloud!</p>
<p>Previous versions of the CTP have come with a sample Provider which you could use to access Azure storage (blobs, queues, and tables), but this actually provides demonstration of creating runspaces and executing pipelines in the cloud.</p>
<p>Now to see what version is running in the cloud!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.usepowershell.com/2009/07/powershell-in-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dear Devs,  Give Us The Tools.  K Thx</title>
		<link>http://blog.usepowershell.com/2009/07/dear-devs-give-us-the-tools-k-thx/</link>
		<comments>http://blog.usepowershell.com/2009/07/dear-devs-give-us-the-tools-k-thx/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 21:31:09 +0000</pubDate>
		<dc:creator>Steven Murawski</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://blog.usepowershell.com/2009/07/dear-devs-give-us-the-tools-k-thx/</guid>
		<description><![CDATA[I just finished listening to the latest Herding Code podcast (#52) where the hosts (K. Scott Allen, Kevin Dente, Scott Koon, and Jon Galloway) talked with Alan Stevens ( C# MVP and ASP Insider) and G. Andrew Duthie (author and Microsoft Developer Evangelist) about a debate that began on Twitter regarding “Real Software Development vs [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished listening to the latest <a href="http://herdingcode.com" target="_blank">Herding Code</a> podcast <a href="http://herdingcode.com/?p=191" target="_blank">(#52)</a> where the hosts (<a href="http://odetocode.com/" target="_blank">K. Scott Allen</a>, <a href="http://weblogs.asp.net/kdente" target="_blank">Kevin Dente</a>, <a href="http://lazycoder.com/" target="_blank">Scott Koon</a>, and <a href="http://weblogs.asp.net/jgalloway" target="_blank">Jon Galloway</a>) talked with <a href="http://netcave.org/" target="_blank">Alan Stevens</a> ( C# MVP and ASP Insider) and <a href="http://blogs.msdn.com/gduthie/" target="_blank">G. Andrew Duthie</a> (author and Microsoft Developer Evangelist) about a debate that began on Twitter regarding “Real Software Development vs Microsoft Bubble Development”.</p>
<p>What does that have to do with PowerShell and administrative tools?  The specifics of their conversation don’t have a lot of relevance to administrators and scripters, but one of the directions that their conversation took really resonated with me.</p>
<blockquote><p>Alan throws the first punch – He likes Herding Code because it’s about real software development rather than development in the Microsoft bubble.  It’s about the tool users rather than the tool builders and it’s about honest feedback.</p></blockquote>
<p>As administrators, we need to make sure the developers of the applications that we use and administer provide us the tools we <strong>need</strong> to efficiently run our networks.  Microsoft has gotten the message loud and clear.  Windows 7, Server 2008 R2, and TechEd 2009 LA confirmed that.  There weren’t many sessions where you didn’t hear something about PowerShell and there aren’t many products where PowerShell isn’t making inroads into the management structure.</p>
<p>Kudos to Jeffrey Snover and the awesome management technologies team for really selling this internally at Microsoft.</p>
<p>Another point made on the podcast was that Microsoft needed to do more to encourage better development practices… Can those same developers say that their products encourage better application management practices?</p>
<p>Now, we as the<strong> users</strong> of PowerShell <strong>need to step up</strong> and <span style="text-decoration: line-through;">convince</span> demand better administrative tooling from our vendors and internal development staffs.  Companies like <a href="http://www.quest.com/" target="_blank">Quest</a>, <a href="http://www.vmware.com/" target="_blank">VMWare</a>, <a href="http://www.idera.com/" target="_blank">Idera</a>,  <a href="http://www.compellent.com/" target="_blank">Compellent</a>, and others have gotten the message, but there are still many, many other products out there and many internal applications that suffer from inflexibility.</p>
<p>Web interfaces and GUI tools are nice and can be considered the icing on the cake.  A true manageable application allows for consistent and repeatable actions in an easy to maintain structure, as well as providing flexibility to integrate other potential solutions.  PowerShell provides a lot of that right in the box and allows administrators to bridge the gap and create their own solutions that might not have been supported yet (ever hear &#8211; “it’s in the next version”).</p>
<p>So, here is the call to action:</p>
<p><strong>Rise up and demand proper administrative interfaces.</strong></p>
<p><strong>Talk to your managers about the benefits of streamlined application management using a consistent interface across multiple platforms and applications.</strong></p>
<p><strong>Take a developer to lunch and explain how you want to help make using his product a better experience from the application management side.</strong></p>
<p>Let’s take our cue from the oft repeated concept in that <a href="http://herdingcode.com" target="_blank">Herding Code</a> podcast – there is a need for candid feedback and it is all about the tools that we have to live in and work with every day.</p>
<p>If by chance one of the guys from the Herding Code podcast (or any other developer-centric podcast like <a href="http://dotnetrocks.com/" target="_blank">.NET Rocks</a>, <a href="http://deepfriedbytes.com/" target="_blank">Deep Fried Bytes</a>, or <a href="http://blog.stackoverflow.com/" target="_blank">StackOverflow</a>) happens onto this post and wants to talk further, I’m available.  There are also a good number of PowerShell MVPs and community bloggers who I’m sure would love to provide some “candid feedback” to “developers in the trenches doing real development”.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.usepowershell.com/2009/07/dear-devs-give-us-the-tools-k-thx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More PowerShell on the Thirsty Developer</title>
		<link>http://blog.usepowershell.com/2009/06/more-powershell-on-the-thirsty-developer/</link>
		<comments>http://blog.usepowershell.com/2009/06/more-powershell-on-the-thirsty-developer/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 15:22:51 +0000</pubDate>
		<dc:creator>Steven Murawski</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://blog.usepowershell.com/2009/06/more-powershell-on-the-thirsty-developer/</guid>
		<description><![CDATA[Larry Clarkin asked me back on the Thirsty Developer to continue talking about development and PowerShell.&#160; We talked about creating cmdlets, hosting PowerShell, and a bit about Version 2.&#160; Check it out here.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://eraserandcrowbar.com/" target="_blank">Larry Clarkin</a> asked me back on the <a href="http://thirstydeveloper.com" target="_blank">Thirsty Developer</a> to continue talking about development and PowerShell.&#160; We talked about creating cmdlets, hosting PowerShell, and a bit about Version 2.&#160; <a href="http://thirstydeveloper.com/2009/06/01/64MoreOnPowershell.aspx" target="_blank">Check it out here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.usepowershell.com/2009/06/more-powershell-on-the-thirsty-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn Your Stored Procedures Into PowerShell Functions &#8211; MetaProgramming With PowerShell</title>
		<link>http://blog.usepowershell.com/2009/04/turn-your-stored-procedures-into-powershell-functions-metaprogramming-with-powershell/</link>
		<comments>http://blog.usepowershell.com/2009/04/turn-your-stored-procedures-into-powershell-functions-metaprogramming-with-powershell/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 22:38:54 +0000</pubDate>
		<dc:creator>Steven Murawski</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://blog.usepowershell.com/2009/04/turn-your-stored-procedures-into-powershell-functions-metaprogramming-with-powershell/</guid>
		<description><![CDATA[UPDATE: The script was moved to Google Code.  The links in the post have been updated to reflect that.  Or you can just go here&#8230; http://code.google.com/p/poshcodegen/
I’ve been working on some data conversion at work, converting records from one system to a new system.  I’ve built quite a library of SQL queries with PowerShell wrappers for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: The script was moved to Google Code.  The links in the post have been updated to reflect that.  Or you can just go here&#8230; <a href="http://code.google.com/p/poshcodegen/" target="_blank">http://code.google.com/p/poshcodegen/</a></strong></p>
<p>I’ve been working on some data conversion at work, converting records from one system to a new system.  I’ve built quite a library of SQL queries with PowerShell wrappers for dealing with data in the first system, but I don’t have the same luxury with the new system.</p>
<p>The new system does, however, have a nice set of stored procedures that make moving data into their application much easier.</p>
<p>I started writing my conversion scripts in PowerShell, since I do have to do some processing on the records to accommodate the new workflow and data layout.  I was looking at having to call almost 100 stored procedures through various parts of this process.  That is a lot of boiler plate code or referring back to the database often to check parameter names and types.  <a href="http://poshcode.org/1011" target="_blank">So, I’ve written a little PowerShell script that will take stored procedures (either as a parameter or from the pipeline) and create a function that wraps that stored procedure</a>.</p>
<p>The benefits of this are great with V2 CTP3 or with a more advanced editor (one that will provide tab completion on parameters).</p>
<p>One a wider scope, I think that this type of utility is one of PowerShell’s great strengths.  Using PowerShell for metaprogramming (<a href="http://www.tellingmachine.com/post/2008/11/Meta-Programming-with-PowerShell-and-Regular-Expressions.aspx" target="_blank">another example here on the Telling Machine blog</a>) can be a great time saver.  I spent a couple of hours working on this script, but it would have cost me much more time to handle each case individually.</p>
<p>Now, when I hear “metaprogramming”, my head starts to hurt a bit as I start to think about programs about programs about programs, but this isn’t that bad.  PowerShell makes this pretty easy to understand though.  To create a function dynamically, all that is needed is a string that contains text that the PowerShell runtime can evaluate (PowerShell will check for syntax errors, but not logic errors – as is the case with any script or function).</p>
<p>Example:</p>
<p>$text = &#8216;Get-ChildItem *.ps1 | Measure-Object&#8217;</p>
<p>Set-Item –Path function:global:Get-PowerShellScriptCount –Value $Text</p>
<p>This takes advantage of the Function provider and creates a function object in the global scope with the specified name and $Text is turned into a scriptblock.  I can then call that function as needed.</p>
<p>Since I know PowerShell, to build dynamic functions I just have to create text that can be evaluated to do the function I need.</p>
<p>Here’s what <a href="http://code.google.com/p/poshcodegen/" target="_blank">my script</a> does after it runs a query against the database to get the stored procedure’s text:</p>
<ol>
<li>parses the text to get the parameter names and types</li>
<li>using the names and types, it sets the parameters for the function (if someone wants to add some logic to make it type safe, that would rock!)</li>
<li>builds the text to create a SqlConnection object to handle the database connection</li>
<li>builds the text to create a SqlCommand object and sets the type of command to be a stored procedure</li>
<li>builds the text to populate the parameters, including setting up the output parameters (if any)</li>
<li>builds the text to run the stored procedure</li>
<li>builds the text to put any output parameters into a PSObject as properties.</li>
<li>create a new function with the name of the stored procedure and uses the text built in the previous steps as the scriptblock for the function.</li>
</ol>
<p><strong></strong></p>
<p><strong><span style="font-size: small;">What are you automating with PowerShell? </span></strong></p>
<p><strong><span style="font-size: small;">How about trying to automate some of your automation code?</span></strong></p>
<p><a href="http://code.google.com/p/poshcodegen/" target="_blank">New-StoredProcFunction.ps1 here.</a></p>
<p>PSMDTAG:metaprogramming sql stored procedure</p>
<p><strong>UPDATED SCRIPT: Thanks to <a href="http://chadwickmiller.spaces.live.com/default.aspx" target="_blank">Chad Miller</a></strong><strong> for the idea.. instead of parsing the text of the stored procedure, the parameter information is available in the Information_Schema.Parameters</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.usepowershell.com/2009/04/turn-your-stored-procedures-into-powershell-functions-metaprogramming-with-powershell/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Microsoft TechDays Virtual Event</title>
		<link>http://blog.usepowershell.com/2009/03/microsoft-techdays-virtual-event/</link>
		<comments>http://blog.usepowershell.com/2009/03/microsoft-techdays-virtual-event/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 13:01:27 +0000</pubDate>
		<dc:creator>Steven Murawski</dc:creator>
				<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[PowerShell Community]]></category>

		<guid isPermaLink="false">http://blog.usepowershell.com/2009/03/microsoft-techdays-virtual-event/</guid>
		<description><![CDATA[On April 1st, 2009, Microsoft is putting on a free 24 hour virtual event covering developer-related topics.   There will be 95 live sessions provided via Live Meeting in the following tracks:

Windows Development and Frameworks
Windows Mobile Development
Office and SharePoint Development
Developer Tools, Languages &#38; Practices
Web Development &#38; User Experience

PowerShell Community’s own Marco Shaw (MVP) will [...]]]></description>
			<content:encoded><![CDATA[<p>On April 1st, 2009, Microsoft is putting on a free 24 hour virtual event covering developer-related topics.   <br />There will be 95 live sessions provided via Live Meeting in the following tracks:</p>
<ul>
<li>Windows Development and Frameworks</li>
<li>Windows Mobile Development</li>
<li>Office and SharePoint Development</li>
<li>Developer Tools, Languages &amp; Practices</li>
<li>Web Development &amp; User Experience</li>
</ul>
<p>PowerShell Community’s own <a href="http://marcoshaw.blogspot.com/" target="_blank">Marco Shaw (MVP)</a> will be presenting the <strong>ONLY</strong> PowerShell session:</p>
<blockquote><p>WIN300 Scripting the Microsoft .NET Framework Using Windows PowerShell     <br />Now that PowerShell is part of the Microsoft Common Engineering Criteria, expect to see more and more PowerShell in Microsoft server products. This session looks at how PowerShell can be used to directly access the .NET Framework. Some simple examples are demonstrated, but also more advanced examples of using Windows Presentation Foundation (.NET 3.0) and LINQ (.NET 3.5) are discussed.</p>
</blockquote>
<p>You can find more information about this event <a href="http://www.msfttechdays.com/public/sessions.aspx" target="_blank">here</a> or on <a href="http://marcoshaw.blogspot.com/2009/03/free-event-techdays-defy-all-challenges.html" target="_blank">Marco’s blog</a>.&#160; </p>
<p>I’m looking forward to seeing this presentation.&#160; Hope to “see” you there!&#160; <a href="http://www.msfttechdays.com/Modules/Registration/Submit.aspx" target="_blank">Register now..</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.usepowershell.com/2009/03/microsoft-techdays-virtual-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cahoots! Rocks</title>
		<link>http://blog.usepowershell.com/2009/02/cahoots-rocks/</link>
		<comments>http://blog.usepowershell.com/2009/02/cahoots-rocks/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 18:25:32 +0000</pubDate>
		<dc:creator>Steven Murawski</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.usepowershell.com/2009/02/cahoots-rocks/</guid>
		<description><![CDATA[Cahoots! is an open source project that provides a Question and Answer forum that is driven by community participation.&#160; It also includes blogging, podcasting, and a knowledgebase functionality.&#160; 
Logins are managed via OpenID, so you don’t have to worry about managing additional login credentials.
Your capabilities to create content are driven by “esteem”, which is a [...]]]></description>
			<content:encoded><![CDATA[<p>Cahoots! is an open source project that provides a Question and Answer forum that is driven by community participation.&#160; It also includes blogging, podcasting, and a knowledgebase functionality.&#160; </p>
<p>Logins are managed via OpenID, so you don’t have to worry about managing additional login credentials.</p>
<p>Your capabilities to create content are driven by “esteem”, which is a metric for tracking the response to content you provide.&#160; You can gain “esteem” by asking asking questions, posting blog entries, and having people follow your activities on the site.&#160; For more details on that, check out the <a href="http://test.concentratedtech.com/about" target="_blank">about page</a>.</p>
<p>&#160;</p>
<p>If you are interested in checking out Cahoots!, <a href="http://concentratedtech.com/content/index.php/2009/01/help-us-out-try-a-new-kind-of-beta-community/" target="_blank">read this blog post</a> from Don Jones or <a href="http://test.concentratedtech.com" target="_blank">try it out</a>..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.usepowershell.com/2009/02/cahoots-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
