<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://powershell.com/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The Lonely Administrator : ScriptBlock</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx</link><description>Tags: ScriptBlock</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Skipping WMI System Properties in PowerShell</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/25/skipping-wmi-system-properties-in-powershell.aspx</link><pubDate>Wed, 25 Apr 2012 13:15:06 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:16184</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=16184</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/25/skipping-wmi-system-properties-in-powershell.aspx#comments</comments><description>One of my favorite techniques when using WMI in PowerShell is to pipe an object to Select-Object and select all properties. Try this: get-wmiobject win32_bios &amp;#124; select * It works, but it also gets all of the system properties like &amp;#8230; Continue...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/25/skipping-wmi-system-properties-in-powershell.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=16184" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/WMI/default.aspx">WMI</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Get-WMIObject/default.aspx">Get-WMIObject</category></item><item><title>Friday Fun: 13 More Scriptblocks</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/13/friday-fun-13-more-scriptblocks.aspx</link><pubDate>Fri, 13 Apr 2012 14:34:45 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:15958</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=15958</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/13/friday-fun-13-more-scriptblocks.aspx#comments</comments><description>In celebration of Friday the 13th I thought I would offer up a menu of 13 more script blocks. If you missed the first course, you can find the original 13 scrptblocks here. I&amp;#8217;m not going to spend a lot &amp;#8230; Continue reading &amp;#8594; Read More...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/13/friday-fun-13-more-scriptblocks.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=15958" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/WMI/default.aspx">WMI</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Friday+Fun/default.aspx">Friday Fun</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/FridayFun/default.aspx">FridayFun</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Random/default.aspx">Random</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ACL/default.aspx">ACL</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/password/default.aspx">password</category></item><item><title>PowerShell Scripting with [ValidateScript]</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/12/powershell-scripting-with-validatescript.aspx</link><pubDate>Thu, 12 Apr 2012 13:57:41 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:15944</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=15944</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/12/powershell-scripting-with-validatescript.aspx#comments</comments><description>The last few days we&amp;#8217;ve been looking at parameter validation attributes you might use in a script of function. Yesterday I wrote about [ValidateRange] and demonstrated how you might use it. That attribute works fine for any values that can &amp;#8230;...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/12/powershell-scripting-with-validatescript.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=15944" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/parameter/default.aspx">parameter</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Validation/default.aspx">Validation</category></item><item><title>Scripting with PSCredential</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/10/scripting-with-pscredential.aspx</link><pubDate>Tue, 10 Apr 2012 14:40:56 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:15889</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=15889</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/10/scripting-with-pscredential.aspx#comments</comments><description>I see this question often: how can I pass a parameter value for a PSCredential that might be a credential object or it might be a user name? In the past I&amp;#8217;ve used code like this: begin &amp;#123; &amp;#160; &amp;#160; &amp;#8230; Continue reading &amp;#8594; Read More...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2012/04/10/scripting-with-pscredential.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=15889" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/functions/default.aspx">functions</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/WMI/default.aspx">WMI</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PSCredential/default.aspx">PSCredential</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/security/default.aspx">security</category></item><item><title>Friday Fun What a CHAR!</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/09/23/friday-fun-what-a-char.aspx</link><pubDate>Fri, 23 Sep 2011 14:00:30 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:12478</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=12478</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/09/23/friday-fun-what-a-char.aspx#comments</comments><description>Last week I posted a PowerShell snippet on Twitter. My original post piped an array of integers as [CHAR] type using an OFS. Don&amp;#8217;t worry about that. As many people reminded me, it is much easier to use the -Join &amp;#8230; Continue reading &amp;#8594;...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/09/23/friday-fun-what-a-char.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=12478" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell+v2.0/default.aspx">PowerShell v2.0</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Friday+Fun/default.aspx">Friday Fun</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/FridayFun/default.aspx">FridayFun</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/hashtable/default.aspx">hashtable</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Array/default.aspx">Array</category></item><item><title>The PowerShell Day Care: Building ScriptBlocks</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/09/22/the-powershell-day-care-building-scriptblocks.aspx</link><pubDate>Thu, 22 Sep 2011 12:53:40 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:12459</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=12459</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/09/22/the-powershell-day-care-building-scriptblocks.aspx#comments</comments><description>Good morning kids and welcome to the PowerShell Day Care center. We offer a creative and nurturing environment for PowerShell professionals of all ages. Later there might even be juice and cookies. But first let&amp;#8217;s get out our blocks, our &amp;#8230;...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/09/22/the-powershell-day-care-building-scriptblocks.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=12459" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ForEach-object/default.aspx">ForEach-object</category></item><item><title>Get Properties with Values</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/07/04/get-properties-with-values.aspx</link><pubDate>Mon, 04 Jul 2011 14:43:24 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:11187</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=11187</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/07/04/get-properties-with-values.aspx#comments</comments><description>One of my nuisance issues when using WMI with Windows PowerShell, is that when looking at all properties I have to wade though many that have no value. I&amp;#8217;d prefer to only view properties that have a populated value. Here&amp;#8217;s &amp;#8230; Continue...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/07/04/get-properties-with-values.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=11187" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/WMI/default.aspx">WMI</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell+v2.0/default.aspx">PowerShell v2.0</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Where-Object/default.aspx">Where-Object</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Select-Object/default.aspx">Select-Object</category></item><item><title>ScriptBlocks On the Fly</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/06/20/scriptblocks-on-the-fly.aspx</link><pubDate>Mon, 20 Jun 2011 12:38:00 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:10916</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=10916</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/06/20/scriptblocks-on-the-fly.aspx#comments</comments><description>I&amp;#8217;m always preaching about writing PowerShell scripts and functions with reuse and modularization in mind. You should never have to write the same block of code twice. But what about in the shell during your daily grind? Perhaps today you&amp;#8217;re...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/06/20/scriptblocks-on-the-fly.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=10916" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Invoke-Command/default.aspx">Invoke-Command</category></item><item><title>Friday Fun: Start-TypedDemo v2</title><link>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/05/27/friday-fun-start-typeddemo-v2.aspx</link><pubDate>Fri, 27 May 2011 13:28:59 GMT</pubDate><guid isPermaLink="false">f421715f-7aba-45f0-8a8d-44de5318a3a7:10556</guid><dc:creator>The Lonely Administrator</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://powershell.com/cs/blogs/lonelyadministrator/rsscomments.aspx?PostID=10556</wfw:commentRss><comments>http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/05/27/friday-fun-start-typeddemo-v2.aspx#comments</comments><description>Not too long ago I posted a function I wrote for doing PowerShell demonstrations. My goal was to simulate a live interactive demo but without the typing so I could focus on explaining and not typing. The first version was &amp;#8230; Continue reading &amp;#8594;...(&lt;a href="http://powershell.com/cs/blogs/lonelyadministrator/archive/2011/05/27/friday-fun-start-typeddemo-v2.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://powershell.com/cs/aggbug.aspx?PostID=10556" width="1" height="1"&gt;</description><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Scripting/default.aspx">Scripting</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Function/default.aspx">Function</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Training/default.aspx">Training</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/PowerShell+v2.0/default.aspx">PowerShell v2.0</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Write-Host/default.aspx">Write-Host</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Friday+Fun/default.aspx">Friday Fun</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/ScriptBlock/default.aspx">ScriptBlock</category><category domain="http://powershell.com/cs/blogs/lonelyadministrator/archive/tags/Professional/default.aspx">Professional</category></item></channel></rss>