&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Articles from April 2013 on PowerShell.org - Welcome Automaters!</title><link>https://powershell.org/articles/2013/04/</link><description>Recent content in Articles from April 2013 on PowerShell.org - Welcome Automaters!</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://powershell.org/articles/2013/04/index.xml" rel="self" type="application/rss+xml"/><item><title>Thoughts on Event 1 – and, frankly, a rant.</title><link>https://powershell.org/articles/2013-04-30-thoughts-on-event-1-and-frankly-a-rant/</link><guid>https://powershell.org/articles/2013-04-30-thoughts-on-event-1-and-frankly-a-rant/</guid><pubDate>Wed, 01 May 2013 00:06:53 +0000</pubDate><description>&lt;p&gt;There&amp;rsquo;s been a lot of dismay floating around the community about the state of &amp;ldquo;community voting&amp;rdquo; in the Scripting Games. Some folks are voting without leaving comments (we&amp;rsquo;ve expanded the comment field to 2000 characters, hopefully that&amp;rsquo;ll help), and some disagreement about scores.&lt;br&gt;
Disagreement is natural. For example, stick a &lt;strong&gt;Write-Host&lt;/strong&gt; in your script and I&amp;rsquo;m likely to score you lower. You may disagree, but it&amp;rsquo;s how I feel in many situations&amp;hellip; and I&amp;rsquo;m seeing a distressing amount of it.&lt;br&gt;
Did you know that using &lt;strong&gt;[CmdletBinding(SupportsShouldProcess=$True)]&lt;/strong&gt; doesn&amp;rsquo;t automatically and universally &lt;em&gt;make the -confirm switch work?&lt;/em&gt; You have to do a bit more.&lt;br&gt;
Did you know that if you put &lt;strong&gt;$DebugPreference=&amp;lsquo;SilentlyContinue&amp;rsquo;&lt;/strong&gt; in your &lt;strong&gt;BEGIN{}&lt;/strong&gt; block, that you disable the built in -Debug switch&amp;rsquo;s functionality? Yep, seen this one a few times also.&lt;br&gt;
The community is showing a distinct lack of love for scripts that look like VBScript scripts. Does that mean your script is wrong? No - but it means you&amp;rsquo;re not approaching the problem in a way that the world in general feels is best. It doesn&amp;rsquo;t mean your script won&amp;rsquo;t work - but it means it wouldn&amp;rsquo;t be widely accepted.&lt;br&gt;
If you&amp;rsquo;re not happy with your score, look at some higher-scoring scripts. See what they&amp;rsquo;re doing differently. If you can&amp;rsquo;t figure it out, post in the forums on PowerShell.org (there&amp;rsquo;s a Scripting Games forum). Provide the permalink to your script, and solicit some feedback from the community. Tweet people and ask them to take a look. You can &lt;em&gt;ask&lt;/em&gt; for more feedback, if you want it and aren&amp;rsquo;t getting enough.&lt;br&gt;
As our judges begin to post their notes, look at what they&amp;rsquo;re writing. Maybe they didn&amp;rsquo;t pick your script to write about - but are they writing about things that you also did in your script?&lt;br&gt;
I&amp;rsquo;m seeing a lot of good scripts. But I&amp;rsquo;m also seeing some misunderstandings of some core, advanced features, like error handling, use of Verbose output, and so on. Each of those is a star to a half-star off, for me&amp;hellip; some of these things, &lt;em&gt;in my opinion,&lt;/em&gt; are severe, and I score accordingly. I haven&amp;rsquo;t seen a perfect, un-improve-able script, yet (I&amp;rsquo;m not even halfway through, yet). So no 5-stars yet. But I &lt;em&gt;am&lt;/em&gt; trying to leave comments, and I know others are, too, so hopefully folks can improve. But be patient - it takes &lt;em&gt;time.&lt;/em&gt;&lt;br&gt;
And &lt;em&gt;opinions differ.&lt;/em&gt; Let me offer an example:&lt;br&gt;
&lt;strong&gt;Write-Verbose (&amp;ldquo;Script: {0} ended at {1}&amp;rdquo; -f $MyInvocation.ScriptName, (get-date) )&lt;/strong&gt;&lt;br&gt;
****Dislike. Not saying it&amp;rsquo;s wrong at all - and some people will disagree, vehemently, with me. But I find -f strings hard to read.&lt;br&gt;
&lt;strong&gt;Write-Verbose &amp;ldquo;Script $($MyInvocation.ScriptName) ended at $(Get-Date)&amp;rdquo;&lt;/strong&gt;&lt;br&gt;
****For me, that&amp;rsquo;s easier to read. Not any more &amp;ldquo;right,&amp;rdquo; but in my company that&amp;rsquo;s the standard we adopted and that we use. Now, hopefully my opinion is being balanced by others&amp;rsquo; opinions. But, if a substantial number of people share my opinion, this code would get a low score, and a &lt;em&gt;community standard practice&lt;/em&gt; would emerge - something we can learn from &lt;em&gt;after the Games are complete.&lt;/em&gt; Because yes, I&amp;rsquo;m going to harvest the Games entries and comments long after the Games are over to help keep the conversation and education going.&lt;br&gt;
My point of this is that &lt;em&gt;none of us&lt;/em&gt; are as awesome as we think. Others will always have points of disagreement. What&amp;rsquo;s really exciting here is the opportunity to create a community consensus of what&amp;rsquo;s best. That won&amp;rsquo;t come for several weeks, yet&amp;hellip; but it &lt;em&gt;will&lt;/em&gt; come. There is &lt;strong&gt;zero immediate benefit in getting a high score in the Games, and zero immediate detriment to a low score.&lt;/strong&gt; This is going to seem harsh, but the Games are not about &lt;em&gt;you.&lt;/em&gt; They&amp;rsquo;re about &lt;em&gt;all of us.&lt;/em&gt; They&amp;rsquo;re about us developing a sense of community involvement and standards in an industry that doesn&amp;rsquo;t supply many of its own. This will happen over time, and with a lot of effort. But it&amp;rsquo;s worth it.&lt;br&gt;
Let&amp;rsquo;s continue.&lt;br&gt;
&lt;strong&gt;[ValidateScript({(Test-Path $_ -PathType Container)})]&lt;/strong&gt;&lt;br&gt;
I love that. I never thought to do that, and I love it. I&amp;rsquo;ve seen a few people do it. Bless them. I learned something!&lt;br&gt;
An aside: There&amp;rsquo;s this general undercurrent of, &amp;ldquo;I wish &amp;rsquo;expert&amp;rsquo; judges were scoring me instead of the great unwashed masses.&amp;rdquo; Let me point out some practical realities. One, every entry in the Games at this point has at least 4 votes; many have double that. The last event, most had 1, 2 at most. And yes, while &amp;rsquo;expert&amp;rsquo; judges are allegedly well-qualified to render judgment, I&amp;rsquo;m not seeing a ton of scores I completely disagree with, yet. A few. Not a ton. And you want to know a dirty secret? How many entries do you think an &amp;rsquo;expert&amp;rsquo; can look at, in the evening, after working all day (we&amp;rsquo;re all volunteers), before he just starts getting a little arbitrary and inconsistent? The number is not &amp;ldquo;infinite.&amp;rdquo; I know I got a little arbitrary last year before I caught myself and stopped for the night. So&amp;hellip; don&amp;rsquo;t discount the value of your peers&amp;rsquo; opinions. If you&amp;rsquo;re getting a low score and don&amp;rsquo;t know why, seek out answers. Yes, people should leave comments with their votes. If they don&amp;rsquo;t, take charge and seek out answers yourself.&lt;br&gt;
I &lt;strong&gt;love&lt;/strong&gt; that I&amp;rsquo;m seeing so many divergent approaches to a single (admittedly open-ended) problem. Frankly, the value here is in browsing others&amp;rsquo; approaches and picking up some tips from them. Or just seeing something different. You shouldn&amp;rsquo;t care about your &lt;em&gt;score.&lt;/em&gt; You should care about what other people are doing, and about why you think their way might be better, worse, or just different. &lt;em&gt;Make&lt;/em&gt; a learning opportunity. Don&amp;rsquo;t wait for someone to come to you with a free, written analysis of your code. Analyze &lt;em&gt;other people&amp;rsquo;s entries&lt;/em&gt; and judge yourself against their work.&lt;br&gt;
I&amp;rsquo;ve seen this a few times:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>There&rsquo;s been a lot of dismay floating around the community about the state of &ldquo;community voting&rdquo; in the Scripting Games. Some folks are voting without leaving comments (we&rsquo;ve expanded the comment field to 2000 characters, hopefully that&rsquo;ll help), and some disagreement about scores.<br>
Disagreement is natural. For example, stick a<strong>Write-Host</strong> in your script and I&rsquo;m likely to score you lower. You may disagree, but it&rsquo;s how I feel in many situations&hellip; and I&rsquo;m seeing a distressing amount of it.<br>
Did you know that using<strong>[CmdletBinding(SupportsShouldProcess=$True)]</strong> doesn&rsquo;t automatically and universally<em>make the -confirm switch work?</em> You have to do a bit more.<br>
Did you know that if you put<strong>$DebugPreference=&lsquo;SilentlyContinue&rsquo;</strong> in your<strong>BEGIN{}</strong> block, that you disable the built in -Debug switch&rsquo;s functionality? Yep, seen this one a few times also.<br>
The community is showing a distinct lack of love for scripts that look like VBScript scripts. Does that mean your script is wrong? No - but it means you&rsquo;re not approaching the problem in a way that the world in general feels is best. It doesn&rsquo;t mean your script won&rsquo;t work - but it means it wouldn&rsquo;t be widely accepted.<br>
If you&rsquo;re not happy with your score, look at some higher-scoring scripts. See what they&rsquo;re doing differently. If you can&rsquo;t figure it out, post in the forums on PowerShell.org (there&rsquo;s a Scripting Games forum). Provide the permalink to your script, and solicit some feedback from the community. Tweet people and ask them to take a look. You can<em>ask</em> for more feedback, if you want it and aren&rsquo;t getting enough.<br>
As our judges begin to post their notes, look at what they&rsquo;re writing. Maybe they didn&rsquo;t pick your script to write about - but are they writing about things that you also did in your script?<br>
I&rsquo;m seeing a lot of good scripts. But I&rsquo;m also seeing some misunderstandings of some core, advanced features, like error handling, use of Verbose output, and so on. Each of those is a star to a half-star off, for me&hellip; some of these things,<em>in my opinion,</em> are severe, and I score accordingly. I haven&rsquo;t seen a perfect, un-improve-able script, yet (I&rsquo;m not even halfway through, yet). So no 5-stars yet. But I<em>am</em> trying to leave comments, and I know others are, too, so hopefully folks can improve. But be patient - it takes<em>time.</em><br>
And<em>opinions differ.</em> Let me offer an example:<br><strong>Write-Verbose (&ldquo;Script: {0} ended at {1}&rdquo; -f $MyInvocation.ScriptName, (get-date) )</strong><br>
****Dislike. Not saying it&rsquo;s wrong at all - and some people will disagree, vehemently, with me. But I find -f strings hard to read.<br><strong>Write-Verbose &ldquo;Script $($MyInvocation.ScriptName) ended at $(Get-Date)&rdquo;</strong><br>
****For me, that&rsquo;s easier to read. Not any more &ldquo;right,&rdquo; but in my company that&rsquo;s the standard we adopted and that we use. Now, hopefully my opinion is being balanced by others&rsquo; opinions. But, if a substantial number of people share my opinion, this code would get a low score, and a<em>community standard practice</em> would emerge - something we can learn from<em>after the Games are complete.</em> Because yes, I&rsquo;m going to harvest the Games entries and comments long after the Games are over to help keep the conversation and education going.<br>
My point of this is that<em>none of us</em> are as awesome as we think. Others will always have points of disagreement. What&rsquo;s really exciting here is the opportunity to create a community consensus of what&rsquo;s best. That won&rsquo;t come for several weeks, yet&hellip; but it<em>will</em> come. There is<strong>zero immediate benefit in getting a high score in the Games, and zero immediate detriment to a low score.</strong> This is going to seem harsh, but the Games are not about <em>you.</em> They&rsquo;re about<em>all of us.</em> They&rsquo;re about us developing a sense of community involvement and standards in an industry that doesn&rsquo;t supply many of its own. This will happen over time, and with a lot of effort. But it&rsquo;s worth it.<br>
Let&rsquo;s continue.<br><strong>[ValidateScript({(Test-Path $_ -PathType Container)})]</strong><br>
I love that. I never thought to do that, and I love it. I&rsquo;ve seen a few people do it. Bless them. I learned something!<br>
An aside: There&rsquo;s this general undercurrent of, &ldquo;I wish &rsquo;expert&rsquo; judges were scoring me instead of the great unwashed masses.&rdquo; Let me point out some practical realities. One, every entry in the Games at this point has at least 4 votes; many have double that. The last event, most had 1, 2 at most. And yes, while &rsquo;expert&rsquo; judges are allegedly well-qualified to render judgment, I&rsquo;m not seeing a ton of scores I completely disagree with, yet. A few. Not a ton. And you want to know a dirty secret? How many entries do you think an &rsquo;expert&rsquo; can look at, in the evening, after working all day (we&rsquo;re all volunteers), before he just starts getting a little arbitrary and inconsistent? The number is not &ldquo;infinite.&rdquo; I know I got a little arbitrary last year before I caught myself and stopped for the night. So&hellip; don&rsquo;t discount the value of your peers&rsquo; opinions. If you&rsquo;re getting a low score and don&rsquo;t know why, seek out answers. Yes, people should leave comments with their votes. If they don&rsquo;t, take charge and seek out answers yourself.<br>
I<strong>love</strong> that I&rsquo;m seeing so many divergent approaches to a single (admittedly open-ended) problem. Frankly, the value here is in browsing others&rsquo; approaches and picking up some tips from them. Or just seeing something different. You shouldn&rsquo;t care about your<em>score.</em> You should care about what other people are doing, and about why you think their way might be better, worse, or just different.<em>Make</em> a learning opportunity. Don&rsquo;t wait for someone to come to you with a free, written analysis of your code. Analyze<em>other people&rsquo;s entries</em> and judge yourself against their work.<br>
I&rsquo;ve seen this a few times:</p><p><code># Validate that the source/log path provided is valid if (-not (Test-Path $LogDirectory)) { Read-Host -Prompt 'Please provide a valid log directory'; }</code>I had honestly never thought of that. I&rsquo;m not sure how I feel about it. Generally, PowerShell commands throw errors - they don&rsquo;t prompt you to retry, and I&rsquo;m a big fan of consistency with the native commands. Right now I think this is a 1/8th point off for me&hellip; but I appreciate the approach and I&rsquo;m still thinking about it.<br>
I&rsquo;ve seen this a<strong>lot:</strong></p><p>`Get-ChildItem -Path $LogDirectory -Filter $Filter |
Where-Object {
$<em>.PSIsContainer -eq $false
-and
$</em>.LastWriteTime -le (Get-Date).AddDays(-($RetentionPeriod)) } |
ForEach-Object {
$RelativePath = $_.FullName.Substring($LogDirectory.Length);</p><h1 id="truncated" class="ps-heading">(truncated)<a class="ps-heading-anchor" href="#truncated" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>`Personally, dislike. That&rsquo;s command-line, console-host approach - not a script. I think these massive pipeline blocks, in a script, are harder to read. Are they wrong? No. Will someone disagree with me? Yes. Again, vehemently. But I&rsquo;m entitled to my opinion, and my opinion is that I&rsquo;d rather see a scripting construct (ForEach) than a massive pipeline construct. Not in every scenario ever, perhaps, but&hellip; I&rsquo;m biased against this approach. Understand that<strong>Where-Object</strong> is really just a ForEach loop in sheep&rsquo;s clothing&hellip; I suspect a single ForEach scripting construct could accomplish this block of logic in less time. As-is, you&rsquo;re looping through each object at least once&hellip; and many of them twice. That could be tighter.<br><strong>Write-Warning $_.Exception.Message</strong><br>
****This bums me out a little and I&rsquo;ve seen it a lot. $_ can get hijacked a little easily, depending on your code&hellip; and frankly, it&rsquo;s hard to read. Why not take one extra step and use -ErrorVariable to capture the error into an easy-to-read variable name, and work with that? There<em>are</em> some arguments why not&hellip; but, in a broad sense, I prefer declarative, explicit stuff vs. weird built-in variables. I hate $_ even though it&rsquo;s used bloody everywhere.</p><blockquote><p>Another aside: I&rsquo;ve gotten several support e-mails from folks who missed the cutoff time. The site<strong>clearly indicates that all times are GMT.</strong> This is a global competition, and your local time zone isn&rsquo;t the only one out there. We can&rsquo;t provide exceptions to the cutoff - I&rsquo;m truly sorry about that, but you can continue to participate in the next event.<strong>All times are GMT.</strong> The Competitor Guide also clearly states that all ties will be given as GMT, and if you&rsquo;ve any confusion, the menu bar of the Games Web site lists the current time in GMT, which is what the server uses to make all scheduling decisions.</p></blockquote><p><strong>[ValidateScript({Test-Path $_})]</strong><br>
****I freaking love that. Points off if you&rsquo;ve included that<strong>and</strong> you&rsquo;ve coded a manual check for the path. Redundancy doesn&rsquo;t pay, unless it&rsquo;s a server cluster.</p><p><code>if (!(Get-PSDrive -Name "dest" -ErrorAction:SilentlyContinue)){ try { New-PSDrive -Name "dest" -PSProvider FileSystem -Root $Destination -ErrorAction:Stop | Out-Null } catch { throw "Cannot establish PS Drive for destination: $Destination. Check the path and try again." } }</code>I am at a bit of a loss as to why this solution needed a PSDrive. I mean&hellip; not wrong, but befuddling. I do tend to down-vote code I regard as unnecessary (and a lengthy comment explaining why you feel it&rsquo;s necessary won&rsquo;t help, if I disagree). In this case&hellip; I was just confused as to the need. Oh, and<strong>-ErrorAction:SilentlyContinue</strong> looks plain weird. Why would you include the colon? You didn&rsquo;t for any other parameter. Minus 1/8th point for style - just because I&rsquo;m a stickler for consistency, and using the colon breaks consistency. Some poor slob in the future is going to look at this and wonder, &ldquo;when do I use a colon and when don&rsquo;t I? Aggh!&rdquo; and I&rsquo;m going to have to write a book about it. Argh. .<br>
Look at<a href="http://scriptinggames.org/entrylist.php?entryid=16">http://scriptinggames.org/entrylist.php?entryid=16</a> and tell me why I love it. Man, I hope that link works. If it doesn&rsquo;t don&rsquo;t yell - I&rsquo;ll fix it.<br>
Oh:</p><p><code>param( [Parameter(Position=0)] [string]$Source = "C:\Application\Log", [Parameter(Position=1)] [string]$Destination = "\\NASServer\Archives", [int]$MaxAge = 90 )</code>I don&rsquo;t downvote for this, but I&rsquo;m curious: Why declare a position for every parameter, when what you&rsquo;ve declared is the default? Without those<strong>Position=x</strong> statements, you&rsquo;d get exactly the same thing, right? Seems unnecessary?<br>
Want more feedback?<a href="http://scriptinggames.org/entrylist.php?entryid=165">http://scriptinggames.org/entrylist.php?entryid=165</a>. That&rsquo;s the Scripting Wife&rsquo;s entry. She&rsquo;s an<em>accountant.</em> But she&rsquo;s taken the time to be loved, so everyone votes on her entry. And I&rsquo;ll point out she&rsquo;s not getting a 5.0 score - so folks are clearly willing to be critical, even in spite of love.<br>
Go, and be loved .</p>
]]></content:encoded></item><item><title>How to Name Your Help Files</title><link>https://powershell.org/articles/2013-04-30-how-to-name-your-help-files/</link><guid>https://powershell.org/articles/2013-04-30-how-to-name-your-help-files/</guid><pubDate>Tue, 30 Apr 2013 22:42:53 +0000</pubDate><description>&lt;p&gt;The first challenge of Scripting Games 2013 is complete! Honestly, you win by getting the experience of playing. I hope everyone is in there voting and writing really constructive comments. I&amp;rsquo;ll get over there in a minute, but I wanted to make sure that I got this information out to everyone before I get involved in voting.&lt;br&gt;
Everyone who writes shared Windows PowerShell cmdlets, functions, scripts, CIM commands, and workflows also writes help topics &amp;ldquo;“ or gets a friend or colleague to do it.&lt;br&gt;
For scripts and functions, you can write &lt;a href="http://go.microsoft.com/fwlink/?LinkID=144309"&gt;comment-based help&lt;/a&gt; (aka &amp;ldquo;inline help&amp;rdquo;).  All parameters of the Get-Help cmdlet support comment-based help, including the new ShowWindow parameter, and by adding a URL to the first related link, you can support the Online parameter in comment-based help.&lt;br&gt;
But XML help files are required to document cmdlets (C#), CIM commands, and workflows, and to support Updatable Help. If you&amp;rsquo;re delivering your content in a module, you typically want to use XML-based help topics.&lt;br&gt;
When you create XML-based help topics, you need to put them where Get-Help looks and give them the name that Get-Help expects. Otherwise, Get-Help will not find the help topic.&lt;br&gt;
Get-Help looks for the XML-based help topics for the commands in a module in language-specific subdirectories of the module&amp;rsquo;s installation directory.  This is generally well-known and an easy instruction to follow.&lt;br&gt;
The naming guidelines are a bit trickier. In general (specifics follow), Get-Help expects the help topic for a command to be in a help file that is named for the file in which the command is defined, including the file name extension. When the commands in a module are defined in multiple assemblies or multiple CDXML files, the module must include a separate help file for each assembly or CDXML file.&lt;br&gt;
The help file name format is: &lt;strong&gt;-help.xml&lt;/strong&gt;&lt;br&gt;
For example:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The first challenge of Scripting Games 2013 is complete! Honestly, you win by getting the experience of playing. I hope everyone is in there voting and writing really constructive comments. I&rsquo;ll get over there in a minute, but I wanted to make sure that I got this information out to everyone before I get involved in voting.<br>
Everyone who writes shared Windows PowerShell cmdlets, functions, scripts, CIM commands, and workflows also writes help topics &ldquo;“ or gets a friend or colleague to do it.<br>
For scripts and functions, you can write<a href="http://go.microsoft.com/fwlink/?LinkID=144309">comment-based help</a> (aka &ldquo;inline help&rdquo;).  All parameters of the Get-Help cmdlet support comment-based help, including the new ShowWindow parameter, and by adding a URL to the first related link, you can support the Online parameter in comment-based help.<br>
But XML help files are required to document cmdlets (C#), CIM commands, and workflows, and to support Updatable Help. If you&rsquo;re delivering your content in a module, you typically want to use XML-based help topics.<br>
When you create XML-based help topics, you need to put them where Get-Help looks and give them the name that Get-Help expects. Otherwise, Get-Help will not find the help topic.<br>
Get-Help looks for the XML-based help topics for the commands in a module in language-specific subdirectories of the module&rsquo;s installation directory.  This is generally well-known and an easy instruction to follow.<br>
The naming guidelines are a bit trickier. In general (specifics follow), Get-Help expects the help topic for a command to be in a help file that is named for the file in which the command is defined, including the file name extension. When the commands in a module are defined in multiple assemblies or multiple CDXML files, the module must include a separate help file for each assembly or CDXML file.<br>
The help file name format is:<strong>-help.xml</strong><br>
For example:</p><ul><li>System.Management.Automation.dll-help.xml    #Cmdlets, providers</li><li>MSFT_NetIPAddress.cdxml-help.xml             # CIM commands</li><li>RemoteDesktop.psm1-help.xml                  # Functions, Script workflows</li></ul><p>Here are the specifics:</p><ul><li><strong>Cmdlets</strong>:  Help topics for cmdlets must be in a file that is named for the<em>assembly</em> in which the cmdlet is defined.</li><li><strong>Providers</strong>:  Just like cmdlets, the help topics for providers must be in a file that is named for the assembly in which the provider is defined. The order in which cmdlet and provider help topics appear in the XML file doesn&rsquo;t matter a bit.</li><li><strong>CIM Commands</strong>: Help topics for CIM commands must be in a file that is named for the CDXML file in which the cmdlet is defined. Yup, if you have a module with 22 nested CIM modules, each with its own CDXML file, you need to create 22 CDXML-help.xml files. J</li></ul><p>Easy, right? Now it gets a bit weird.</p><ul><li><strong>Script workflows</strong>: You can write XML help files for script workflows in modules. The names don&rsquo;t matter. Get-Help looks in all XML files in the language-specific subdirectories of the module directory. However, to be consistent, it&rsquo;s best to name script workflow help files for the script module in which they are defined. For example, .psm1-help.xml.</li><li><strong>Functions</strong>:  Get-Help looks in the function code for an<strong>.ExternalHelp</strong> comment. The value of the comment is the help file name. If there&rsquo;s no ExternalHelp comment, Get-Help cannot find the XML based help file, no matter where it is or what it&rsquo;s named.Get-Help does not require a particular name for function help files, but they&rsquo;re typically named for the script module in which they are defined, such as MyModule.psm1-help.xml.For example:</li></ul><p><code>Function MyFunction { #.ExternalHelp MyModule.psm1-help.xml [CmdletBinding()] [OutputType([int])] Param . . . }</code>-or</p><p><code>#.ExternalHelp MyModule.psm1-help.xml Function MyFunction { [CmdletBinding()] [OutputType([int])] Param . . . }</code>If your module contains cmdlets and functions, you can put all of your help topics in the same XML file, but each function must include an ExternalHelp comment with the name of the XML help file.</p><p>That&rsquo;s the story. So, if you are writing XML help files, be sure that the name and placement of the help files is correct. If you&rsquo;re stuck, ping me on Facebook or Twitter (@juneb_get_help) and I&rsquo;ll give you a hand.</p>
]]></content:encoded></item><item><title>New Technical Product Manager at Provance Technologies</title><link>https://powershell.org/articles/2013-04-30-new-technical-product-manager-at-provance-technologies/</link><guid>https://powershell.org/articles/2013-04-30-new-technical-product-manager-at-provance-technologies/</guid><pubDate>Tue, 30 Apr 2013 19:25:34 +0000</pubDate><description>&lt;p&gt;Today is my first day working in my new role as Technical Product Manager at &lt;a href="http://www.provance.com/" title="Provance Technologies"&gt;Provance Technologies&lt;/a&gt;.  A little while back Provance approached me to talk about this position, and it seemed like a very natural fit.  Rarely have I felt such a positive vibe from a company through the interview process, so I was really happy to accept the position of Technical Product Manager with them and I have been looking forward to starting work with them.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Today is my first day working in my new role as Technical Product Manager at<a href="http://www.provance.com/" title="Provance Technologies">Provance Technologies</a>.  A little while back Provance approached me to talk about this position, and it seemed like a very natural fit.  Rarely have I felt such a positive vibe from a company through the interview process, so I was really happy to accept the position of Technical Product Manager with them and I have been looking forward to starting work with them.</p><p>Now that I am working full-time with<a href="http://provance.com/" title="Provance Technologies">Provance</a>, I"™ll be getting up to speed as quickly as I can on the IT Asset Management Pack and the Data Management Pack products that we offer to help companies properly manage the assets they have inside their organization.  I know there is already some PowerShell support in one of the products, although I haven"™t personally taken a look at it yet (but you can bet I will be soon).</p><p>For those of you who regularly follow my blog, if you happen to use either of these products in your organization, I"™d love to hear about it.</p><p>Kirk out.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/kirkmunro.wordpress.com/862/"><img src="http://feeds.wordpress.com/1.0/comments/kirkmunro.wordpress.com/862/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=poshoholic.com&amp;blog=1436967&amp;%23038;post=862&amp;%23038;subd=kirkmunro&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Scripting Games Voting Continues!</title><link>https://powershell.org/articles/2013-04-30-scripting-games-voting-continues/</link><guid>https://powershell.org/articles/2013-04-30-scripting-games-voting-continues/</guid><pubDate>Tue, 30 Apr 2013 17:52:21 +0000</pubDate><description>&lt;p&gt;As of right now, we&amp;rsquo;ve got almost 1900 votes on entries in the &lt;a href="http://scriptinggames.org/"&gt;Scripting Games&lt;/a&gt;. Remember that each vote is a &amp;ldquo;pointlet&amp;rdquo; (see the PowerShell tie-in we did there?), which is basically a raffle ticket in our prize lottery.&lt;br&gt;
But&amp;hellip; there&amp;rsquo;s a secret about the lottery. It&amp;rsquo;s weighted based on how many entries you&amp;rsquo;ve voted on.&lt;br&gt;
The algorithm is a bit complex, but for example, if you&amp;rsquo;ve voted on 90% of the available entries, you&amp;rsquo;re something like 30% more likely to win a prize. Vote on 50%, and you&amp;rsquo;re about 12% more likely to win&amp;hellip; and so on. It&amp;rsquo;s a bit logarithmic&amp;hellip; as you get closer to 100% your chances of winning increase more and more, with about a 39% advantage if you&amp;rsquo;ve voted on 100% of the events.&lt;br&gt;
Of course, you can&amp;rsquo;t just abuse the system. We&amp;rsquo;ve got automated and manual checks in place for people who are just randomly voting - clicking all the same vote, voting in patterns, or voting with very little time separation between votes. All of those things will trigger a manual review, and you can be banned &lt;em&gt;for life&lt;/em&gt; for attempting to game the system. We&amp;rsquo;re also tracking IP addresses and whatnot, so if you&amp;rsquo;re voting from multiple accounts, or trying to upvote your own entries&amp;hellip; we&amp;rsquo;re going to just shut you out. You won&amp;rsquo;t even necessarily be notified, because we&amp;rsquo;re not confrontational folks.&lt;br&gt;
But I know nobody&amp;rsquo;d do all that - we&amp;rsquo;re all in this to make the Games fun and educational! So get in there and vote. And leave comments. If you vote 1-star, tell the author why, so they can improve. Hey, it&amp;rsquo;s what YOU would want if someone 1-starred YOUR code, right? Right!&lt;br&gt;
So vote! &lt;a href="http://scriptinggames.org/"&gt;http://ScriptingGames.org&lt;/a&gt;!&lt;br&gt;
(PS - please don&amp;rsquo;t report any tech problems in the comments here. The Games Web site has a feedback link)&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As of right now, we&rsquo;ve got almost 1900 votes on entries in the<a href="http://scriptinggames.org/">Scripting Games</a>. Remember that each vote is a &ldquo;pointlet&rdquo; (see the PowerShell tie-in we did there?), which is basically a raffle ticket in our prize lottery.<br>
But&hellip; there&rsquo;s a secret about the lottery. It&rsquo;s weighted based on how many entries you&rsquo;ve voted on.<br>
The algorithm is a bit complex, but for example, if you&rsquo;ve voted on 90% of the available entries, you&rsquo;re something like 30% more likely to win a prize. Vote on 50%, and you&rsquo;re about 12% more likely to win&hellip; and so on. It&rsquo;s a bit logarithmic&hellip; as you get closer to 100% your chances of winning increase more and more, with about a 39% advantage if you&rsquo;ve voted on 100% of the events.<br>
Of course, you can&rsquo;t just abuse the system. We&rsquo;ve got automated and manual checks in place for people who are just randomly voting - clicking all the same vote, voting in patterns, or voting with very little time separation between votes. All of those things will trigger a manual review, and you can be banned<em>for life</em> for attempting to game the system. We&rsquo;re also tracking IP addresses and whatnot, so if you&rsquo;re voting from multiple accounts, or trying to upvote your own entries&hellip; we&rsquo;re going to just shut you out. You won&rsquo;t even necessarily be notified, because we&rsquo;re not confrontational folks.<br>
But I know nobody&rsquo;d do all that - we&rsquo;re all in this to make the Games fun and educational! So get in there and vote. And leave comments. If you vote 1-star, tell the author why, so they can improve. Hey, it&rsquo;s what YOU would want if someone 1-starred YOUR code, right? Right!<br>
So vote!<a href="http://scriptinggames.org/">http://ScriptingGames.org</a>!<br>
(PS - please don&rsquo;t report any tech problems in the comments here. The Games Web site has a feedback link)</p>
]]></content:encoded></item><item><title>Meet the Scripting Games Judges: June Blender</title><link>https://powershell.org/articles/2013-04-30-meet-the-scripting-games-judges-june-blender/</link><guid>https://powershell.org/articles/2013-04-30-meet-the-scripting-games-judges-june-blender/</guid><pubDate>Tue, 30 Apr 2013 17:15:20 +0000</pubDate><description>&lt;p&gt;June Blender is was a senior programming writer on the Windows PowerShell team at Microsoft from Windows PowerShell 1.0 &amp;ldquo;“ 3.0. You see her work every time you type Get-Help for the core modules. She&amp;rsquo;s now working on the Windows Azure Active Directory SDK team, and she remains an avid Windows PowerShell user and a passionate user advocate. She&amp;rsquo;s a guest blogger for the Scripting Guys and she tweets Windows PowerShell tips on Twitter at @juneb_get_help.&lt;br&gt;
An engineering type by disposition, June was attracted to Windows PowerShell by the efficiency, productivity, and uniformity of automation. As a full-time working mom of three sons (now adults!), the idea of doing anything twice, unless it&amp;rsquo;s fun, is appalling. When evaluating scripts, she looks for elegance, but prefers scripts that inspire to those that intimidate. If saving a line of code makes your script difficult to understand and maintain, it&amp;rsquo;s not worth it. The scripts that get a thumbs-up from June are those that reveal a new way of performing a task and can be used as a template for scripts to come. Oh, and they must have Help!&lt;br&gt;
June&amp;rsquo;s philosophy about Help is pretty simple. It&amp;rsquo;s supposed to make the task easier &amp;ldquo;“ clear, complete, and accurate. A parameter description that says that ServerName is the name of the server isn&amp;rsquo;t worth the characters you use to type it, but neither is the one that says that a parameter retrieves the modification of the nth cell in the hierarchically rarified data structure. She hates passive voice, too, because you don&amp;rsquo;t know who is supposed to act. About topics are critical. A whole mess of disjointed cmdlet help without an explanation of how they are intended to be used is not really helpful. And the best part of help is the examples. You really can&amp;rsquo;t have too many (see &amp;ldquo;Get-Help Invoke-Command&amp;rdquo;).&lt;br&gt;
Community is the secret sauce in Windows PowerShell, so the best scripts contribute to our shared knowledge, productivity, and fun. June much prefer scripts and functions that you can open, read, and model to compiled anything.&lt;br&gt;
A 16-year veteran of Microsoft, June lives in magnificent Escalante, Utah, where she works remotely when she&amp;rsquo;s not out hiking, canyoneering, taking Coursera classes, or convincing lost tourists to try Windows PowerShell. She believes that outstanding documentation is a collaborative effort, and she welcomes your comments and contributions to Windows PowerShell and Windows Azure Help.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>June Blender is was a senior programming writer on the Windows PowerShell team at Microsoft from Windows PowerShell 1.0 &ldquo;“ 3.0. You see her work every time you type Get-Help for the core modules. She&rsquo;s now working on the Windows Azure Active Directory SDK team, and she remains an avid Windows PowerShell user and a passionate user advocate. She&rsquo;s a guest blogger for the Scripting Guys and she tweets Windows PowerShell tips on Twitter at @juneb_get_help.<br>
An engineering type by disposition, June was attracted to Windows PowerShell by the efficiency, productivity, and uniformity of automation. As a full-time working mom of three sons (now adults!), the idea of doing anything twice, unless it&rsquo;s fun, is appalling. When evaluating scripts, she looks for elegance, but prefers scripts that inspire to those that intimidate. If saving a line of code makes your script difficult to understand and maintain, it&rsquo;s not worth it. The scripts that get a thumbs-up from June are those that reveal a new way of performing a task and can be used as a template for scripts to come. Oh, and they must have Help!<br>
June&rsquo;s philosophy about Help is pretty simple. It&rsquo;s supposed to make the task easier &ldquo;“ clear, complete, and accurate. A parameter description that says that ServerName is the name of the server isn&rsquo;t worth the characters you use to type it, but neither is the one that says that a parameter retrieves the modification of the nth cell in the hierarchically rarified data structure. She hates passive voice, too, because you don&rsquo;t know who is supposed to act. About topics are critical. A whole mess of disjointed cmdlet help without an explanation of how they are intended to be used is not really helpful. And the best part of help is the examples. You really can&rsquo;t have too many (see &ldquo;Get-Help Invoke-Command&rdquo;).<br>
Community is the secret sauce in Windows PowerShell, so the best scripts contribute to our shared knowledge, productivity, and fun. June much prefer scripts and functions that you can open, read, and model to compiled anything.<br>
A 16-year veteran of Microsoft, June lives in magnificent Escalante, Utah, where she works remotely when she&rsquo;s not out hiking, canyoneering, taking Coursera classes, or convincing lost tourists to try Windows PowerShell. She believes that outstanding documentation is a collaborative effort, and she welcomes your comments and contributions to Windows PowerShell and Windows Azure Help.</p>
]]></content:encoded></item><item><title>Event 1: My way…</title><link>https://powershell.org/articles/2013-04-29-event-1-my-way/</link><guid>https://powershell.org/articles/2013-04-29-event-1-my-way/</guid><pubDate>Tue, 30 Apr 2013 06:11:36 +0000</pubDate><description>&lt;p&gt;Looking for not-so-expert solution for Event 1 in both categories? Wonder how one of the judges would do it, if he had a chance? Want to return favor and tell me what I could do better and what I&amp;rsquo;m doing wrong? Don&amp;rsquo;t hesitate. 🙂 I decided it may be helpful to post my solutions before I ever see yours. Please find full article with lots of code on my &lt;a href="http://becomelotr.wordpress.com/2013/04/30/event-1-my-way/"&gt;blog&lt;/a&gt;. If you want to tell me you like/ hate this idea - please don&amp;rsquo;t hesitate either. And now I move on to your work. Can&amp;rsquo;t wait!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Looking for not-so-expert solution for Event 1 in both categories? Wonder how one of the judges would do it, if he had a chance? Want to return favor and tell me what I could do better and what I&rsquo;m doing wrong? Don&rsquo;t hesitate. 🙂 I decided it may be helpful to post my solutions before I ever see yours. Please find full article with lots of code on my<a href="http://becomelotr.wordpress.com/2013/04/30/event-1-my-way/">blog</a>. If you want to tell me you like/ hate this idea - please don&rsquo;t hesitate either. And now I move on to your work. Can&rsquo;t wait!</p>
]]></content:encoded></item><item><title>CIM vs WMI cmdlets-remote execution speed</title><link>https://powershell.org/articles/2013-04-29-cim-vs-wmi-cmdlets-remote-execution-speed/</link><guid>https://powershell.org/articles/2013-04-29-cim-vs-wmi-cmdlets-remote-execution-speed/</guid><pubDate>Mon, 29 Apr 2013 19:08:48 +0000</pubDate><description>&lt;p&gt;Following on from my previous post we&amp;quot;™ll look at how the two types of cmdlets compare for accessing remote machines.&lt;/p&gt;
&lt;p&gt;I used a similar format to the previous tests but was accessing a remote machine.&lt;/p&gt;
&lt;p&gt;First off was the WMI cmdlet &amp;ldquo;“ using DCOM to access the remote Windows 2012 server&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PS&amp;gt; 1..100 |&lt;br&gt;
foreach {&lt;br&gt;
Measure-Command -Expression{1..100 | foreach {Get-WmiObject -Class Win32_ComputerSystem -ComputerName W12SUS }}&lt;br&gt;
} |&lt;br&gt;
Measure-Object -Average TotalMilliseconds&lt;/strong&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Following on from my previous post we"™ll look at how the two types of cmdlets compare for accessing remote machines.</p><p>I used a similar format to the previous tests but was accessing a remote machine.</p><p>First off was the WMI cmdlet &ldquo;“ using DCOM to access the remote Windows 2012 server</p><p><strong>PS&gt; 1..100 |<br>
foreach {<br>
Measure-Command -Expression{1..100 | foreach {Get-WmiObject -Class Win32_ComputerSystem -ComputerName W12SUS }}<br>
} |<br>
Measure-Object -Average TotalMilliseconds</strong></p><p>Count : 100<br>
Average : 2084.122547<br>
Sum :<br>
Maximum :<br>
Minimum :<br>
Property : TotalMilliseconds</p><p>The CIM cmdlets are similar but apparently a bit slower &ldquo;“ probably due to having to build the WSMAN connection and teat it down each time.</p><p><strong>PS&gt; 1..100 |<br>
foreach {<br>
Measure-Command -Expression{1..100 | foreach {Get-CimInstance -ClassName Win32_ComputerSystem -ComputerName W12SUS }}<br>
} |<br>
Measure-Object -Average TotalMilliseconds</strong></p><p>Count : 100<br>
Average : 2627.287458<br>
Sum :<br>
Maximum :<br>
Minimum :<br>
Property : TotalMilliseconds</p><p>So what happens is you run the CIM command over a CIM session?</p><p><strong>PS&gt; $sess = New-CimSession -ComputerName W12SUS<br>
PS&gt; 1..100 |<br>
foreach {<br>
Measure-Command -Expression{1..100 | foreach {Get-CimInstance -ClassName Win32_ComputerSystem -CimSession $sess }}<br>
} |<br>
Measure-Object -Average TotalMilliseconds</strong></p><p>Count : 100<br>
Average : 877.746649999999<br>
Sum :<br>
Maximum :<br>
Minimum :<br>
Property : TotalMilliseconds</p><p>This removes the setup and tear-down of the WSMAN connection. It suggests that the actual retrieval time for the CIM cmdlets should be reduced to 1749.540808 milliseconds for 100 accesses which is faster than the WMI cmdlets</p><p>It looks like the fastest way to access WMI information is across a CIM session. Next time we&rdquo;™ll look at running multiple commands</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2846/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2846/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2846&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Name that Property</title><link>https://powershell.org/articles/2013-04-29-name-that-property/</link><guid>https://powershell.org/articles/2013-04-29-name-that-property/</guid><pubDate>Mon, 29 Apr 2013 18:47:25 +0000</pubDate><description>&lt;p&gt;Challenge #1 of Scripting Games 2013 is coming to a close. I can&amp;rsquo;t wait to see the results! I solved both the Beginner and Advanced versions just for practice and I learned a lot along the way. They&amp;rsquo;re not easy, but if you haven&amp;rsquo;t yet tried them, go for it. And be sure to review the candidate solutions for new techniques.&lt;br&gt;
In my last post, I showed a very easy way to create a custom object in Windows PowerShell 3.0 and I argued that returning a custom object is far better than returning formatted objects. But, when you are formatting or selecting properties from an existing object, you can customize the names of the properties and their values. This techique isn&amp;rsquo;t new to Windows PowerShell 3.0 &amp;ldquo;“ it works in all versions &amp;ndash; but it&amp;rsquo;s really handy, and I&amp;rsquo;ve noticed that not a lot of people use it.&lt;br&gt;
Let&amp;rsquo;s start by changing the name of a table column. In this case, the big boss wants a list of files and their attributes. Get-ChildItem (&amp;ldquo;dir&amp;rdquo;) just about does it, but the property name is &amp;ldquo;Mode,&amp;rdquo; not &amp;ldquo;Atrributes,&amp;rdquo; and the big boss is a picky dude.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Challenge #1 of Scripting Games 2013 is coming to a close. I can&rsquo;t wait to see the results! I solved both the Beginner and Advanced versions just for practice and I learned a lot along the way. They&rsquo;re not easy, but if you haven&rsquo;t yet tried them, go for it. And be sure to review the candidate solutions for new techniques.<br>
In my last post, I showed a very easy way to create a custom object in Windows PowerShell 3.0 and I argued that returning a custom object is far better than returning formatted objects. But, when you are formatting or selecting properties from an existing object, you can customize the names of the properties and their values. This techique isn&rsquo;t new to Windows PowerShell 3.0 &ldquo;“ it works in all versions &ndash; but it&rsquo;s really handy, and I&rsquo;ve noticed that not a lot of people use it.<br>
Let&rsquo;s start by changing the name of a table column. In this case, the big boss wants a list of files and their attributes. Get-ChildItem (&ldquo;dir&rdquo;) just about does it, but the property name is &ldquo;Mode,&rdquo; not &ldquo;Atrributes,&rdquo; and the big boss is a picky dude.</p><p>`PS C:\ Get-ChildItem
Directory: C:<br>
Mode LastWriteTime Length Name</p><hr><p>d&mdash;- 10/9/2012 1:05 PM 2008
d&mdash;- 10/9/2012 1:05 PM 2009
d&mdash;- 10/9/2012 1:05 PM AssemblyTest
d&mdash;- 10/9/2012 1:05 PM CabTest
d&mdash;- 10/24/2012 1:27 PM Snippets
-ar&ndash; 3/7/2011 6:50 AM 0 ApplicationError.txt
-ar&ndash; 11/19/2010 2:42 PM 274 archive-Projects.ps1
-a&ndash; 12/13/2010 11:18 AM 3052 Backup-Files.ps1
-a&ndash; 3/2/2011 7:42 PM 312 Check-Examples.ps1
-a&ndash; 9/29/2010 6:57 AM 728 Compare-ParameterSets.ps1
-ar&ndash; 10/24/2012 12:44 PM 1146 Compare-UpdatableHelpVersion.ps1
`Quick fix! Change the name of the Mode property to Attributes.</p><p><code>Get-ChildItem | Select-Object @{Name="Attributes";Expression={$_.Mode}},</code>
LastWriteTime, Name
Directory: C:<br>
Attributes LastWriteTime Name</p><hr><p>d&mdash;- 10/9/2012 1:05 PM 2008
d&mdash;- 10/9/2012 1:05 PM 2009
d&mdash;- 10/9/2012 1:05 PM AssemblyTest
d&mdash;- 10/9/2012 1:05 PM CabTest
d&mdash;- 10/24/2012 1:27 PM Snippets
-ar&ndash; 3/7/2011 6:50 AM ApplicationError.txt
-ar&ndash; 11/19/2010 2:42 PM archive-Projects.ps1
-a&ndash; 12/13/2010 11:18 AM Backup-Files.ps1
-a&ndash; 3/2/2011 7:42 PM Check-Examples.ps1
-a&ndash; 9/29/2010 6:57 AM Compare-ParameterSets.ps1
-ar&ndash; 10/24/2012 12:44 PM Compare-UpdatableHelpVersion.ps1
`Note: I omitted the Length property here so the table is easier to display, but you can add it back if you&rsquo;d like.<br>
This value is called a<em>calculated property</em>. You can use calculated properties in Select-Object, Format-Table, and Format-List commands, and in commands that use other cmdlets where it&rsquo;s noted in the help topic.<br>
A<em>calculated property</em> is a hash table (@{Name=Value; Name=Value&rdquo;¦} ). The first key is either<strong>Name</strong> or<strong>Label</strong> and the second key is<strong>Expression</strong>. The value of the<strong>Name</strong> (or<strong>Label</strong>) key is the name that you want to assign to the property. The value of the<strong>Expression</strong> key is a script block (inside braces) that gets the property value.<br>
In this case, I just want to rename the &ldquo;Mode&rdquo; property to &ldquo;Attributes,&rdquo; so the value of the <strong>Name</strong> key is &ldquo;Attributes&rdquo; and the value of the<strong>Expression</strong> key is a tiny script block that gets the value of the Mode property of each object that is passed to it.</p><p><code>@{Name = "Attributes"; Expression = {$_.Mode}}</code>Just for practice, let&rsquo;s rename &ldquo;LastWriteTime&rdquo; to &ldquo;Updated.&rdquo;</p><p><code>@{Name = "Updated"; Expression = {$_.LastWriteTime}}</code>Now, you can use the calculated property in a Select-Object, Format-Table, or Format-List command. Put it where you usually put the property name.</p><p><code>Get-ChildItem | Select-Object @{Name = "Attributes"; Expression = {$_.Mode}},</code>
@{Name = &ldquo;Updated&rdquo;; Expression = {$_.LastWriteTime}}, Name
Directory: C:<br>
Attributes Updated Name</p><hr><p>d&mdash;- 10/9/2012 1:05 PM 2008
d&mdash;- 10/9/2012 1:05 PM 2009
d&mdash;- 10/9/2012 1:05 PM AssemblyTest
d&mdash;- 10/9/2012 1:05 PM CabTest
d&mdash;- 10/24/2012 1:27 PM Snippets
-ar&ndash; 3/7/2011 6:50 AM ApplicationError.txt
-ar&ndash; 11/19/2010 2:42 PM archive-Projects.ps1
-a&ndash; 12/13/2010 11:18 AM Backup-Files.ps1
-a&ndash; 3/2/2011 7:42 PM Check-Examples.ps1
-a&ndash; 9/29/2010 6:57 AM Compare-ParameterSets.ps1
-ar&ndash; 10/24/2012 12:44 PM Compare-UpdatableHelpVersion.ps1
`After you&rsquo;ve played with this for a while, try changing the value of the <strong>Expression</strong> key so that it gets exactly the value that you need instead of the default property value.<br>
What if the big boss wants that Updated (LastWriteTime) value in Coordinated Universal Time (UTC)? No problem! Just change the expression to call the ToUniversalTime method of DateTime objects. And while we&rsquo;re perfecting, let&rsquo;s change the property name to better describe its new value.<br>
Here&rsquo;s the calculated property:</p><p><code>@{Name = "Updated_UTC";Expression={$_.LastWriteTime.ToUniversalTime()}}</code>And here it is in a command:</p><p>`PS C:\ Get-ChildItem | Select-Object @{Name = &ldquo;Attributes&rdquo;; Expression = {$<em>.Mode}},
@{Name = &ldquo;Updated_UTC&rdquo;; Expression = {$</em>.LastWriteTime.ToUniversalTime()}}, Name
Attributes Updated_UTC Name</p><hr><p>d&mdash;- 10/9/2012 8:05:46 PM 2008
d&mdash;- 10/9/2012 8:05:46 PM 2009
d&mdash;- 10/9/2012 8:05:46 PM AssemblyTest
d&mdash;- 10/9/2012 8:05:46 PM CabTest
d&mdash;- 10/24/2012 8:27:30 PM Snippets
-ar&ndash; 3/7/2011 2:50:08 PM ApplicationError.txt
-ar&ndash; 11/19/2010 10:42:33 PM archive-Projects.ps1
-a&mdash; 12/13/2010 7:18:18 PM Backup-Files.ps1
-a&mdash; 3/3/2011 3:42:02 AM Check-Examples.ps1
-a&mdash; 9/29/2010 1:57:27 PM Compare-ParameterSets.ps1
-ar&ndash; 10/24/2012 7:44:49 PM Compare-UpdatableHelpVersion.ps1
`I find this technique to be really handy and I hope you do, too. Just don&rsquo;t get caught up in syntax errors. Remember that a calculated property ends in<em><strong>two braces</strong></em>; one to end the expression script block and the other to end the hash table.</p>
]]></content:encoded></item><item><title>AD Management in a Month of Lunches"“ chapter 9 in MEAP</title><link>https://powershell.org/articles/2013-04-29-ad-management-in-a-month-of-lunches-chapter-9-in-meap/</link><guid>https://powershell.org/articles/2013-04-29-ad-management-in-a-month-of-lunches-chapter-9-in-meap/</guid><pubDate>Mon, 29 Apr 2013 18:23:15 +0000</pubDate><description>&lt;p&gt;The MEAP for AD Management in a Month of Lunches has been updated with the release of chapter 9 on managing group policies&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2844/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2844/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2844&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The MEAP for AD Management in a Month of Lunches has been updated with the release of chapter 9 on managing group policies</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2844/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2844/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2844&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>State of the Games</title><link>https://powershell.org/articles/2013-04-29-state-of-the-games/</link><guid>https://powershell.org/articles/2013-04-29-state-of-the-games/</guid><pubDate>Mon, 29 Apr 2013 15:10:48 +0000</pubDate><description>&lt;p&gt;As of Monday at 5pm Pacific time (which is Tuesday morning, 00:00 hours GMT), the 2013 Scripting Games&amp;rsquo; first event will conclude. That means the first event is open for community voting - &lt;a href="http://scriptinggames.org/"&gt;so get on it!&lt;/a&gt;&lt;br&gt;
Remember, some of the best prizes - including a free pass to the 2014 PowerShell Summit - are reserved for folks who offer their votes and comments.&lt;br&gt;
Incoming new registrations for the Games will not be able to compete in Event 1 at this point, but they can jump in with Event 2 (and subsequent events) if desired.&lt;br&gt;
We presently have 1100 registered participants - which may include people who just signed up to spectate and vote, as well as our judges. 475 are registered in the Beginner track, 307 in Advanced, and 318 are presently view-only (meaning they&amp;rsquo;re just voting, not submitting entries). As I write this, we&amp;rsquo;ve only got 218 entries - but there are still a few more hours to get them in.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As of Monday at 5pm Pacific time (which is Tuesday morning, 00:00 hours GMT), the 2013 Scripting Games&rsquo; first event will conclude. That means the first event is open for community voting -<a href="http://scriptinggames.org/">so get on it!</a><br>
Remember, some of the best prizes - including a free pass to the 2014 PowerShell Summit - are reserved for folks who offer their votes and comments.<br>
Incoming new registrations for the Games will not be able to compete in Event 1 at this point, but they can jump in with Event 2 (and subsequent events) if desired.<br>
We presently have 1100 registered participants - which may include people who just signed up to spectate and vote, as well as our judges. 475 are registered in the Beginner track, 307 in Advanced, and 318 are presently view-only (meaning they&rsquo;re just voting, not submitting entries). As I write this, we&rsquo;ve only got 218 entries - but there are still a few more hours to get them in.</p>
]]></content:encoded></item><item><title>Comparing SQL Server table schemas with PowerShell</title><link>https://powershell.org/articles/2013-04-28-comparing-sql-server-table-schemas-with-powershell/</link><guid>https://powershell.org/articles/2013-04-28-comparing-sql-server-table-schemas-with-powershell/</guid><pubDate>Sun, 28 Apr 2013 22:44:17 +0000</pubDate><description>&lt;p&gt;As a SQL Server DBA or SQL Server developer sometimes is necessary to know whether two tables have equal schemas or not. For example, a few months ago I had to consolidate two SQL Server instances in just one. One of the main problems were the collisions between Databases and Tables. I found out that both instances had Databases with equal name and the same thing happened with tables inside those databases. When consolidating databases is very important to make sure that users and apps will find the same schema they were used to find before consolidation, so in order to consolidate databases it will be necessary to find tables with different schemas, merge them and solve conflicts.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As a SQL Server DBA or SQL Server developer sometimes is necessary to know whether two tables have equal schemas or not. For example, a few months ago I had to consolidate two SQL Server instances in just one. One of the main problems were the collisions between Databases and Tables. I found out that both instances had Databases with equal name and the same thing happened with tables inside those databases. When consolidating databases is very important to make sure that users and apps will find the same schema they were used to find before consolidation, so in order to consolidate databases it will be necessary to find tables with different schemas, merge them and solve conflicts.</p><p>SQL Server provides a tool to compare schemas between databases, the tool comes with visual Studio or SQL Server Data tools with Database Projects. That could be very useful to identify schema differences among objects from both databases and see what tables have to be merged. So that"™s it, if we have a tool that provides us that functionality, why do we need PowerShell? The answer to this question is quite surprising, it happens that the tool compares schemas based on the T-SQL Code, which means that the comparison is made by using Strings. Let"™s see an example to introduce the issue.</p><p>If we create in SQL Server two databases with one table per database as it is showed in the following script:</p><h2 id="-databases-demo-creation" class="ps-heading">`&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&ndash;
&ndash; Enrique Puig
&ndash;<a href="mailto:epuig1984@gmail.com">epuig1984@gmail.com</a>
&ndash; Databases Demo creation<a class="ps-heading-anchor" href="#-databases-demo-creation" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>&ndash;Database1</p><p>create database
TableCompare
;</p><p>alter database
TableCompare
set recovery simple</p><p>;</p><p>use
TableCompare
;</p><p>create table
dbo
.
TestTable</p><p>(</p><p>id
int identity</p><p>(
1
,
1
)</p><p>primary key</p><p>,</p><p>col1
int</p><p>not null,</p><p>col2
int</p><p>not null,</p><p>col3
int</p><p>not null
);</p><p>&ndash;Database2</p><p>create database
TableCompare2
;</p><p>alter database
TableCompare2
set recovery simple</p><p>;</p><p>use
TableCompare2
;</p><p>create table
dbo
.
TestTable</p><p>(</p><p>id
int identity</p><p>(
1
,
1
),</p><p>col1
int</p><p>not null,</p><p>col2
int</p><p>not null,</p><p>col3
int</p><p>not null
);</p><p>&ndash;create primary key</p><p>alter table
dbo
.
TestTable</p><p>add constraint
PK_TestTable
primary key</p><p>(
id
);</p><p>`The databases and tables look like follows:</p><p><a href="https://powershell.org/wp-content/uploads/2013/04/clip_image002.jpg"><img src="https://powershell.org/wp-content/uploads/2013/04/clip_image002_thumb.jpg" alt="clip_image002"/></p><p>Figure 1-Database comparison-</p><p>As it is showed in Figure 1, both Tables look exactly the same, they have:</p><ul><li/></ul><pre><code> - Equal Name</code></pre><ul><li/></ul><pre><code> - Equal number of columns</code></pre><ul><li/></ul><pre><code> - Equal name of columns</code></pre><ul><li/></ul><pre><code> - Equal number of keys</code></pre><ul><li/></ul><pre><code> - Equal columns in every key</code></pre><p>The only different thing is the name of the key, because for the first table was created automatically and in the second one it was created manually specifying a name. Does it really matter? In this case the name of the key is not relevant as long as the columns are the same. Well, if we compare it with Visual Studio 2012 we get the following results:</p><p><a href="https://powershell.org/wp-content/uploads/2013/04/clip_image004.jpg"><img src="https://powershell.org/wp-content/uploads/2013/04/clip_image004_thumb.jpg" alt="clip_image004"/></p><p>Figure 2- Database Comparison-</p><p>The figure 2 shows the result. According to the result the tables are not equals because of a name. This is not the logic intended for us, because when we want to consolidate tables the only thing that matters is that the table will have a primary key clustered by Id column, the name does not make a difference. So this method is going to show us<strong>a lot of false positives</strong> when looking for tables with different schemas. The same thing happens with some third party tools, I"™ve tried to compare objects with them and got the same result. For this example we are working with one database and only one table per database for a better understanding of the issue, but imagine when you are working with 100 database and an average of 70 or 80 tables per database, you need to make sure that you are no getting false positives identifying tables with different schemas. So here is when PowerShell comes up to save the day.</p><p>Using SMO we are able to create a function to compare schemas. The function looks like follows:</p><p>`#################################################################</p><h2 id="enrique-puig-nouselles" class="ps-heading">Enrique Puig Nouselles<a class="ps-heading-anchor" href="#enrique-puig-nouselles" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><h2 id="" class="ps-heading"><a href="mailto:Epuig1984@gmail.com">Epuig1984@gmail.com</a><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><h2 id="compare-sql-server-table-schemas" class="ps-heading">Compare SQL Server Table schemas<a class="ps-heading-anchor" href="#compare-sql-server-table-schemas" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>#################################################################</p><p>function</p><p>Compare-SQLServerTables</p><p>(</p><p>[</p><p>string</p><p>]</p><p>$srv1</p><p>,[</p><p>string</p><p>]</p><p>$bd1</p><p>,[</p><p>string</p><p>]</p><p>$sch1</p><p>,[</p><p>string</p><p>]</p><p>$TableName1</p><p>,
[</p><p>string</p><p>]</p><p>$srv2</p><p>,[</p><p>string</p><p>]</p><p>$bd2</p><p>,[</p><p>string</p><p>]</p><p>$sch2</p><p>,[</p><p>string</p><p>]</p><p>$TableName2</p><p>)
{</p><p>[</p><p>reflection.assembly</p><p>]::
LoadWithPartialName(
&ldquo;Microsoft.SqlServer.Smo&rdquo;
)
|</p><p>Out-Null</p><p>$S1</p><p>=</p><p>New-Object</p><p>&ldquo;Microsoft.SqlServer.Management.Smo.Server&rdquo;</p><p>$srv1</p><p>if
(
$S1</p><p>-ne</p><p>$null
)
{</p><p>if
(
$S1</p><p>.
databases
[</p><p>$bd1</p><p>] -ne</p><p>$null
)
{</p><p>$tab1</p><p>=</p><p>$S1</p><p>.
databases
[</p><p>$bd1</p><p>].
Tables
[</p><p>$TableName1</p><p>]</p><p>$res</p><p>=</p><p>$tab1</p><p>|</p><p>Where-Object
{
$_</p><p>.
Schema
-eq</p><p>$sch1
}</p><p>if
(
$res</p><p>.
Count
-eq</p><p>)
{</p><p>throw</p><p>&ldquo;Error: The schema</p><p>$sch1</p><p>doesn&rsquo;t contain any table called</p><p>$TableName1</p><p>.&rdquo;</p><p>}
}</p><p>else</p><p>{</p><p>throw</p><p>&ldquo;Error: The database '</p><p>$bd1</p><p>&rsquo; doesn&rsquo;t exist.&rdquo;</p><p>}
}</p><p>else</p><p>{</p><p>throw</p><p>&ldquo;Error: We couldn&rsquo;t connect to the server '</p><p>$srv1</p><p>&lsquo;. Please check your credentials and the servername&rdquo;</p><p>}</p><p>$S2</p><p>=</p><p>New-Object</p><p>&ldquo;Microsoft.SqlServer.Management.Smo.Server&rdquo;</p><p>$srv2</p><p>if
(
$S2</p><p>-ne</p><p>$null
)
{</p><p>if
(
$S2</p><p>.
databases
[</p><p>$bd2</p><p>] -ne</p><p>$null
)
{</p><p>$tab2</p><p>=</p><p>$S2</p><p>.
databases
[</p><p>$bd2</p><p>].
Tables
[</p><p>$TableName2</p><p>]</p><p>$res</p><p>=</p><p>$tab2</p><p>|</p><p>Where-Object
{
$_</p><p>.
Schema
-eq</p><p>$sch2
}</p><p>if
(
$res</p><p>.
Count
-eq</p><p>)
{</p><p>throw</p><p>&ldquo;Error: The schema</p><p>$sch2</p><p>doesn&rsquo;t contain any table called</p><p>$TableName2</p><p>.&rdquo;</p><p>}
}</p><p>else</p><p>{</p><p>throw</p><p>&ldquo;Error: The database '</p><p>$bd2</p><p>&rsquo; doesn&rsquo;t exist.&rdquo;</p><p>}
}</p><p>else</p><p>{</p><p>throw</p><p>&ldquo;Error: We couldn&rsquo;t connect to the server '</p><p>$srv1</p><p>&lsquo;. Please check your credentials and the servername&rdquo;</p><p>}</p><p>##check columns</p><p>$ncols1</p><p>=</p><p>$tab1</p><p>.
Columns
.
Count</p><p>$ncols2</p><p>=</p><p>$tab2</p><p>.
Columns
.
Count</p><p>$eqCols</p><p>=</p><p>$true
$eqChecks</p><p>=</p><p>$true
$eqIndexes</p><p>=</p><p>$true
$resultCompare</p><p>=</p><p>$true</p><p>if
(
$ncols1</p><p>-ne</p><p>$ncols2
)
{</p><p>return</p><p>$false
;
}</p><p>[</p><p>Array</p><p>]</p><p>$colList</p><p>=
@()</p><p>##check data types, nullable columns,computed columns, identity columns, persisted columns, cols with default
## rimary keys and foreign keys</p><p>$tab1</p><p>.
Columns
|</p><p>ForEach-Object
{</p><p>$c1</p><p>=</p><p>$_
$aux</p><p>=</p><p>$tab2</p><p>.
Columns
|</p><p>Where-Object
{</p><p>$_</p><p>.
Name
-eq</p><p>$c1</p><p>.
Name
-and</p><p>$c1</p><p>.
DataType
-eq</p><p>$_</p><p>.
DataType
-and</p><p>$c1</p><p>.
Nullable
-eq</p><p>$_</p><p>.
Nullable
-and</p><p>$c1</p><p>.
Identity
-eq</p><p>$_</p><p>.
Identity
-and</p><p>$c1</p><p>.
IdentitySeed
-eq</p><p>$_</p><p>.
IdentitySeed
-and</p><p>$c1</p><p>.
Computed
-eq</p><p>$_</p><p>.
Computed
-and</p><p>$c1</p><p>.
ComputedText
-eq</p><p>$_</p><p>.
ComputedText
-and</p><p>$c1</p><p>.
DefaultConstraint
.
Text
-eq</p><p>$_</p><p>.
DefaultConstraint
.
Text
-and</p><p>$c1</p><p>.
InPrimaryKey
-eq</p><p>$_</p><p>.
InPrimaryKey
-and</p><p>$c1</p><p>.
IsPersisted
-eq</p><p>$_</p><p>.
IsPersisted
-and</p><p>$c1</p><p>.
IsForeignKey
-eq</p><p>$_</p><p>.
IsForeignKey
}</p><p>if
(
$aux</p><p>-eq</p><p>$null
)
{</p><p>$eqCols</p><p>=</p><p>$false</p><p>return
;
}
}</p><p>#check the other way to make sure that are completely equal tables</p><p>if
(
$eqCols
)
{</p><p>$tab2</p><p>.
Columns
|</p><p>ForEach-Object
{</p><p>$c1</p><p>=</p><p>$_
$aux</p><p>=</p><p>$tab1</p><p>.
Columns
|</p><p>Where-Object
{</p><p>$_</p><p>.
Name
-eq</p><p>$c1</p><p>.
Name
-and</p><p>$c1</p><p>.
DataType
-eq</p><p>$_</p><p>.
DataType
-and</p><p>$c1</p><p>.
Nullable
-eq</p><p>$_</p><p>.
Nullable
-and</p><p>$c1</p><p>.
Identity
-eq</p><p>$_</p><p>.
Identity
-and</p><p>$c1</p><p>.
IdentitySeed
-eq</p><p>$_</p><p>.
IdentitySeed
-and</p><p>$c1</p><p>.
Computed
-eq</p><p>$_</p><p>.
Computed
-and</p><p>$c1</p><p>.
ComputedText
-eq</p><p>$_</p><p>.
ComputedText
-and</p><p>$c1</p><p>.
DefaultConstraint
.
Text
-eq</p><p>$_</p><p>.
DefaultConstraint
.
Text
-and</p><p>$c1</p><p>.
InPrimaryKey
-eq</p><p>$_</p><p>.
InPrimaryKey
-and</p><p>$c1</p><p>.
IsPersisted
-eq</p><p>$_</p><p>.
IsPersisted
}</p><p>if
(
$aux</p><p>-eq</p><p>$null
)
{</p><p>$eqCols</p><p>=</p><p>$false</p><p>return
;
}
}
}</p><p>##check constraints
##we cannot create 2 constraints with the same name at the same database</p><p>$tab1</p><p>.
Checks
|</p><p>ForEach-Object
{</p><p>$tab2</p><p>.
Columns
|</p><p>ForEach-Object
{</p><p>$chk1</p><p>=</p><p>$_
$checks</p><p>=</p><p>$tab2</p><p>.
Checks
|</p><p>Where-Object
{
$chk1</p><p>.
Text
-eq</p><p>$_</p><p>.
Text
-and</p><p>$chk1</p><p>.
IsEnabled
-eq</p><p>$_</p><p>.
IsEnabled}</p><p>if
(
$checks</p><p>-eq</p><p>$null</p><p>-or</p><p>$checks</p><p>.
Count
-eq</p><p>)
{</p><p>$eqChecks</p><p>=</p><p>$false</p><p>return
;
}
}
}</p><p>##check it out in the other way</p><p>if
(
$eqChecks
)
{</p><p>$tab2</p><p>.
Checks
|</p><p>ForEach-Object
{</p><p>Write-Host</p><p>&ldquo;hola que ase&rdquo;</p><p>$chk1</p><p>=</p><p>$_
$checks</p><p>=</p><p>$tab1</p><p>.
Checks
|</p><p>Where-Object
{
$chk1</p><p>.
Text
-eq</p><p>$_</p><p>.
Text
-and</p><p>$chk1</p><p>.
IsEnabled
-eq</p><p>$_</p><p>.
IsEnabled}</p><p>if
(
$checks</p><p>-eq</p><p>$null</p><p>-or</p><p>$checks</p><p>.
Count
-eq</p><p>)
{</p><p>$eqChecks</p><p>=</p><p>$false</p><p>return
;
}
}
}</p><p>##Indexes section</p><p>[</p><p>Array</p><p>]</p><p>$indexes1</p><p>=
@()</p><p>[</p><p>Array</p><p>]</p><p>$cols</p><p>=
@()</p><p>##check indexes</p><p>$tab1</p><p>.
Indexes
|</p><p>ForEach-Object
{</p><p>$ix1</p><p>=</p><p>$_</p><pre><code> #check index type and properties</code></pre><p>$ix</p><p>=</p><p>$tab2</p><p>.
Indexes
|</p><p>Where-Object
{</p><p>$ix1</p><p>.
IsClustered
-eq</p><p>$_</p><p>.
IsClustered
-and</p><p>$ix1</p><p>.
HasFilter
-eq</p><p>$_</p><p>.
HasFilter
-and</p><p>$ix1</p><p>.
IgnoreDuplicateKeys
-eq</p><p>$_</p><p>.
IgnoreDuplicateKeys
-and</p><p>$ix1</p><p>.
IndexedColumns
.
Count
-eq</p><p>$_</p><p>.
IndexedColumns
.
Count
-and</p><p>$ix1</p><p>.
IsIndexOnComputed
-eq</p><p>$_</p><p>.
IsIndexOnComputed
-and</p><p>$ix1</p><p>.
IsPartitioned
-eq</p><p>$_</p><p>.
IsPartitioned
-and</p><p>$ix1</p><p>.
IsSpatialIndex
-eq</p><p>$_</p><p>.
IsSpatialIndex
-and</p><p>$ix1</p><p>.
IsUnique
-eq</p><p>$_</p><p>.
IsUnique
-and</p><p>$ix1</p><p>.
IsXmlIndex
-eq</p><p>$_</p><p>.
IsXmlIndex
}</p><p>if
(
$ix</p><p>-eq</p><p>$null</p><p>-or</p><p>$ix</p><p>.
Count
-eq</p><p>)
{</p><p>$eqIndexes</p><p>=</p><p>$false</p><p>return
;
}</p><p>else</p><p>{</p><p>##check index column names</p><p>$ix1</p><p>.
IndexedColumns
|</p><p>ForEach-Object
{</p><p>$col1</p><p>=</p><p>$_</p><p>#Get all indexed columns</p><p>$cols</p><p>=</p><p>$ix</p><p>.
IndexedColumns
|</p><p>Where-Object
{</p><p>$col1</p><p>.
Name
-eq</p><p>$_</p><p>.
Name
}</p><p>if
(
$cols</p><p>-eq</p><p>$null</p><p>-or</p><p>$cols</p><p>.
Count
-eq</p><p>)
{</p><p>$eqIndexes</p><p>=</p><p>$false</p><p>return
;
}
}
}
}</p><p>if
(
$eqIndexes
)
{</p><p>$tab2</p><p>.
Indexes
|</p><p>ForEach-Object
{</p><p>$ix1</p><p>=</p><p>$_</p><p>#check index type and properties</p><p>$ix</p><p>=</p><p>$tab1</p><p>.
Indexes
|</p><p>Where-Object
{</p><p>$ix1</p><p>.
IsClustered
-eq</p><p>$_</p><p>.
IsClustered
-and</p><p>$ix1</p><p>.
HasFilter
-eq</p><p>$_</p><p>.
HasFilter
-and</p><p>$ix1</p><p>.
IgnoreDuplicateKeys
-eq</p><p>$_</p><p>.
IgnoreDuplicateKeys
-and</p><p>$ix1</p><p>.
IndexedColumns
.
Count
-eq</p><p>$_</p><p>.
IndexedColumns
.
Count
-and</p><p>$ix1</p><p>.
IsIndexOnComputed
-eq</p><p>$_</p><p>.
IsIndexOnComputed
-and</p><p>$ix1</p><p>.
IsPartitioned
-eq</p><p>$_</p><p>.
IsPartitioned
-and</p><p>$ix1</p><p>.
IsSpatialIndex
-eq</p><p>$_</p><p>.
IsSpatialIndex
-and</p><p>$ix1</p><p>.
IsUnique
-eq</p><p>$_</p><p>.
IsUnique
-and</p><p>$ix1</p><p>.
IsXmlIndex
-eq</p><p>$_</p><p>.
IsXmlIndex
}</p><p>if
(
$ix</p><p>-eq</p><p>$null</p><p>-or</p><p>$ix</p><p>.
Count
-eq</p><p>)
{</p><p>$eqIndexes</p><p>=</p><p>$false</p><p>return
;
}</p><p>else</p><p>{</p><p>##check index column names</p><p>$ix1</p><p>.
IndexedColumns
|</p><p>ForEach-Object
{</p><p>$col1</p><p>=</p><p>$_
$cols</p><p>=</p><p>$ix</p><p>.
IndexedColumns
|</p><p>Where-Object
{</p><p>$col1</p><p>.
Name
-eq</p><p>$_</p><p>.
Name
}</p><p>if
(
$cols</p><p>-eq</p><p>$null</p><p>-or</p><p>$cols</p><p>.
Count
-eq</p><p>)
{</p><p>$eqIndexes</p><p>=</p><p>$false</p><p>return
;
}
}
}
}
}</p><p>if
(
$eqCols</p><p>-eq</p><p>$false</p><p>-or</p><p>$eqChecks</p><p>-eq</p><p>$false</p><p>-or</p><p>$eqIndexes</p><p>-eq</p><p>$false
)
{</p><p>$resultCompare</p><p>=</p><p>$false</p><p>}</p><p>return</p><p>$resultCompare</p><p>}
`<a href="http://11011.net/software/vspaste"/></p><p>This is a personalized function and three main blocks are checked in order to determine whether two tables have the same schema or not:</p><ol><li><p><strong>Columns</strong>: In this section we check the number of columns, the name of the columns, the data types for every column, if is part of a primary key, if is part of a foreign key, if is a computed column and so on.</p></li><li><p><strong>Checks</strong>: In this section all checks defined in a table are compared. As we explained before, the name doesn"™t matter, the only thing that matters is the check definition text and the columns involved.</p></li><li><p><strong>Indexes:</strong> In this sections all the indexes are compared. The index name doesn"™t make a difference, we only check for index type, columns and so on.</p></li></ol><p>In order to test this PowerShell function we will run a main program to test it:</p><p>`#main program
##Define Variables</p><p>$srv1</p><p>=</p><p>&ldquo;(local)\SQLDWH&rdquo;</p><p>$srv2</p><p>=</p><p>&ldquo;(local)\SQLDWH&rdquo;</p><p>$bd1</p><p>=</p><p>&ldquo;TableCompare&rdquo;</p><p>$bd2</p><p>=</p><p>&ldquo;TableCompare2&rdquo;</p><p>$sch1</p><p>=</p><p>&ldquo;dbo&rdquo;</p><p>$sch2</p><p>=</p><p>&ldquo;dbo&rdquo;</p><p>$TableName1</p><p>=</p><p>&ldquo;TestTable&rdquo;</p><p>$TableName2</p><p>=</p><p>&ldquo;TestTable&rdquo;</p><p>#function call</p><p>Compare-SQLServerTables</p><p>$srv1 $bd1 $sch1 $TableName1 $srv2 $bd2 $sch2 $TableName2</p><p>`<a href="http://11011.net/software/vspaste"/></p><p>The result that we get by running the main program is:</p><p><a href="https://powershell.org/wp-content/uploads/2013/04/clip_image005.png"><img src="https://powershell.org/wp-content/uploads/2013/04/clip_image005_thumb.png" alt="clip_image005"/></p><p>Figure 3-Execution result-</p><p>Now we are getting<strong>True</strong> as a result, which means that both tables are equals in terms of schema. If we change the schema of one of the test tables we will get a different result. Let"™s say we change the primary for one of the tables:</p><p>`&ndash;alter table</p><p>use
TableCompare2
;</p><p>alter table
TestTable</p><p>drop constraint
PK_TestTable
;</p><p>alter table
TestTable</p><p>add constraint
PK_TestTable
primary key</p><p>(
id
,
col1
);</p><p>`Now the table schemas look like follows:</p><p><a href="https://powershell.org/wp-content/uploads/2013/04/clip_image007.jpg"><img src="https://powershell.org/wp-content/uploads/2013/04/clip_image007_thumb.jpg" alt="clip_image007"/></p><p>Figure 4- New Table schemas-</p><p>The schemas have changed as it is showed in Figure 4. The primary key of the table TestTabe in TableCompare2 Database has two keys instead of one. If we execute again our function the result is:</p><p><a href="https://powershell.org/wp-content/uploads/2013/04/clip_image009.jpg"><img src="https://powershell.org/wp-content/uploads/2013/04/clip_image009_thumb.jpg" alt="clip_image009"/></p><p>Figure 5- Result with different schemas-</p><p>Now we get<strong>False</strong> because the schemas are different, so our function is working as intended. As you can see, once again PowerShell shows us its power and allows us to solve a problem easily.</p><p><strong>Note</strong>: Is very important to remark that this function<strong>only compares Columns, Checks and indexes</strong>. The main reason is because the function was created to solve a given problem but it could be extended to compare more object types like triggers, users and so on.</p>
]]></content:encoded></item><item><title>CIM cmdlets vs WMI cmdlets"“speed of execution</title><link>https://powershell.org/articles/2013-04-28-cim-cmdlets-vs-wmi-cmdlets-speed-of-execution/</link><guid>https://powershell.org/articles/2013-04-28-cim-cmdlets-vs-wmi-cmdlets-speed-of-execution/</guid><pubDate>Sun, 28 Apr 2013 21:04:47 +0000</pubDate><description>&lt;p&gt;One question that came up at the summit was the comparative speed of execution of the new CIM cmdlets vs the old WMI cmdlets. No of us knew the answer because we&amp;quot;™d never tried measuring the speed.&lt;/p&gt;
&lt;p&gt;I decided to perform some tests.&lt;/p&gt;
&lt;p&gt;This first test is accessing the local machine. In both cases the cmdlets are using COM. WMI uses COM and CIM will use COM if a &amp;ldquo;“ComputerName parameter isn&amp;rdquo;™t used.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>One question that came up at the summit was the comparative speed of execution of the new CIM cmdlets vs the old WMI cmdlets. No of us knew the answer because we"™d never tried measuring the speed.</p><p>I decided to perform some tests.</p><p>This first test is accessing the local machine. In both cases the cmdlets are using COM. WMI uses COM and CIM will use COM if a &ldquo;“ComputerName parameter isn&rdquo;™t used.</p><p>The results are as follows:</p><p><strong>PS&gt; 1..100 |<br>
foreach {Measure-Command -Expression {<br>
1..100 | foreach {Get-WmiObject -Class Win32_ComputerSystem} }<br>
} | Measure-Object -Average TotalMilliseconds</strong></p><p>Count : 100<br>
Average : 2008.953978<br>
Sum :<br>
Maximum :<br>
Minimum :<br>
Property : TotalMilliseconds</p><p><strong>PS&gt; 1..100 |<br>
foreach {Measure-Command -Expression {<br>
1..100 | foreach {Get-CimInstance -ClassName Win32_ComputerSystem} }<br>
} | Measure-Object -Average TotalMilliseconds</strong></p><p>Count : 100<br>
Average : 2078.763174<br>
Sum :<br>
Maximum :<br>
Minimum :<br>
Property : TotalMilliseconds</p><p>So for pure COM access the WMI cmdlets are marginally (3.4%) faster.</p><p>What if we use the ComputerName parameter?</p><p><strong>PS&gt; 1..100 |<br>
foreach {<br>
Measure-Command -Expression {<br>
1..100 | foreach {Get-WmiObject -Class Win32_ComputerSystem -ComputerName $env:COMPUTERNAME } }<br>
} | Measure-Object -Average TotalMilliseconds</strong></p><p>Count : 100<br>
Average : 1499.14379<br>
Sum :<br>
Maximum :<br>
Minimum :<br>
Property : TotalMilliseconds</p><p><strong>PS&gt; 1..100 |<br>
foreach {<br>
Measure-Command -Expression {<br>
1..100 | foreach {Get-CimInstance -ClassName Win32_ComputerSystem -ComputerName $env:COMPUTERNAME } }<br>
} | Measure-Object -Average TotalMilliseconds</strong></p><p>Count : 100<br>
Average : 3892.921851<br>
Sum :<br>
Maximum :<br>
Minimum :<br>
Property : TotalMilliseconds</p><p>This one surprised me &ldquo;“ the WMI cmdlets are 2.5 times faster. I suspect that is because the CIM cmdlet has to build and then breakdown the WSMAN connection each time.</p><p>Next time we&rdquo;™ll look at accessing a remote machine.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2842/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2842/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2842&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Time for D-CRUD?</title><link>https://powershell.org/articles/2013-04-28-time-for-d-crud/</link><guid>https://powershell.org/articles/2013-04-28-time-for-d-crud/</guid><pubDate>Sun, 28 Apr 2013 17:52:28 +0000</pubDate><description>&lt;p&gt;I was thinking on the plane back from the PowerShell summit about the CRUD activities. They are a concept we have inherited from the database world:&lt;/p&gt;
&lt;p&gt;C = Create&lt;/p&gt;
&lt;p&gt;R = Read&lt;/p&gt;
&lt;p&gt;U = Update&lt;/p&gt;
&lt;p&gt;D= Delete&lt;/p&gt;
&lt;p&gt;Create, Update and Delete correspond directly to the PowerShell verbs &amp;ldquo;“ New,Set and Remove respectively.&lt;/p&gt;
&lt;p&gt;The Read action corresponds to the Get verb.&lt;/p&gt;
&lt;p&gt;Well sort of.&lt;/p&gt;
&lt;p&gt;Get-* is used in two distinct scenarios. Firstly we know of an object and we we want to read its properties &amp;ldquo;“ for example:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I was thinking on the plane back from the PowerShell summit about the CRUD activities. They are a concept we have inherited from the database world:</p><p>C = Create</p><p>R = Read</p><p>U = Update</p><p>D= Delete</p><p>Create, Update and Delete correspond directly to the PowerShell verbs &ldquo;“ New,Set and Remove respectively.</p><p>The Read action corresponds to the Get verb.</p><p>Well sort of.</p><p>Get-* is used in two distinct scenarios. Firstly we know of an object and we we want to read its properties &ldquo;“ for example:</p><p>Get-Process -Name powershell</p><p>We are reading the information about the PowerShell process. That corresponds directly to the Read action in the CRUD paradigm.</p><p>However, we also use Get* when we want to Discover the processes that are running:</p><p>Get-Process</p><p>In which case we are Discovering the processes that are running.</p><p>I think its time to update the CRUD concept and make it DCRUD where D stands for discovery.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2840/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2840/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2840&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Scripting Games 2013 have started</title><link>https://powershell.org/articles/2013-04-28-scripting-games-2013-have-started/</link><guid>https://powershell.org/articles/2013-04-28-scripting-games-2013-have-started/</guid><pubDate>Sun, 28 Apr 2013 11:49:53 +0000</pubDate><description>&lt;p&gt;The 2013 Scripting Games kicked off during the PowerShell summit. Event 1 is open and you can submit entries up until 23:59:59 GMT on 29 April 2013. Voting on the entries starts at at midnight on 30 April.&lt;/p&gt;
&lt;p&gt;You can enter and &lt;strong&gt;you&lt;/strong&gt; can vote on the entries. This is a community games run by powershell.org &amp;ldquo;“ all are welcome.&lt;/p&gt;
&lt;p&gt;If you haven&amp;rdquo;™t entered yet there is still plenty of time to get you entry in for event 1. Start by reviewing the information at &lt;a href="https://powershell.org/the-scripting-games/" title="https://powershell.org/the-scripting-games/"&gt;https://powershell.org/the-scripting-games/&lt;/a&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The 2013 Scripting Games kicked off during the PowerShell summit. Event 1 is open and you can submit entries up until 23:59:59 GMT on 29 April 2013. Voting on the entries starts at at midnight on 30 April.</p><p>You can enter and<strong>you</strong> can vote on the entries. This is a community games run by powershell.org &ldquo;“ all are welcome.</p><p>If you haven&rdquo;™t entered yet there is still plenty of time to get you entry in for event 1. Start by reviewing the information at<a href="https://powershell.org/the-scripting-games/" title="https://powershell.org/the-scripting-games/">https://powershell.org/the-scripting-games/</a></p><p>Enjoy and good luck</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2838/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2838/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2838&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>PowerShell Summit"“thank you</title><link>https://powershell.org/articles/2013-04-27-powershell-summit-thank-you/</link><guid>https://powershell.org/articles/2013-04-27-powershell-summit-thank-you/</guid><pubDate>Sat, 27 Apr 2013 11:46:19 +0000</pubDate><description>&lt;p&gt;I&amp;quot;™d like to extend a huge thank you to everyone who attended the PowerShell Summit this last week. The Summit was a success &amp;ldquo;“ in no small part due to you. Your questions, and discussions, are what this is all about.&lt;/p&gt;
&lt;p&gt;It was a pleasure meeting you all and I hope to return next year &amp;ldquo;“ I hope to see many of you there as well.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2836/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2836/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2836&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I"™d like to extend a huge thank you to everyone who attended the PowerShell Summit this last week. The Summit was a success &ldquo;“ in no small part due to you. Your questions, and discussions, are what this is all about.</p><p>It was a pleasure meeting you all and I hope to return next year &ldquo;“ I hope to see many of you there as well.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2836/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2836/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2836&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Forums Migration Schedule</title><link>https://powershell.org/articles/2013-04-26-forums-migration-schedule/</link><guid>https://powershell.org/articles/2013-04-26-forums-migration-schedule/</guid><pubDate>Fri, 26 Apr 2013 18:08:39 +0000</pubDate><description>&lt;p&gt;Here&amp;rsquo;s the schedule for our Forums migration:&lt;br&gt;
From &lt;strong&gt;Now until May 4th,&lt;/strong&gt; the &lt;a href="https://forums.powershell.org"&gt;old forums&lt;/a&gt; will remain online and in-use. However, you should consider creating an account here on the &amp;ldquo;new&amp;rdquo; site (distinguishable by the different visual theme). Your new account will have no connection to the old one, and may be a Twitter, Facebook, Live, or other login. To create an account, just click &amp;ldquo;Login&amp;rdquo; at the top-left of any site page (in the dark gray toolbar).&lt;br&gt;
&lt;strong&gt;On May 4th&lt;/strong&gt; we will activate the new forums. From then on, the Forums menu link will go there. The old forums will remain available at &lt;a href="https://powershell.org/discuss"&gt;https://powershell.org/discuss&lt;/a&gt;. You can continue to use the old forums to wrap-up old topics, or if the new ones stop working for some reason.&lt;br&gt;
On &lt;strong&gt;May 13th&lt;/strong&gt; we will shut down the old forums and direct everyone to the new ones.&lt;br&gt;
By &lt;strong&gt;May 20&lt;/strong&gt; we will have migrated the content from the old forums into the new ones. These will be imported as static threads that are closed for new messages, but they&amp;rsquo;ll still be searchable.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Here&rsquo;s the schedule for our Forums migration:<br>
From<strong>Now until May 4th,</strong> the<a href="https://forums.powershell.org">old forums</a> will remain online and in-use. However, you should consider creating an account here on the &ldquo;new&rdquo; site (distinguishable by the different visual theme). Your new account will have no connection to the old one, and may be a Twitter, Facebook, Live, or other login. To create an account, just click &ldquo;Login&rdquo; at the top-left of any site page (in the dark gray toolbar).<br><strong>On May 4th</strong> we will activate the new forums. From then on, the Forums menu link will go there. The old forums will remain available at<a href="https://powershell.org/discuss">https://powershell.org/discuss</a>. You can continue to use the old forums to wrap-up old topics, or if the new ones stop working for some reason.<br>
On<strong>May 13th</strong> we will shut down the old forums and direct everyone to the new ones.<br>
By<strong>May 20</strong> we will have migrated the content from the old forums into the new ones. These will be imported as static threads that are closed for new messages, but they&rsquo;ll still be searchable.</p>
]]></content:encoded></item><item><title>Recording the PowerShell Summit</title><link>https://powershell.org/articles/2013-04-25-recording-the-powershell-summit/</link><guid>https://powershell.org/articles/2013-04-25-recording-the-powershell-summit/</guid><pubDate>Fri, 26 Apr 2013 01:51:45 +0000</pubDate><description>&lt;p&gt;So, we &lt;strong&gt;did&lt;/strong&gt; have one enterprising fella use his Webcam to record the Summit sessions he attended. Once he gets with me, we&amp;rsquo;ll get those online so you can see.&lt;br&gt;
We &lt;strong&gt;are&lt;/strong&gt; trying to think really hard about formal recordings for next time. It depends a lot on what folks want. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pointing a camera at the front of the room is easy and cheap. We worry that the audio might suck and that you might not be able to read on-screen code - although many presenters make their code/slides available for download.&lt;/li&gt;
&lt;li&gt;Putting software on presenters&amp;rsquo; machines to capture what they do is out of the question. There are MORE than enough moving parts already going on in the room - this just won&amp;rsquo;t work out consistently.&lt;/li&gt;
&lt;li&gt;We can get one-button-recording devices that capture everything the speaker does on-screen, and an audio feed. You don&amp;rsquo;t get to SEE the speaker, and these are about $1000 each, plus sundry cables and adapters. For several hundred more, we can add a picture-in-picture from a camera feed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So we can do cheap-o&amp;hellip; well, cheaply. And if folks are happy with that, we&amp;rsquo;ll do it. We can do pretty awesome-looking for pretty-expensive&amp;hellip; and that&amp;rsquo;s going to require a fundraising campaign. We aren&amp;rsquo;t Microsoft, and recording three rooms, along with possible general sessions, is going to take about $8-$12k in equipment. Our goal, however, would be to give the videos away for free once a year&amp;rsquo;s event sells to its &amp;ldquo;break even&amp;rdquo; attendance point.&lt;br&gt;
Live streaming won&amp;rsquo;t happen. Meeting venues get like $5,000 per day for a 5-10Mbps pipe. Yeah, you thought they made money off the $80/gallon coffee. We just can&amp;rsquo;t afford the bandwidth to livestream. We&amp;rsquo;re not even always sure we can turn on WiFi for people to check e-mail. It&amp;rsquo;s that expensive.&lt;br&gt;
Please drop some comments. Knowing what kind of video people are willing to accept will really help us plan this out for next time, and we need a lot of lead time to do that.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>So, we<strong>did</strong> have one enterprising fella use his Webcam to record the Summit sessions he attended. Once he gets with me, we&rsquo;ll get those online so you can see.<br>
We<strong>are</strong> trying to think really hard about formal recordings for next time. It depends a lot on what folks want. For example:</p><ul><li>Pointing a camera at the front of the room is easy and cheap. We worry that the audio might suck and that you might not be able to read on-screen code - although many presenters make their code/slides available for download.</li><li>Putting software on presenters&rsquo; machines to capture what they do is out of the question. There are MORE than enough moving parts already going on in the room - this just won&rsquo;t work out consistently.</li><li>We can get one-button-recording devices that capture everything the speaker does on-screen, and an audio feed. You don&rsquo;t get to SEE the speaker, and these are about $1000 each, plus sundry cables and adapters. For several hundred more, we can add a picture-in-picture from a camera feed.</li></ul><p>So we can do cheap-o&hellip; well, cheaply. And if folks are happy with that, we&rsquo;ll do it. We can do pretty awesome-looking for pretty-expensive&hellip; and that&rsquo;s going to require a fundraising campaign. We aren&rsquo;t Microsoft, and recording three rooms, along with possible general sessions, is going to take about $8-$12k in equipment. Our goal, however, would be to give the videos away for free once a year&rsquo;s event sells to its &ldquo;break even&rdquo; attendance point.<br>
Live streaming won&rsquo;t happen. Meeting venues get like $5,000 per day for a 5-10Mbps pipe. Yeah, you thought they made money off the $80/gallon coffee. We just can&rsquo;t afford the bandwidth to livestream. We&rsquo;re not even always sure we can turn on WiFi for people to check e-mail. It&rsquo;s that expensive.<br>
Please drop some comments. Knowing what kind of video people are willing to accept will really help us plan this out for next time, and we need a lot of lead time to do that.</p>
]]></content:encoded></item><item><title>Meet the Scripting Games Judges: "Scripting Guy" Ed Wilson</title><link>https://powershell.org/articles/2013-04-25-meet-the-scripting-games-judges-scripting-guy-ed-wilson/</link><guid>https://powershell.org/articles/2013-04-25-meet-the-scripting-games-judges-scripting-guy-ed-wilson/</guid><pubDate>Thu, 25 Apr 2013 18:24:40 +0000</pubDate><description>&lt;p&gt;Ed Wilson is the Microsoft Scripting Guy and a well-known scripting expert. He writes the twice daily Hey Scripting Guy! blog (the number 1 blog on TechNet). He has also spoken at TechEd and at the Microsoft internal TechReady conferences. He is a Microsoft-certified trainer who has delivered a popular Windows PowerShell workshop to Microsoft Premier Customers worldwide. He has written 11 books including 8 on Windows scripting that were published by Microsoft Press. He has also contributed to nearly a dozen other books. He has two Microsoft Press Windows PowerShell 3.0 books: Windows PowerShell 3.0 Step by Step and Windows PowerShell 3.0 First Steps. Ed holds more than 20 industry certifications, including Microsoft Certified Systems Engineer (MCSE) and Certified Information Systems Security Professional (CISSP). Prior to coming to work for Microsoft, he was a senior consultant for a Microsoft Gold Certified Partner where he specialized in Active Directory design and Exchange implementation. In his spare time, he enjoys woodworking, underwater photography, and scuba diving.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Ed Wilson is the Microsoft Scripting Guy and a well-known scripting expert. He writes the twice daily Hey Scripting Guy! blog (the number 1 blog on TechNet). He has also spoken at TechEd and at the Microsoft internal TechReady conferences. He is a Microsoft-certified trainer who has delivered a popular Windows PowerShell workshop to Microsoft Premier Customers worldwide. He has written 11 books including 8 on Windows scripting that were published by Microsoft Press. He has also contributed to nearly a dozen other books. He has two Microsoft Press Windows PowerShell 3.0 books: Windows PowerShell 3.0 Step by Step and Windows PowerShell 3.0 First Steps. Ed holds more than 20 industry certifications, including Microsoft Certified Systems Engineer (MCSE) and Certified Information Systems Security Professional (CISSP). Prior to coming to work for Microsoft, he was a senior consultant for a Microsoft Gold Certified Partner where he specialized in Active Directory design and Exchange implementation. In his spare time, he enjoys woodworking, underwater photography, and scuba diving.</p>
]]></content:encoded></item><item><title>PSCustomObject: Save Puppies and Avoid Dead Ends</title><link>https://powershell.org/articles/2013-04-24-pscustomobject-save-puppies-and-avoid-dead-ends/</link><guid>https://powershell.org/articles/2013-04-24-pscustomobject-save-puppies-and-avoid-dead-ends/</guid><pubDate>Wed, 24 Apr 2013 21:06:59 +0000</pubDate><description>&lt;p&gt;Welcome to Scripting Games 2013. Here&amp;rsquo;s my favorite hint for improving your functions and scripts. Avoid writing to the console or formatting your output. Instead use &lt;strong&gt;PSCustomObject&lt;/strong&gt; in Windows PowerShell 3.0 and leave the formatting to the end user.&lt;br&gt;
Windows PowerShell provides lots of great ways to return the output of a command or function. You can write to the host program (Write-Host), write to a file (Out-File), and format your output to look really pretty (Format-*). But all of these techniques kill puppies and bring the pipeline to an abrupt halt.&lt;br&gt;
&amp;ldquo;Puppies?,&amp;rdquo; you ask. Yes! Windows PowerShell MVP and Scripting Games 2013 Viceroy Don Jones (@concentrateddon) famously says that every time you use Write-Host, a puppy dies. So sad!&lt;br&gt;
The Format cmdlets are almost as bad, although no deaths have yet been attributed to them. Instead, when you use a Format cmdlet, a huge STOP sign should appear warning you that you&amp;rsquo;ve brought the pipeline to a halt. Not technically, of course, but for all practical purposes.&lt;br&gt;
To see what I mean, take a peek at these two commands. The output of these commands looks very similar, but it&amp;rsquo;s really quite different.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Welcome to Scripting Games 2013. Here&rsquo;s my favorite hint for improving your functions and scripts. Avoid writing to the console or formatting your output. Instead use<strong>PSCustomObject</strong> in Windows PowerShell 3.0 and leave the formatting to the end user.<br>
Windows PowerShell provides lots of great ways to return the output of a command or function. You can write to the host program (Write-Host), write to a file (Out-File), and format your output to look really pretty (Format-*). But all of these techniques kill puppies and bring the pipeline to an abrupt halt.<br>
&ldquo;Puppies?,&rdquo; you ask. Yes! Windows PowerShell MVP and Scripting Games 2013 Viceroy Don Jones (@concentrateddon) famously says that every time you use Write-Host, a puppy dies. So sad!<br>
The Format cmdlets are almost as bad, although no deaths have yet been attributed to them. Instead, when you use a Format cmdlet, a huge STOP sign should appear warning you that you&rsquo;ve brought the pipeline to a halt. Not technically, of course, but for all practical purposes.<br>
To see what I mean, take a peek at these two commands. The output of these commands looks very similar, but it&rsquo;s really quite different.</p><p>`PS C:\ Get-Process csrss
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName</p><hr><p>885 14 2568 5092 49 516 csrss
714 19 3996 28036 92 632 csrss
PS C:\ Get-Process csrss | Format-Table
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName</p><hr><p>885 14 2568 5092 49 516 csrss
714 19 3996 28036 92 632 csrss
`These two commands return different objects and the difference really matters. To see the different output types, you can pipe them to Get-Member. I&rsquo;ve used a slightly different approach that gets only the names of types in the output, but it&rsquo;s the same idea.</p><p><code>PS C:\ Get-Process csrss | foreach {$_.gettype().fullname} System.Diagnostics.Process System.Diagnostics.Process PS C:\ Get-Process csrss | Format-Table | foreach {$_.gettype().fullname} Microsoft.PowerShell.Commands.Internal.Format.FormatStartData Microsoft.PowerShell.Commands.Internal.Format.GroupStartData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.FormatEntryData Microsoft.PowerShell.Commands.Internal.Format.GroupEndData Microsoft.PowerShell.Commands.Internal.Format.FormatEndData</code>Instead of a process object, the formatted command returns a bunch of format objects. You usually discover this when you try to use them in another command. For example, these format objects don&rsquo;t have the properties of a process object, like PagedMemorySize or Handles.</p><p>`PS C:\ $p = Get-Process csrss
PS C:\ $p | foreach PagedMemorySize
2629632
4075520
PS C:\ $pf = Get-Process csrss | Format-Table
PS C:\ $pf | foreach PagedMemorySize
PS C:<br>
PS C:\ get-process csrss | sort Handles
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName</p><hr><pre><code>723 19 3980 28416 87 632 csrss
881 14 2568 5096 49 516 csrss</code></pre><p>PS C:\ get-process csrss | ft | sort Handles
out-lineoutput : The object of type &ldquo;Microsoft.PowerShell.Commands.
Internal.Format.FormatEntryData&rdquo; is not valid or not in the correct
sequence. This is likely caused by a user-specified &ldquo;format-*&rdquo;
command which is conflicting with the default formatting.
+ CategoryInfo : InvalidData: (:) [out-lineoutput],
InvalidOperationException
+ FullyQualifiedErrorId : ConsoleLineOutputOutOfSequencePacket,
Microsoft.PowerShell.Commands.OutLineOutputCommand
`So you&rsquo;ve lost the opportunity to use these objects in subsequent commands. Unless you really want formatting object, the pipeline is effectively dead. Almost as sad as those puppies.<br>
I realized this problem when some colleagues at Microsoft asked me to generate a report that listed the CDXML files in a CIM module and the CIM commands that were defined in each CDXML file. I wrote a tiny script that produced a nice report that looked like this:</p><h2 id="msft_netipaddresscdxml-helpxml" class="ps-heading">`MSFT_NetIPAddress.cdxml-help.xml<a class="ps-heading-anchor" href="#msft_netipaddresscdxml-helpxml" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><h2 id="msft_netipinterfacecdxml-helpxml" class="ps-heading">Get-NetIPAddress
Set-NetIPAddress
Remove-NetIPAddress
New-NetIPAddress
MSFT_NetIPInterface.cdxml-help.xml<a class="ps-heading-anchor" href="#msft_netipinterfacecdxml-helpxml" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><h2 id="msft_netipv4protocolcdxml-helpxml" class="ps-heading">Get-NetIPInterface
Set-NetIPInterface
MSFT_NetIPv4Protocol.cdxml-help.xml<a class="ps-heading-anchor" href="#msft_netipv4protocolcdxml-helpxml" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><h2 id="msft_netipv6protocolcdxml-helpxml" class="ps-heading">Get-NetIPv4Protocol
Set-NetIPv4Protocol
MSFT_NetIPv6Protocol.cdxml-help.xml<a class="ps-heading-anchor" href="#msft_netipv6protocolcdxml-helpxml" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Get-NetIPv6Protocol
Set-NetIPv6Protocol
. . .
`But, instead of being delighted, they reported that they now had data that they couldn&rsquo;t use. I had created a dead end. Pretty, but useless. They were happier with a command that produced useable results, even if they weren&rsquo;t pretty.</p><p>`PS C:\ (Get-Module $ModuleName).NestedModules | Select-Object Name, Path, ExportedCommands
Name Path ExportedCommands</p><hr><p>MSFT_NetIPAddress C:\windows\system32\WindowsPowerShel&hellip; {[Get-NetIPAddres
MSFT_NetIPInterface C:\windows\system32\WindowsPowerShel&hellip; {[Get-NetIPInterf
MSFT_NetIPv4Protocol C:\windows\system32\WindowsPowerShel&hellip; {[Get-NetIPv4Prot
MSFT_NetIPv6Protocol C:\windows\system32\WindowsPowerShel&hellip; {[Get-NetIPv6Prot
. . .
`To avoid this dead end in the silly Get-Process case, you just remove the Format-Table command. Or, you can use the Select-Object cmdlet to create an object that is a filtered subset of the current object, if that&rsquo;s what you need.<br>
But how do you manage when you&rsquo;re returning values from different objects? It&rsquo;s easy to put them in a table, but there&rsquo;s a much better way that doesn&rsquo;t stop the pipeline.<br>
Windows PowerShell 3.0 introduces PSCustomObject. You can read all about it, and about Windows PowerShell 2.0 alternatives, in about_Object_Creation. PSCustomObject makes it easy for you to create objects.<br>
As the name implies, PSCustomObject creates a custom object with the properties that you specify. The resulting custom object works just like any .NET class object, so you can pass it through the pipeline and use it in subsequent commands.<br>
The value of PSCustomObject is a hash table (@{Key = Value; Key=Value&hellip;}) where the keys are property names and the values are property values. When you define a PSCustomObject hash table in a script or function, Windows PowerShell magically creates an object for every instance that you pass to it.<br>
Here&rsquo;s how I used it in a little script that tells you the versions of Updatable Help you have on your local machine.</p><p><code>foreach ($helpInfoFile in $helpInfoFiles) { $ModuleName = $HelpInfoFile.Name.Split('_')[0] $CultureInfo = ([xml](Get-Content</code>
$HelpInfoFile)).HelpInfo.SupportedUICultures.UICulture
$UICulture = $CultureInfo.UICultureName
$Version = $CultureInfo.UICultureVersion
[PSCustomObject]@{&ldquo;ModuleName&rdquo;=$ModuleName;
&ldquo;Culture&rdquo;=$UICulture;
&ldquo;Version&rdquo;=$Version}
}
`In this case , I was processing a bunch of HelpInfo XML files. I want to return an object that contains the module name, the name of the UI culture, and the version number for that UI culture. The details don&rsquo;t matter, except that the property values weren&rsquo;t all in the same object, so I couldn&rsquo;t just select from an object.<br>
PSCustomObject to the rescue! See how easy this is!<br>
In the ForEach loop, I get the values that I need. Then I just define a PSCustomObject and &ldquo;¦ voila! &ldquo;¦ I have my objects. The default formatting makes them look nice enough.</p><p>`ModuleName Culture Version</p><hr><p>AppLocker en-US 3.1.0.0
Appx en-US 3.1.0.0
BitLocker en-US 3.1.0.0
BranchCache en-US 3.1.0.0
`But more importantly, the pipeline continues. When I pipe to Get-Member, it shows that I have a usable custom object:</p><p>`PS C:\ $u | get-member
TypeName: System.Management.Automation.PSCustomObject
Name MemberType Definition</p><hr><p>Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Culture NoteProperty System.String Culture=en-US
ModuleName NoteProperty System.String ModuleName=AppLocker
Version NoteProperty System.String Version=3.1.0.0
`And, I can use the output in subsequent commands.</p><p>`PS C:\ $u | sort Version | group Version
Count Name Group</p><hr><p>24 3.0.0.0 {@{ModuleName=NetSwitchTeam;
1 3.0.1.0 {@{ModuleName=MsDtc; Culture=
1 3.0.2.0 {@{ModuleName=Wdac; Culture=e
15 3.1.0.0 {@{ModuleName=ScheduledTasks;
4 3.2.0.0 {@{ModuleName=Microsoft.WSMan
1 {3.2.15.3, 3.2.15.0, 3&hellip; {@{ModuleName=Show-Calendar;
1 3.4.0.0 {@{ModuleName=NetTCPIP; Cultu
`Now, go out and try it! Some of the Scripting Games challenges might require a table, list, or some other formatting, but if it doesn&rsquo;t, be sure return a really useful object.<br>
Good luck to everyone!</p>
]]></content:encoded></item><item><title>Now Accepting Nominations for PowerShell.org, Inc. Board of Directors</title><link>https://powershell.org/articles/2013-04-24-now-accepting-nominations-for-powershell-org-inc-board-of-directors/</link><guid>https://powershell.org/articles/2013-04-24-now-accepting-nominations-for-powershell-org-inc-board-of-directors/</guid><pubDate>Wed, 24 Apr 2013 16:10:56 +0000</pubDate><description>&lt;p&gt;At our first annual Shareholders Meeting (shareholders will receive an e-mail from me later this week about that meeting), we will be voting on our Board of Directors. Our corporate articles permit our existing Board members to serve indefinitely, and so all are automatically re-nominated. The current Board includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Myself (Don Jones)&lt;/li&gt;
&lt;li&gt;Kirk Munro&lt;/li&gt;
&lt;li&gt;Richard Siddaway&lt;/li&gt;
&lt;li&gt;Jason Helmick&lt;/li&gt;
&lt;li&gt;Jeffery Hicks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Board is responsible for appointing a CEO (which is currently myself) to run the company; the CEO then appoints other officers as needed to conduct the corporation&amp;rsquo;s business. I&amp;rsquo;ll reiterate that PowerShell.org is a not-for-profit business, meaning our goal is to more or less break even. We obviously have expenses - Web site hosting, running the Summit, and so on - and the corporation provides a place where the needed funds can be managed, without running through anyone&amp;rsquo;s personal checking account.&lt;br&gt;
If you would like to nominate someone for the Board, please e-mail president/at/powershell.org no later than May 15th, 2013. Provide the person&amp;rsquo;s name and e-mail address. You are welcome to nominate yourself.&lt;br&gt;
Each shareholder will receive 5 votes per share owned, and can distribute those votes however they like amongst the nominees. The top 5 vote-earning nominees will comprise our new Board. They will then elect their Chairman, who presides over Board meetings, and either reconfirm the existing CEO or appoint a new one.&lt;br&gt;
If you are interested in becoming a shareholder, &lt;a href="https://powershell.org/discuss/viewtopic.php?f=26&amp;amp;t=239"&gt;please see this post&lt;/a&gt;. Note that shares must be purchased before May 1st, 2013, in order to be eligible for voting in the upcoming cycle. We are also &lt;a href="http://wp.me/p3priC-EW"&gt;nearing the end of our capital campaign&lt;/a&gt;, so time is running out to own a piece of PowerShell.org.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>At our first annual Shareholders Meeting (shareholders will receive an e-mail from me later this week about that meeting), we will be voting on our Board of Directors. Our corporate articles permit our existing Board members to serve indefinitely, and so all are automatically re-nominated. The current Board includes:</p><ul><li>Myself (Don Jones)</li><li>Kirk Munro</li><li>Richard Siddaway</li><li>Jason Helmick</li><li>Jeffery Hicks</li></ul><p>The Board is responsible for appointing a CEO (which is currently myself) to run the company; the CEO then appoints other officers as needed to conduct the corporation&rsquo;s business. I&rsquo;ll reiterate that PowerShell.org is a not-for-profit business, meaning our goal is to more or less break even. We obviously have expenses - Web site hosting, running the Summit, and so on - and the corporation provides a place where the needed funds can be managed, without running through anyone&rsquo;s personal checking account.<br>
If you would like to nominate someone for the Board, please e-mail president/at/powershell.org no later than May 15th, 2013. Provide the person&rsquo;s name and e-mail address. You are welcome to nominate yourself.<br>
Each shareholder will receive 5 votes per share owned, and can distribute those votes however they like amongst the nominees. The top 5 vote-earning nominees will comprise our new Board. They will then elect their Chairman, who presides over Board meetings, and either reconfirm the existing CEO or appoint a new one.<br>
If you are interested in becoming a shareholder,<a href="https://powershell.org/discuss/viewtopic.php?f=26&amp;t=239">please see this post</a>. Note that shares must be purchased before May 1st, 2013, in order to be eligible for voting in the upcoming cycle. We are also<a href="http://wp.me/p3priC-EW">nearing the end of our capital campaign</a>, so time is running out to own a piece of PowerShell.org.</p>
]]></content:encoded></item><item><title>Summit Downloads</title><link>https://powershell.org/articles/2013-04-22-summit-downloads/</link><guid>https://powershell.org/articles/2013-04-22-summit-downloads/</guid><pubDate>Mon, 22 Apr 2013 18:23:28 +0000</pubDate><description>&lt;p&gt;We&amp;rsquo;ll be updating this post as presenters turn over materials to us. Most of these files will be ZIPs. If there are any session materials missing - please be patient (we&amp;rsquo;re uploading as quickly as we can), or
contact the presenter directly
(as they may not have provided materials to us yet).&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/ASTManipulation.zip"&gt;Driscoll AST Manipulation&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/pssummit2013WrappingBinaryModule.zip"&gt;Prosser WrappingBinaryModule&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/Creating-HTML-Reports-with-Style-PSHSummit.zip"&gt;Creating HTML Reports with Style PSHSummit&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/Unit-Testing-Powershell.pptx.zip"&gt;Wrock Unit Testing Powershell.pptx&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/The-Powers-of-PowerShell-Pipeworks.pptx.zip"&gt;Brundage The Powers of PowerShell Pipeworks.pptx&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/DonJonesAll.zip"&gt;Don Jones All&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/Slides.zip"&gt;Slides from Several Speakers in one ZIP&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/BothSessionsAndExampleScripts.zip"&gt;Renouf BothSessionsAndExampleScripts&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/How-Secure-Can-You-Be.pdf.zip"&gt;Hicks How Secure Can You Be.pdf&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/Look-No-WinForms.zip"&gt;Hicks Look No WinForms&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/PowerShellSummitNA2013-WinRM-Drilldown.potx.zip"&gt;Team - PowerShellSummitNA2013 - WinRM Drilldown.potx&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/FasterPowerShellTalk.zip"&gt;Shirk FasterPowerShellTalk&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/DevMgmt.zip"&gt;Ricardo&amp;rsquo;s Device Mgmt talk&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/BunchMore.zip"&gt;Bunch more - should be the rest of them&lt;/a&gt;&lt;br&gt;
Ian Davis has his at &lt;a href="https://github.com/idavis/PowerShellSummit"&gt;https://github.com/idavis/PowerShellSummit&lt;/a&gt;&lt;br&gt;
Here is the link to Ricardo Mendes&amp;quot;™ Device Management PowerShell module he mentioned during his session. &lt;a href="http://gallery.technet.microsoft.com/Device-Management-7fad2388"&gt;http://gallery.technet.microsoft.com/Device-Management-7fad2388&lt;/a&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>We&rsquo;ll be updating this post as presenters turn over materials to us. Most of these files will be ZIPs. If there are any session materials missing - please be patient (we&rsquo;re uploading as quickly as we can), or
contact the presenter directly
(as they may not have provided materials to us yet).<br><a href="https://powershell.org/wp-content/uploads/2013/04/ASTManipulation.zip">Driscoll AST Manipulation</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/pssummit2013WrappingBinaryModule.zip">Prosser WrappingBinaryModule</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/Creating-HTML-Reports-with-Style-PSHSummit.zip">Creating HTML Reports with Style PSHSummit</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/Unit-Testing-Powershell.pptx.zip">Wrock Unit Testing Powershell.pptx</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/The-Powers-of-PowerShell-Pipeworks.pptx.zip">Brundage The Powers of PowerShell Pipeworks.pptx</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/DonJonesAll.zip">Don Jones All</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/Slides.zip">Slides from Several Speakers in one ZIP</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/BothSessionsAndExampleScripts.zip">Renouf BothSessionsAndExampleScripts</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/How-Secure-Can-You-Be.pdf.zip">Hicks How Secure Can You Be.pdf</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/Look-No-WinForms.zip">Hicks Look No WinForms</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/PowerShellSummitNA2013-WinRM-Drilldown.potx.zip">Team - PowerShellSummitNA2013 - WinRM Drilldown.potx</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/FasterPowerShellTalk.zip">Shirk FasterPowerShellTalk</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/DevMgmt.zip">Ricardo&rsquo;s Device Mgmt talk</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/BunchMore.zip">Bunch more - should be the rest of them</a><br>
Ian Davis has his at<a href="https://github.com/idavis/PowerShellSummit">https://github.com/idavis/PowerShellSummit</a><br>
Here is the link to Ricardo Mendes"™ Device Management PowerShell module he mentioned during his session.<a href="http://gallery.technet.microsoft.com/Device-Management-7fad2388">http://gallery.technet.microsoft.com/Device-Management-7fad2388</a></p>
]]></content:encoded></item><item><title>[UPDATED] PowerShell Summit 2013 Conference Schedule</title><link>https://powershell.org/articles/2013-04-22-powershell-summit-2013-conference-schedule/</link><guid>https://powershell.org/articles/2013-04-22-powershell-summit-2013-conference-schedule/</guid><pubDate>Mon, 22 Apr 2013 15:49:02 +0000</pubDate><description>&lt;p&gt;If you are attending the PowerShell Summit next week in Redmond, you might want to make sure you have copies of the schedule on hand.  There are two tracks, and I have created two pdf documents, one for each track, that provide the full schedule including session abstracts and speaker bios.&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/PowerShell-Summit-2013-Conference-Agenda-Track-1.pdf"&gt;PowerShell Summit 2013 Conference Schedule - Track 1&lt;/a&gt;&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/PowerShell-Summit-2013-Conference-Agenda-Track-2.pdf" title="PowerShell Summit 2013 Conference Schedule - Track 2.pdf"&gt;PowerShell Summit 2013 Conference Schedule - Track 2&lt;/a&gt;&lt;br&gt;
While those details are very useful, some of the conference attendees have expressed an interest in having a consolidated view of the agenda so that they could see which sessions were taking place on each of the tracks and choose which they were more interested in.  Ask, and ye shall receive.  Here is a consolidated view of the conference sessions on all tracks, with each day on a separate page.&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/PowerShell-Summit-2013-Conference-Agenda-At-a-glance.pdf"&gt;PowerShell Summit 2013 Conference Schedule - At at glance&lt;/a&gt;&lt;br&gt;
Note that if you don&amp;quot;™t have a ticket for the conference, it is sold out for this year.  We&amp;quot;™re planning the 2014 conference now, so keep watching this blog for news about that conference as it becomes available.  There are already a few posts about it that are worth reviewing if you missed them.&lt;br&gt;
Thanks, and enjoy the conference next week!&lt;br&gt;
Kirk out.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>If you are attending the PowerShell Summit next week in Redmond, you might want to make sure you have copies of the schedule on hand.  There are two tracks, and I have created two pdf documents, one for each track, that provide the full schedule including session abstracts and speaker bios.<br><a href="https://powershell.org/wp-content/uploads/2013/04/PowerShell-Summit-2013-Conference-Agenda-Track-1.pdf">PowerShell Summit 2013 Conference Schedule - Track 1</a><br><a href="https://powershell.org/wp-content/uploads/2013/04/PowerShell-Summit-2013-Conference-Agenda-Track-2.pdf" title="PowerShell Summit 2013 Conference Schedule - Track 2.pdf">PowerShell Summit 2013 Conference Schedule - Track 2</a><br>
While those details are very useful, some of the conference attendees have expressed an interest in having a consolidated view of the agenda so that they could see which sessions were taking place on each of the tracks and choose which they were more interested in.  Ask, and ye shall receive.  Here is a consolidated view of the conference sessions on all tracks, with each day on a separate page.<br><a href="https://powershell.org/wp-content/uploads/2013/04/PowerShell-Summit-2013-Conference-Agenda-At-a-glance.pdf">PowerShell Summit 2013 Conference Schedule - At at glance</a><br>
Note that if you don"™t have a ticket for the conference, it is sold out for this year.  We"™re planning the 2014 conference now, so keep watching this blog for news about that conference as it becomes available.  There are already a few posts about it that are worth reviewing if you missed them.<br>
Thanks, and enjoy the conference next week!<br>
Kirk out.</p>
]]></content:encoded></item><item><title>Meet the Scripting Games Judges: Jeffery Hicks</title><link>https://powershell.org/articles/2013-04-22-meet-the-scripting-games-judges-jeffery-hicks/</link><guid>https://powershell.org/articles/2013-04-22-meet-the-scripting-games-judges-jeffery-hicks/</guid><pubDate>Mon, 22 Apr 2013 14:46:22 +0000</pubDate><description>&lt;p&gt;Jeffery Hicks is a Microsoft MVP in Windows PowerShell, Microsoft
Certified Trainer and an IT veteran with over 20 years of experience,
much of it spent as an IT consultant specializing in Microsoft server
technologies with an emphasis in automation and efficiency.He works
today as an independent author, trainer and consultant.Jeffwritesthe
popular Prof. PowerShell column for MPCMag.com, is a regular contributor
to the Petri IT Knowledgebase, 4SysOps and the Altaro Hyper-V blog, as
well as frequent speaker at technology conferences and user groups.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Jeffery Hicks is a Microsoft MVP in Windows PowerShell, Microsoft
Certified Trainer and an IT veteran with over 20 years of experience,
much of it spent as an IT consultant specializing in Microsoft server
technologies with an emphasis in automation and efficiency.He works
today as an independent author, trainer and consultant.Jeffwritesthe
popular Prof. PowerShell column for MPCMag.com, is a regular contributor
to the Petri IT Knowledgebase, 4SysOps and the Altaro Hyper-V blog, as
well as frequent speaker at technology conferences and user groups.</p><p>Jeff is looking forward to seeing entries that are more than<br>
re-formatted VBScript. Beginner scripts should demonstrate an<br>
understanding of the PowerShell paradigm.Advanced scripts should go<br>
beyond and demonstrate mastery of complex techniques and concepts. The<br>
best of the best will have a pure, elegant, zen-like simplicity even for<br>
the most challenging tasks.<br>
You can keep up with Jeff at his blog<a href="http://jdhitsolutions.com/blog">http://jdhitsolutions.com/blog</a> , on<br>
Twitter at<a href="https://twitter.com/jeffhicks">https://twitter.com/jeffhicks</a> and on<br>
Google Plus (<a href="http://gplus.to/JeffHicks">http://gplus.to/JeffHicks</a>)</p>
]]></content:encoded></item><item><title>Advanced Practice Event</title><link>https://powershell.org/articles/2013-04-20-advanced-practice-event/</link><guid>https://powershell.org/articles/2013-04-20-advanced-practice-event/</guid><pubDate>Sat, 20 Apr 2013 16:00:56 +0000</pubDate><description>&lt;p&gt;I want to direct your attention to &lt;a href="https://powershell.org/discuss/viewtopic.php?f=39&amp;amp;t=1810&amp;amp;p=8059#p8059"&gt;this forums post&lt;/a&gt;, which I think is worth anyone&amp;rsquo;s time to look through. I&amp;rsquo;ve left a pretty long reply with some comments on the entry that would also be worth a read.&lt;br&gt;
I find that a LOT of folks - like the gentleman who posted his script - have a really good approach to PowerShell scripts. They want to use parameters. They want verbose output. They want to proactively check for errors. Where I think folks get lost is in the fine points of how PowerShell enables these features. I see folks working harder than they need to, coding functionality that the shell will actually give them for free. I also see some not-entirely-perfect approaches to things like parameters and error handling, and some occasional mis-use of advanced features (I often see SupportsShouldProcess &lt;em&gt;declared&lt;/em&gt; but not actually &lt;em&gt;implemented&lt;/em&gt;).&lt;br&gt;
Sometimes, this simply happens because a lot of these advanced features aren&amp;rsquo;t well-documented in one convenient spot - they&amp;rsquo;re all spread out - and because folks are learning from blog posts, which may themselves have been written by someone with an incomplete understanding. Or, they&amp;rsquo;re pasting bits together without &lt;em&gt;really&lt;/em&gt; knowing what they&amp;rsquo;re doing. That&amp;rsquo;s cool - what you have to sometimes do is take a whack at something like this poster did, and get some feedback. I&amp;rsquo;m &lt;em&gt;really&lt;/em&gt; glad he did, because it offers an opportunity to clear up some misunderstandings, which will just make his scripts even better in the future.&lt;br&gt;
I hope everyone&amp;rsquo;s looking at the Games as a learning opportunity. I hope &lt;em&gt;everyone&lt;/em&gt; will vote on folks&amp;rsquo; entries and leave comments when they do; I hope as many people as possible spend some time blogging about what  they see, what they&amp;rsquo;ve learned, and &lt;em&gt;what they don&amp;rsquo;t understand.&lt;/em&gt; That&amp;rsquo;s how we&amp;rsquo;ll all improve.&lt;br&gt;
Let me give you a perfect example (we&amp;rsquo;re no longer discussing the forums post, here - I&amp;rsquo;m moving on to a new topic):&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I want to direct your attention to<a href="https://powershell.org/discuss/viewtopic.php?f=39&amp;t=1810&amp;p=8059#p8059">this forums post</a>, which I think is worth anyone&rsquo;s time to look through. I&rsquo;ve left a pretty long reply with some comments on the entry that would also be worth a read.<br>
I find that a LOT of folks - like the gentleman who posted his script - have a really good approach to PowerShell scripts. They want to use parameters. They want verbose output. They want to proactively check for errors. Where I think folks get lost is in the fine points of how PowerShell enables these features. I see folks working harder than they need to, coding functionality that the shell will actually give them for free. I also see some not-entirely-perfect approaches to things like parameters and error handling, and some occasional mis-use of advanced features (I often see SupportsShouldProcess<em>declared</em> but not actually<em>implemented</em>).<br>
Sometimes, this simply happens because a lot of these advanced features aren&rsquo;t well-documented in one convenient spot - they&rsquo;re all spread out - and because folks are learning from blog posts, which may themselves have been written by someone with an incomplete understanding. Or, they&rsquo;re pasting bits together without<em>really</em> knowing what they&rsquo;re doing. That&rsquo;s cool - what you have to sometimes do is take a whack at something like this poster did, and get some feedback. I&rsquo;m<em>really</em> glad he did, because it offers an opportunity to clear up some misunderstandings, which will just make his scripts even better in the future.<br>
I hope everyone&rsquo;s looking at the Games as a learning opportunity. I hope<em>everyone</em> will vote on folks&rsquo; entries and leave comments when they do; I hope as many people as possible spend some time blogging about what  they see, what they&rsquo;ve learned, and<em>what they don&rsquo;t understand.</em> That&rsquo;s how we&rsquo;ll all improve.<br>
Let me give you a perfect example (we&rsquo;re no longer discussing the forums post, here - I&rsquo;m moving on to a new topic):</p><p>`Try {
$continue = $true
$bios = Get-WmiObject -class Win32_BIOS -computername $computer -EA Stop
} Catch {
$continue = $false
$computer | Out-File errors.txt -append
}
if ($continue) {
$os = Get-WmiObject -class Win32_OperatingSystem -computername $computer</p><h1 id="and-so-on" class="ps-heading">and so on&hellip;<a class="ps-heading-anchor" href="#and-so-on" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>}
`This is how I used to code for error handling when querying multiple WMI classes. I&rsquo;d set a &ldquo;flag&rdquo; variable, $continue, to $false if the first WMI call failed, so that I didn&rsquo;t waste time on subsequent calls. Note that this is just a snippet; it isn&rsquo;t an entire script. Then I had a student who coded it this way:</p><p>`Try {
$bios = Get-WmiObject -class Win32_BIOS -computername $computer -EA Stop
$os = Get-WmiObject -class Win32_OperatingSystem -computername $computer</p><h1 id="and-so-on-1" class="ps-heading">and so on&hellip;<a class="ps-heading-anchor" href="#and-so-on-1" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>} Catch {
$computer | Out-File errors.txt -append
}
`Much more concise, and same effect. If the first WMI call fails, I jump into the Catch block, and skip the remaining code anyway. So there are constantly learning opportunities in seeing someone else&rsquo;s approach. For me, I learn new approaches that are sometimes better than what I&rsquo;ve been doing. I also learn how to better teach PowerShell to people, by seeing common mistakes and misunderstandings. It&rsquo;s great to share your failures - that&rsquo;s how we grow!<br><strong>Update:</strong> Someone dropped me a line and made a couple of points, which I want to address:</p><blockquote><p>In the reply to the blog post you say: &ldquo;Please consider properly setting -ErrorAction on the command (Get-WmiObject, in your case) and using a Try/Catch construct to actually handle errors, not just hide them.&rdquo; The example shown does the exact opposite. Any terminating error is caught, logged to a file, but not re-thrown effectively hiding the exception.</p></blockquote><p>I disagree. First,<em>handling</em> an error<em>may still involve suppressing the error message.</em> But I&rsquo;m suppressing it for just one command, not the entire script; I&rsquo;m also<em>handling</em> the error by, in my case, logging it to a file. How you choose to handle may differ. What I don&rsquo;t want to do is toss a terminating exception - I&rsquo;m in a loop, and want my command to continue processing the next object.</p><blockquote><p>Also the $os  = &hellip; part is missing the -errorAction STOP.</p></blockquote><p>That&rsquo;s deliberate. If there&rsquo;s going to be an<em>anticipated</em> error - lack of connectivity, bad credentials, etc., I&rsquo;m going to get an error on the first WMI call ($bios). I&rsquo;ll trap it, log it, and move on to the next computer (one presumes those snippets of mine are running in a loop of some kind, processing one computer at a time). If there&rsquo;s an<em>unexpected</em> error, like a corrupt WMI repository or something, the second WMI call ($os) will explode, generating an error that I very much want to see, because I didn&rsquo;t anticipate it.<br>
Notice a word that I used a lot there: &ldquo;I.&rdquo; I&rsquo;m coding the script for the way<em>I</em> want to it to run.<em>I</em> want anticipated errors logged, and <em>I</em> want unanticipated errors to continue exploding.<em>You</em> may want your scripts to do different things. I&rsquo;m not putting these snippets out there as the One True Way To Code, because there&rsquo;s no such thing. What I<em>am</em> saying is that you need to<em>think about</em> why you&rsquo;re coding the way you are, and have some justification for it.<br>
Globally suppressing error messages, but not doing anything to handle errors that you do suppress, is a poor practice. Beyond that, do what you need to do. I&rsquo;m fine with someone suppressing an error<em>they&rsquo;ve dealt with.</em> But if your code isn&rsquo;t dealing with it, then the person running the script needs to see something&rsquo;s gone wrong.</p>
]]></content:encoded></item><item><title>Show Your Scripting Games Pride!</title><link>https://powershell.org/articles/2013-04-20-show-your-scripting-games-pride/</link><guid>https://powershell.org/articles/2013-04-20-show-your-scripting-games-pride/</guid><pubDate>Sat, 20 Apr 2013 15:06:24 +0000</pubDate><description>&lt;p&gt;If you&amp;rsquo;re participating in the Scripting Games, log on to the Scripting Games Web site and check out your Profile page. You&amp;rsquo;ll find a redemption code that can be used to unlock a Participant achievement on the main PowerShell.org Web site!&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/FirefoxScreenSnapz0012.png"&gt;&lt;img src="https://powershell.org/wp-content/uploads/2013/04/FirefoxScreenSnapz0012.png" alt="FirefoxScreenSnapz001"&gt;&lt;/a&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>If you&rsquo;re participating in the Scripting Games, log on to the Scripting Games Web site and check out your Profile page. You&rsquo;ll find a redemption code that can be used to unlock a Participant achievement on the main PowerShell.org Web site!<br><a href="https://powershell.org/wp-content/uploads/2013/04/FirefoxScreenSnapz0012.png"><img src="https://powershell.org/wp-content/uploads/2013/04/FirefoxScreenSnapz0012.png" alt="FirefoxScreenSnapz001"/></p>
]]></content:encoded></item><item><title>Comments from the PowerShell.org survey</title><link>https://powershell.org/articles/2013-04-19-comments-from-the-powershell-org-survey/</link><guid>https://powershell.org/articles/2013-04-19-comments-from-the-powershell-org-survey/</guid><pubDate>Fri, 19 Apr 2013 17:09:26 +0000</pubDate><description>&lt;p&gt;As you probably know, we&amp;rsquo;ve been &lt;a href="http://674004.polldaddy.com/s/2013-powershell-org-member-survey"&gt;running a survey for PowerShell.org&lt;/a&gt;, which helps us both improve the site and create demographic information that makes us appealing to sponsors (who, you know, &lt;em&gt;pay&lt;/em&gt; for everything here). We&amp;rsquo;ve gotten a ton of great feedback. Yeah, we really are reading every single comment you left.&lt;br&gt;
Let&amp;rsquo;s start with the biggies:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Maybe some more guest writers for articles? I imagine it&amp;rsquo;s difficult with all the articles that get posted all over the net every day, but maybe some of those folks (like the scripting guys or scripting wife) can do some to help the Powershell.org community.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As you probably know, we&rsquo;ve been<a href="http://674004.polldaddy.com/s/2013-powershell-org-member-survey">running a survey for PowerShell.org</a>, which helps us both improve the site and create demographic information that makes us appealing to sponsors (who, you know,<em>pay</em> for everything here). We&rsquo;ve gotten a ton of great feedback. Yeah, we really are reading every single comment you left.<br>
Let&rsquo;s start with the biggies:</p><blockquote><p>Maybe some more guest writers for articles? I imagine it&rsquo;s difficult with all the articles that get posted all over the net every day, but maybe some of those folks (like the scripting guys or scripting wife) can do some to help the Powershell.org community.</p></blockquote><p>You find us guest authors, we&rsquo;ll give &rsquo;em a place to write. Problem is, not many folks want to write. We try to aggregate the better PowerShell-related blogs out there (we link to the original site so that we&rsquo;re not stealing their traffic) just as a discovery mechanism, but I&rsquo;m not sure what else we could do.</p><blockquote><p>On the forum almost every thread remains &lsquo;unsolved&rsquo;. Maybe moderators can close threads, and even remove posts that are not relevant. I also see a lot of questions returning, for example on &lsquo;how to change a property in AD&rsquo;. I don&rsquo;t know if this can be avoided, but if you know a way to diminish double threads, that would be great.</p></blockquote><p>Testify, brother. You tell me how to fix it and we&rsquo;ll give it a shot. The rest of the interwebz would probably like to know how to fix that, too. We can&rsquo;t make people click &ldquo;solved,&rdquo; and believe it or not they get TESTY if we click it for them. Seriously. Been yelled at. And don&rsquo;t know how to make people search before they post. Just don&rsquo;t.<br>
And now for some shorter responses:</p><ul><li><strong>PHPBB forums for questions&hellip; just link to StackExchange.</strong> Honestly, whatevs. We literally have at least one comment telling us to use every piece of forums software out there, and/or link to every other forum already out there. ServerFault, ExpertsExchange, we&rsquo;ve got &rsquo;em all in here. We&rsquo;ll continue having our own forums mainly because it&rsquo;s easier to ensure newcomers (especially) get a polite answer, not a brush-off, which happens too often in some of the other forums I&rsquo;ve seen. As for software, we&rsquo;re moving off of phpBB in June.</li><li><strong>I don&rsquo;t know if that something not to like - but I do think that people should be awarded for contributing to the community.</strong> Agreed. Looking into it.</li><li><strong>forum email notifications work sporadically (does not always send an email for notices/updates)</strong>. I&rsquo;m not sure they&rsquo;re that sporadic - I&rsquo;ve looked into this a LOT. A lot a lot. Problem is that people have their spam settings set to DEFCON 1, with three layers of filtering. ForeFront Online Protection, for example, had a global block against our hosting company&rsquo;s IP addresses that we had to get resolved - when things are blocked at that level, you&rsquo;ll never see it in your Spam folders.</li><li><strong>I love the simplicity of the site, please DON&rsquo;T make it too busy with meaningless ads and trivialites.</strong> Dang. There goes our plans for putting ads every three inches on the page. Oh, well.</li><li><strong>It needs rss feeds.</strong> It has &rsquo;em.</li><li><strong>Regarding Summit info, and especially the session registration process has been a bit confusing. I&rsquo;m not sure of a single place to optionally check status updates.</strong> I know. That&rsquo;s my fault. We&rsquo;re going to do better next time, putting everything in the &ldquo;Announcements&rdquo; category here.</li><li><strong>There is too much fokus on American area. We need more European stuff / events.</strong> Dude, you help us put it together, then. You live there. Asking Americans to put on a European event does not smell like a recipe for success, ya know?</li><li><strong>It&rsquo;s not possible but it&rsquo;d be nice if the moderators when stumped would reach out to the masters to get threads answered.</strong> We really try to. Sometimes the other folks aren&rsquo;t all that responsive. They got jobs too, and whatnot.</li><li><strong>The home page isn&rsquo;t very appealing - not a big complaint but it could do with a makeover.</strong> Done. Hope you like it. The Forums will be moving, too.</li><li><strong>There&rsquo;s a lot of good email newsletter design templates available out there to make it more reader friendly and not just a wall of text.</strong> Well, PowerShell&rsquo;s pretty text-heavy. Guess we&rsquo;re not big GUI folks .</li><li><strong>I do not like the fact that you make business around powershell.</strong> Yeah, I&rsquo;m not sure you and I agree on what a &ldquo;business&rdquo; is. We set up PowerShell.org, Inc., so that an entity could own the Web site and pay for its hosting. We make about enough money from sponsorships to pay those bills. Officially, PowerShell.org, Inc. is &ldquo;not for profit.&rdquo; Nobody draws a salary or gets paid. We can&rsquo;t give you all of these resources for free without someone paying, and the &ldquo;business&rdquo; gives that money a place to go so that it is<em>only</em> used to run the community. Nobody else can pinch off pieces of the money for their own purposes.</li><li><strong>More integration / collaboration with PowerShell User Groups.</strong> Yeah, working on it. Literally, Mark Schill (who runs that site) and I have been exchanging e-mails this morning. We both understand the value in having one place to discover user groups and keep up with their schedules; we&rsquo;re trying to figure out the best way to deliver the functionality user group leaders require to post that information, and where the best place is for it to all live. We&rsquo;ll link to it from here, wherever that turns out to be. Stay tuned.</li><li><strong>Put newsletters in an online archive.</strong> Working on it. The March switch in mail providers was in large part to facilitate this. I just need some time to finish up the programmery bits needed.</li><li><strong>Live hangouts/webinars in the vein of what vBrownbag does for virtualization.</strong> Awesome idea. You volunteering to lead &rsquo;em? Please, contact me if you are.</li></ul><p>Y&rsquo;all had a bunch of nice things to say, too, which we all appreciate. We&rsquo;ll be sharing the complete survey results once it finishes running at the end of May.<br>
But let&rsquo;s wrap with a big philosophical comment, because I&rsquo;d really like your feedback on this one - just drop a comment below if you care to weigh in.</p><blockquote><p>I would like to see a site that becomes the authoritative place to go for resources since Microsoft doesn&rsquo;t really seem all that interested any more. There are way to many sites hosting scripts and pieces of &ldquo;stuff&rdquo;. I would really like to have &ldquo;One site to rule them all.&rdquo; 😉</p></blockquote><p>I get that. But&hellip; in some cases, the folks running a great resource (take PoshCode.org) want to rule their own destiny, and not become part of the collective. Nothing wrong with that - it lets them do their own thing. We&rsquo;re trying to just link to the best of those community resources, so that people can find them when they run across this site. If someone<em>wants</em> to jump in and be part of PowerShell.org, we&rsquo;ll try and make it happen - our charter is to offer support and resources to anyone who&rsquo;s contributing - but we don&rsquo;t really lobby for them to do that. If<strong>you</strong> see something out there you like, and you think they should hook up with us in some fashion, tell them.</p>
]]></content:encoded></item><item><title>Beginner Practice Event</title><link>https://powershell.org/articles/2013-04-18-beginner-practice-event/</link><guid>https://powershell.org/articles/2013-04-18-beginner-practice-event/</guid><pubDate>Thu, 18 Apr 2013 19:07:38 +0000</pubDate><description>&lt;p&gt;As you may be aware, we posted &lt;a href="https://powershell.org/2013/04/03/2013-scripting-games-schedule/"&gt;Practice Events for the 2013 Scripting Games&lt;/a&gt;, in an effort to give people an idea of what the events would look like and involve. There&amp;rsquo;s been a &lt;a href="https://powershell.org/discuss/viewtopic.php?f=39&amp;amp;t=1674"&gt;lively discussion&lt;/a&gt; in the PowerShell.org forums about the Beginner Practice, so I thought I&amp;rsquo;d weigh in. Here&amp;rsquo;s my solution:&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/VMware-FusionScreenSnapz001.png"&gt;&lt;img src="https://powershell.org/wp-content/uploads/2013/04/VMware-FusionScreenSnapz001.png" alt="Beginner practice event"&gt;&lt;/a&gt;&lt;br&gt;
Of course, that&amp;rsquo;s hardly the only way to go about it. I used this approach because it minimizes the use of extra variables, and doesn&amp;rsquo;t create a script-style approach - it&amp;rsquo;s a &amp;ldquo;one-liner,&amp;rdquo; although I&amp;rsquo;ve broken it across several physical lines for readability. I think it makes good use of PowerShell&amp;rsquo;s native ability to deal with multiple objects in a stream - there&amp;rsquo;s no need for a ForEach loop, here.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As you may be aware, we posted<a href="https://powershell.org/2013/04/03/2013-scripting-games-schedule/">Practice Events for the 2013 Scripting Games</a>, in an effort to give people an idea of what the events would look like and involve. There&rsquo;s been a<a href="https://powershell.org/discuss/viewtopic.php?f=39&amp;t=1674">lively discussion</a> in the PowerShell.org forums about the Beginner Practice, so I thought I&rsquo;d weigh in. Here&rsquo;s my solution:<br><a href="https://powershell.org/wp-content/uploads/2013/04/VMware-FusionScreenSnapz001.png"><img src="https://powershell.org/wp-content/uploads/2013/04/VMware-FusionScreenSnapz001.png" alt="Beginner practice event"/><br>
Of course, that&rsquo;s hardly the only way to go about it. I used this approach because it minimizes the use of extra variables, and doesn&rsquo;t create a script-style approach - it&rsquo;s a &ldquo;one-liner,&rdquo; although I&rsquo;ve broken it across several physical lines for readability. I think it makes good use of PowerShell&rsquo;s native ability to deal with multiple objects in a stream - there&rsquo;s no need for a ForEach loop, here.</p>
]]></content:encoded></item><item><title>[UPDATED] Last-Minute Summit Info and Changes</title><link>https://powershell.org/articles/2013-04-18-last-minute-summit-info-and-changes/</link><guid>https://powershell.org/articles/2013-04-18-last-minute-summit-info-and-changes/</guid><pubDate>Thu, 18 Apr 2013 14:19:14 +0000</pubDate><description>&lt;p&gt;Please make sure you&amp;rsquo;re following this announcements category as you travel to, and attend, the Summit. It&amp;rsquo;s the best way for us to get out late-breaking news.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Registration begins&lt;/strong&gt; at 8am on Monday, April 22nd, in the lobby of Building 40. Now, sometimes the lobby doors open a wee bit late - so bear with us. The first sessions aren&amp;rsquo;t until 9am, so there&amp;rsquo;s plenty of time. Please bring a printout of your ticket from EventBrite, and a photo ID.&lt;br&gt;
&lt;strong&gt;Session pre-registration&lt;/strong&gt; didn&amp;rsquo;t happen - we had some volunteers have emergency health issues that just got us behind schedule, so we couldn&amp;rsquo;t get the mobile app thing going. No fear. Sessions will be on a first-come, first-seated basis. Note that we are spread between two adjacent buildings, so you may have to traipse from one to the other during the 15-minute session breaks.&lt;br&gt;
&lt;strong&gt;Meals&lt;/strong&gt; will include a &lt;em&gt;very light continental breakfast&lt;/em&gt; and a lunch. We will endeavor to supply soft drinks throughout the day, but that will require Microsoft employees to shuttle them to us. You&amp;rsquo;re welcome to bring your own soft drinks. We&amp;rsquo;ve got coffee lined up. &lt;em&gt;Please&lt;/em&gt; respect your fellow attendees - we&amp;rsquo;ve ordered enough food for everyone, but that assumes everyone&amp;rsquo;s taking a normal-sized serving. A plate piled high with croissants isn&amp;rsquo;t normal, and deprives your fellow attendees of their share. Seriously - this happened at a conference I was at a couple of weeks ago. Pretty sad.&lt;br&gt;
&lt;strong&gt;Kickoff&lt;/strong&gt; we will have a VERY SHORT kickoff in each session room at 8:45am. We&amp;rsquo;ll endeavor to present all general material in both session rooms, since neither room can accommodate all of us at once. Jason Helmick and myself will be handling those duties throughout the event. You&amp;rsquo;re welcome to come to us with any problems you run into.&lt;br&gt;
&lt;strong&gt;Problems&lt;/strong&gt; may arise - bear in mind this is our first year, and just be patient with us. If you bring it to our attention, we&amp;rsquo;ll fix what we can, as soon as we can. We really appreciate your help and patience as we try to make a great event!&lt;br&gt;
&lt;strong&gt;Wi-Fi&lt;/strong&gt; is not guaranteed, and we will not have power drops for everyone&amp;rsquo;s laptop. Please &lt;strong&gt;do not&lt;/strong&gt; stretch your laptop power cord across any walkways - you &lt;strong&gt;will&lt;/strong&gt; be asked to unplug for safety reasons. We suggest leaving the laptop in your hotel room, so help make the room more comfortable for everyone (if everyone brings a laptop and a giant bag for it, it&amp;rsquo;s going to get cramped).&lt;br&gt;
&lt;strong&gt;Parking is limited&lt;/strong&gt; on-site, and you need to make sure you park in a space that isn&amp;rsquo;t restricted. Check-in with the building receptionist to see if your car needs to be registered. You can also park at the ExtendedStay America hotel across the street, and walk to buildings 40 and 41. You&amp;rsquo;re responsible for your own transportation during the event.&lt;br&gt;
&lt;strong&gt;Evening events&lt;/strong&gt; are strictly on-your-own. We don&amp;rsquo;t have anything official planned. If someone puts something together ad-hoc and tells us, we&amp;rsquo;ll do our best to spread the word.&lt;br&gt;
&lt;strong&gt;This is an informal event&lt;/strong&gt; - don&amp;rsquo;t think of the Summit as a conference like TechEd, but rather as a gathering of friends and colleagues. It&amp;rsquo;ll be less structured, more ad-hoc, and hopefully more engaging.&lt;br&gt;
&lt;strong&gt;Please be respectful of speakers&lt;/strong&gt; while they present, and follow their guidelines on when to ask questions. We do have to push them off the stage at the end of their allotted time, so give them their time to complete their presentation for you. If you have additional Q&amp;amp;A after the session ends, please take it into the lobby so that the next session can start.&lt;br&gt;
&lt;strong&gt;MONDAY AT LUNCH&lt;/strong&gt; we will launch the 2013 Scripting Games with an EnergizedTech opening ceremonies video. It&amp;rsquo;ll be a pageant - don&amp;rsquo;t miss it. 12:30pm in each session room.&lt;br&gt;
&lt;strong&gt;WEDNESDAY AT LUNCH&lt;/strong&gt; in the lobby or session room in building 40, you&amp;rsquo;re invited to meet the Summit organizers (if you&amp;rsquo;ve managed to avoid us until then) and offer feedback for 2014.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Please make sure you&rsquo;re following this announcements category as you travel to, and attend, the Summit. It&rsquo;s the best way for us to get out late-breaking news.</p><p><strong>Registration begins</strong> at 8am on Monday, April 22nd, in the lobby of Building 40. Now, sometimes the lobby doors open a wee bit late - so bear with us. The first sessions aren&rsquo;t until 9am, so there&rsquo;s plenty of time. Please bring a printout of your ticket from EventBrite, and a photo ID.<br><strong>Session pre-registration</strong> didn&rsquo;t happen - we had some volunteers have emergency health issues that just got us behind schedule, so we couldn&rsquo;t get the mobile app thing going. No fear. Sessions will be on a first-come, first-seated basis. Note that we are spread between two adjacent buildings, so you may have to traipse from one to the other during the 15-minute session breaks.<br><strong>Meals</strong> will include a<em>very light continental breakfast</em> and a lunch. We will endeavor to supply soft drinks throughout the day, but that will require Microsoft employees to shuttle them to us. You&rsquo;re welcome to bring your own soft drinks. We&rsquo;ve got coffee lined up.<em>Please</em> respect your fellow attendees - we&rsquo;ve ordered enough food for everyone, but that assumes everyone&rsquo;s taking a normal-sized serving. A plate piled high with croissants isn&rsquo;t normal, and deprives your fellow attendees of their share. Seriously - this happened at a conference I was at a couple of weeks ago. Pretty sad.<br><strong>Kickoff</strong> we will have a VERY SHORT kickoff in each session room at 8:45am. We&rsquo;ll endeavor to present all general material in both session rooms, since neither room can accommodate all of us at once. Jason Helmick and myself will be handling those duties throughout the event. You&rsquo;re welcome to come to us with any problems you run into.<br><strong>Problems</strong> may arise - bear in mind this is our first year, and just be patient with us. If you bring it to our attention, we&rsquo;ll fix what we can, as soon as we can. We really appreciate your help and patience as we try to make a great event!<br><strong>Wi-Fi</strong> is not guaranteed, and we will not have power drops for everyone&rsquo;s laptop. Please<strong>do not</strong> stretch your laptop power cord across any walkways - you<strong>will</strong> be asked to unplug for safety reasons. We suggest leaving the laptop in your hotel room, so help make the room more comfortable for everyone (if everyone brings a laptop and a giant bag for it, it&rsquo;s going to get cramped).<br><strong>Parking is limited</strong> on-site, and you need to make sure you park in a space that isn&rsquo;t restricted. Check-in with the building receptionist to see if your car needs to be registered. You can also park at the ExtendedStay America hotel across the street, and walk to buildings 40 and 41. You&rsquo;re responsible for your own transportation during the event.<br><strong>Evening events</strong> are strictly on-your-own. We don&rsquo;t have anything official planned. If someone puts something together ad-hoc and tells us, we&rsquo;ll do our best to spread the word.<br><strong>This is an informal event</strong> - don&rsquo;t think of the Summit as a conference like TechEd, but rather as a gathering of friends and colleagues. It&rsquo;ll be less structured, more ad-hoc, and hopefully more engaging.<br><strong>Please be respectful of speakers</strong> while they present, and follow their guidelines on when to ask questions. We do have to push them off the stage at the end of their allotted time, so give them their time to complete their presentation for you. If you have additional Q&amp;A after the session ends, please take it into the lobby so that the next session can start.<br><strong>MONDAY AT LUNCH</strong> we will launch the 2013 Scripting Games with an EnergizedTech opening ceremonies video. It&rsquo;ll be a pageant - don&rsquo;t miss it. 12:30pm in each session room.<br><strong>WEDNESDAY AT LUNCH</strong> in the lobby or session room in building 40, you&rsquo;re invited to meet the Summit organizers (if you&rsquo;ve managed to avoid us until then) and offer feedback for 2014.</p><p><strong>Company Store</strong> vouchers may be are a reality, thanks to The Scripting Guy. You will need to use Microsoft transportation to get to Commons, where the Store is located; you&rsquo;ll be able to spend your own money, up to the voucher limit, to purchase products at employee prices. These products MAY NOT BE RESOLD and are for your personal use (they may be given as gifts). </p><p><strong>PowerShell.org</strong> stickers will be available at registration - please, limit 1 per person. We only brought a limited supply.<br><strong>THANK YOU TO OUR VOLUNTEERS</strong> who are helping make the Summit happen - Christopher Gannon and The Scripting Wife, Teresa Wilson, will be running registration and guarding our food from poachers. Jason Helmick will be helping me with room monitoring, pacing, and general content presentations. Kirk Munro ran content selection and speaker relations. And of course, all of our speakers are presenting on their own time, without compensation, although we&rsquo;ve been able to cover most of their travel expenses.<br><strong>2014 is coming.</strong> We&rsquo;re planning a bigger event, but that means a bigger commitment - we will nee about 130 people to break even (although we&rsquo;ll be able to handle about 250, if things go as planned). We hope you&rsquo;ll help us publicize the 2014 event when the time comes, so that we can make it happen for you.<br><em><strong>THANK YOU AND SEE YOU IN REDMOND!</strong></em></p>
]]></content:encoded></item><item><title>What are Your PowerShell Newbie Gotchas?</title><link>https://powershell.org/articles/2013-04-18-what-are-your-powershell-newbie-gotchas/</link><guid>https://powershell.org/articles/2013-04-18-what-are-your-powershell-newbie-gotchas/</guid><pubDate>Thu, 18 Apr 2013 13:55:31 +0000</pubDate><description>&lt;p&gt;I&amp;rsquo;m putting together a list of common &amp;ldquo;gotchas&amp;rdquo; for PowerShell, mainly things that affect newcomers. So far, I&amp;rsquo;ve got:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Piping the output of a Format cmdlet to nearly anything else&lt;/li&gt;
&lt;li&gt;Using -contains instead of -like&lt;/li&gt;
&lt;li&gt;Selecting a subset of object properties and then trying to sort/fiter on a now-missing property&lt;/li&gt;
&lt;li&gt;Wrong syntax for -filter parameters on various commands&lt;/li&gt;
&lt;li&gt;Commands that don&amp;rsquo;t produce pipeline output (e.g., piping Export-CSV to something)&lt;/li&gt;
&lt;li&gt;Using ConvertTo-HTML without -Fragment and appending multiple pages in one file&lt;/li&gt;
&lt;li&gt;Confusion with ( [ { and the other punctuation&lt;/li&gt;
&lt;li&gt;Concatenating strings (hard) vs. using double quotes (easier)&lt;/li&gt;
&lt;li&gt;$ not being part of the variable name (esp with -ErrorVariable)&lt;/li&gt;
&lt;li&gt;Accumulating objects in a variable and returning it, vs. outputting to the pipeline directly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What are your &amp;ldquo;gotchas?&amp;rdquo;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I&rsquo;m putting together a list of common &ldquo;gotchas&rdquo; for PowerShell, mainly things that affect newcomers. So far, I&rsquo;ve got:</p><ul><li>Piping the output of a Format cmdlet to nearly anything else</li><li>Using -contains instead of -like</li><li>Selecting a subset of object properties and then trying to sort/fiter on a now-missing property</li><li>Wrong syntax for -filter parameters on various commands</li><li>Commands that don&rsquo;t produce pipeline output (e.g., piping Export-CSV to something)</li><li>Using ConvertTo-HTML without -Fragment and appending multiple pages in one file</li><li>Confusion with ( [ { and the other punctuation</li><li>Concatenating strings (hard) vs. using double quotes (easier)</li><li>$ not being part of the variable name (esp with -ErrorVariable)</li><li>Accumulating objects in a variable and returning it, vs. outputting to the pipeline directly</li></ul><p>What are your &ldquo;gotchas?&rdquo;</p>
]]></content:encoded></item><item><title>Scripting Games Competitor Guide / Instructions Update</title><link>https://powershell.org/articles/2013-04-18-scripting-games-competitor-guide-instructions-update/</link><guid>https://powershell.org/articles/2013-04-18-scripting-games-competitor-guide-instructions-update/</guid><pubDate>Thu, 18 Apr 2013 13:41:21 +0000</pubDate><description>&lt;p&gt;We&amp;rsquo;ve made some minor fixes and clarifications to the 2013 Scripting Games Competitors&amp;rsquo; Guide and Instructions booklet. I encourage you to &lt;a href="https://powershell.org/the-scripting-games/" title="The Scripting Games"&gt;download them and review them&lt;/a&gt; once more before we kick off next week.&lt;br&gt;
In addition, we have some additional prizes for our winners in each event - I&amp;rsquo;ve updated the &lt;a href="https://powershell.org/2013/04/17/scripting-games-2013-prize-list/" title="[UPDATED] Scripting Games 2013 Prize List"&gt;prize list post&lt;/a&gt; to include this new information. That post, going forward, will be the authoritative prize list.&lt;br&gt;
Registration is now open, and the Games will formally kick off on April 22nd. The first event opens April 25th. Please rely on the &lt;a href="https://powershell.org/the-scripting-games/" title="The Scripting Games"&gt;Scripting Games Home Page&lt;/a&gt; for a complete list of links and information, and make sure you&amp;rsquo;re watching this &lt;a href="https://powershell.org/category/announcements/scripting-games/"&gt;announcement category&lt;/a&gt; for breaking news. Because we are not collecting e-mail addresses, this is the best way for us to communicate with you.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>We&rsquo;ve made some minor fixes and clarifications to the 2013 Scripting Games Competitors&rsquo; Guide and Instructions booklet. I encourage you to<a href="https://powershell.org/the-scripting-games/" title="The Scripting Games">download them and review them</a> once more before we kick off next week.<br>
In addition, we have some additional prizes for our winners in each event - I&rsquo;ve updated the<a href="https://powershell.org/2013/04/17/scripting-games-2013-prize-list/" title="[UPDATED] Scripting Games 2013 Prize List">prize list post</a> to include this new information. That post, going forward, will be the authoritative prize list.<br>
Registration is now open, and the Games will formally kick off on April 22nd. The first event opens April 25th. Please rely on the<a href="https://powershell.org/the-scripting-games/" title="The Scripting Games">Scripting Games Home Page</a> for a complete list of links and information, and make sure you&rsquo;re watching this<a href="https://powershell.org/category/announcements/scripting-games/">announcement category</a> for breaking news. Because we are not collecting e-mail addresses, this is the best way for us to communicate with you.</p>
]]></content:encoded></item><item><title>Pre-Summit Hang</title><link>https://powershell.org/articles/2013-04-17-pre-summit-hang/</link><guid>https://powershell.org/articles/2013-04-17-pre-summit-hang/</guid><pubDate>Thu, 18 Apr 2013 01:15:57 +0000</pubDate><description>&lt;p&gt;If you&amp;rsquo;re attending the Summit and are arriving Sunday afternoon, drop by the Azteca restaurant on 148th. I&amp;rsquo;ll be there with some of the Board from 5pm, in the bar. It&amp;rsquo;s informal, pay-your-own-way, and a chance just to say hi before we kick off on Monday. Safe journey!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>If you&rsquo;re attending the Summit and are arriving Sunday afternoon, drop by the Azteca restaurant on 148th. I&rsquo;ll be there with some of the Board from 5pm, in the bar. It&rsquo;s informal, pay-your-own-way, and a chance just to say hi before we kick off on Monday. Safe journey!</p>
]]></content:encoded></item><item><title>[UPDATED] Scripting Games 2013 Prize List</title><link>https://powershell.org/articles/2013-04-17-scripting-games-2013-prize-list/</link><guid>https://powershell.org/articles/2013-04-17-scripting-games-2013-prize-list/</guid><pubDate>Wed, 17 Apr 2013 13:51:41 +0000</pubDate><description>&lt;p&gt;We&amp;rsquo;ve finalized the prizes!&lt;/p&gt;
&lt;h2 id="overall-winners" class="ps-heading"&gt;Overall Winners&lt;a class="ps-heading-anchor" href="#overall-winners" aria-label="Link to this section" title="Link to this section"&gt;&lt;i class="fas fa-link" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;
&lt;/h2&gt;
&lt;p&gt;These are the folks who do the best overall. This prize will be awarded in mid-June.&lt;br&gt;
The &lt;strong&gt;overall winners&lt;/strong&gt; from both the Advanced and Beginner events will win a free pass (travel expenses not included) to TechEd North America 2014 or TechEd Europe 2013 - your choice. We realize the TechEd Europe dates are pretty close to when this prize will be awarded&amp;hellip; so we&amp;rsquo;ll try and intervene and make it a 2014 pass, if we can.&lt;br&gt;
Second place overall winners will receive a SAPIEN Software Suite 2012, valued at $699, from SAPIEN Technologies.&lt;br&gt;
Third place overall winners will receive 5 ebooks (per person) from Manning.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>We&rsquo;ve finalized the prizes!</p><h2 id="overall-winners" class="ps-heading">Overall Winners<a class="ps-heading-anchor" href="#overall-winners" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>These are the folks who do the best overall. This prize will be awarded in mid-June.<br>
The<strong>overall winners</strong> from both the Advanced and Beginner events will win a free pass (travel expenses not included) to TechEd North America 2014 or TechEd Europe 2013 - your choice. We realize the TechEd Europe dates are pretty close to when this prize will be awarded&hellip; so we&rsquo;ll try and intervene and make it a 2014 pass, if we can.<br>
Second place overall winners will receive a SAPIEN Software Suite 2012, valued at $699, from SAPIEN Technologies.<br>
Third place overall winners will receive 5 ebooks (per person) from Manning.</p><h2 id="event-winners" class="ps-heading">Event Winners<a class="ps-heading-anchor" href="#event-winners" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>These folks place top in each event, with one prize available per track. We&rsquo;ll award a free ebook from Manning. In addition, the top placer in Event 6 (which is the toughest) will win a copy of PrimalScript 2012 from SAPIEN, and the top placer in Event 5 will win a copy of PowerShell Studio 2012 from SAPIEN.<br>
Second-place for each event will win 6 months of free video training library access from<a href="http://videotraining.interfacett.com">Interface Technical Training</a>.<br>
Third-place for each event will win a free year of<a href="http://phoneominal.com">Phoneominal</a> cloud-based phone line service from Start-Automating.com.<br>
For the competitors who earn the top CrowdScore vote in each event, we&rsquo;ll award a free ebook from Manning.</p><h2 id="prizes-for-community-voting" class="ps-heading">Prizes for Community Voting<a class="ps-heading-anchor" href="#prizes-for-community-voting" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Each time you vote on an entry, whether your competing or not, you earn a chance to win a prize. See - you can win without even trying hard! We&rsquo;ll be awarding a total of four $50.00 gift certificates to the SAPIEN Technologies online store, and a total of 20 ebooks from Manning, along with 12 one-month passes to the Interface Technical Training video training library. So that&rsquo;s 36 chances to win! We will award these prizes in batches after voting closes on each event (meaning we&rsquo;ll award about 6 prizes per event - we will<strong>not</strong> be resetting pointlet counts, so any pointlets earned will count toward prizes in each event).<br>
In addition, our top two voters will receive a complimentary pass (no travel included) to the PowerShell Summit North America 2014. That&rsquo;s pretty impressive! We will be looking at the quality, consistency, and fairness of your votes - so if you do bubble up to be a top voter, you&rsquo;ll be scrutinized to make sure you were voting fairly. We&rsquo;ll also be weighting votes that are accompanied by comments (good, useful comments, not gibberish or two-word &ldquo;nice script&rdquo; comments), meaning commenting is more likely to make you a winner!</p>
]]></content:encoded></item><item><title>Changes Coming to PowerShell.org</title><link>https://powershell.org/articles/2013-04-15-changes-coming-to-powershell-org/</link><guid>https://powershell.org/articles/2013-04-15-changes-coming-to-powershell-org/</guid><pubDate>Mon, 15 Apr 2013 20:34:04 +0000</pubDate><description>&lt;p&gt;If you&amp;rsquo;ve been on the site today, you&amp;rsquo;ve doubtless noticed some of the visual changes. In addition to providing a simpler theme that - over time - will be more mobile-friendly, we&amp;rsquo;re also lining up for a major move of our discussion forums. That&amp;rsquo;ll probably happen after TechEd, but we may be able to squeeze it in prior.&lt;/p&gt;
&lt;p&gt;The existing forums are fine, but they&amp;rsquo;re a bit heavy in the code department, and hard to maintain. We&amp;rsquo;ve also gotten a bit bloated with the categories. Sorry about that. Anyway, the plan is to move to an integrated forums, a simpler hierarchy, and better notification options. It&amp;rsquo;ll make it a lot easier for us moderators to help answer questions.&lt;br&gt;
We&amp;rsquo;ll be archiving the old content, so it&amp;rsquo;ll still be accessible and searchable. However&amp;hellip; and here&amp;rsquo;s the rub&amp;hellip; we&amp;rsquo;re gonna ditch your user accounts. We have to. The old database is cloggy with spambots, and we just need to get away from it. We&amp;rsquo;re going to offer integrated login (Twitter, Facebook, LinkedIn, a bunch others), so you won&amp;rsquo;t have to entrust your password to us any longer if you don&amp;rsquo;t want to. We are not linking the old forums to this WordPress site. You&amp;rsquo;ll be creating a NEW login here, and it can use those external authentication systems. The NEW login you create HERE will be completely separate from any login you have in the existing, old forums. You don&amp;rsquo;t need to create a new account now - you can wait until the new forums go live.&lt;br&gt;
Anyway&amp;hellip; that&amp;rsquo;s all ahead. Love to hear your thoughts as we continue planning.&lt;br&gt;
There&amp;rsquo;s another thing: The PowerShell People site. To be honest, that was created as a kind of&amp;hellip; game/toy. Something to see if I could do. We&amp;rsquo;ve gotten a few people using it but not many, and it just kind of sits there on its own. We&amp;rsquo;re probably going to be spinning that down, but we&amp;rsquo;re going to take what we learned from it and try and incorporate something into this main site. No firm ideas, yet, and we&amp;rsquo;d appreciate any you may have.&lt;br&gt;
In the meantime, we&amp;rsquo;ve already implemented a few changes. The new site theme is perhaps the most obvious; you&amp;rsquo;ll notice that we&amp;rsquo;ve also moved a lot of static pages - like the newsletter, Scripting Games, and Summit pages - into the new theme. We&amp;rsquo;ve also enabled single sign-on to the site, using Facebook, Twitter, Google, OpenID, WordPress.com, and Live ID (or whatever Microsoft is calling it this week).&lt;br&gt;
Thanks!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>If you&rsquo;ve been on the site today, you&rsquo;ve doubtless noticed some of the visual changes. In addition to providing a simpler theme that - over time - will be more mobile-friendly, we&rsquo;re also lining up for a major move of our discussion forums. That&rsquo;ll probably happen after TechEd, but we may be able to squeeze it in prior.</p><p>The existing forums are fine, but they&rsquo;re a bit heavy in the code department, and hard to maintain. We&rsquo;ve also gotten a bit bloated with the categories. Sorry about that. Anyway, the plan is to move to an integrated forums, a simpler hierarchy, and better notification options. It&rsquo;ll make it a lot easier for us moderators to help answer questions.<br>
We&rsquo;ll be archiving the old content, so it&rsquo;ll still be accessible and searchable. However&hellip; and here&rsquo;s the rub&hellip; we&rsquo;re gonna ditch your user accounts. We have to. The old database is cloggy with spambots, and we just need to get away from it. We&rsquo;re going to offer integrated login (Twitter, Facebook, LinkedIn, a bunch others), so you won&rsquo;t have to entrust your password to us any longer if you don&rsquo;t want to. We are not linking the old forums to this WordPress site. You&rsquo;ll be creating a NEW login here, and it can use those external authentication systems. The NEW login you create HERE will be completely separate from any login you have in the existing, old forums. You don&rsquo;t need to create a new account now - you can wait until the new forums go live.<br>
Anyway&hellip; that&rsquo;s all ahead. Love to hear your thoughts as we continue planning.<br>
There&rsquo;s another thing: The PowerShell People site. To be honest, that was created as a kind of&hellip; game/toy. Something to see if I could do. We&rsquo;ve gotten a few people using it but not many, and it just kind of sits there on its own. We&rsquo;re probably going to be spinning that down, but we&rsquo;re going to take what we learned from it and try and incorporate something into this main site. No firm ideas, yet, and we&rsquo;d appreciate any you may have.<br>
In the meantime, we&rsquo;ve already implemented a few changes. The new site theme is perhaps the most obvious; you&rsquo;ll notice that we&rsquo;ve also moved a lot of static pages - like the newsletter, Scripting Games, and Summit pages - into the new theme. We&rsquo;ve also enabled single sign-on to the site, using Facebook, Twitter, Google, OpenID, WordPress.com, and Live ID (or whatever Microsoft is calling it this week).<br>
Thanks!</p>
]]></content:encoded></item><item><title>Scripting Games Instructions Now Available</title><link>https://powershell.org/articles/2013-04-13-scripting-games-instructions-now-available/</link><guid>https://powershell.org/articles/2013-04-13-scripting-games-instructions-now-available/</guid><pubDate>Sat, 13 Apr 2013 19:51:09 +0000</pubDate><description>&lt;p&gt;I&amp;rsquo;ve &lt;a href="https://powershell.org/games"&gt;posted an instruction booklet&lt;/a&gt; for the 2013 Scripting Games. Although you can&amp;rsquo;t register until April 22nd, you can get a sneak peek at what the new Games Web site looks like, and start preparing yourself to compete.&lt;br&gt;
&lt;strong&gt;READ THE FRIENDLY MANUAL.&lt;/strong&gt;&lt;br&gt;
There are some one-time decisions you&amp;rsquo;ll have to make, and some &amp;ldquo;if you mess this up, you&amp;rsquo;re screwed&amp;rdquo; moments (like forgetting your password). It&amp;rsquo;s all on you - so familiarize yourself with the potential &amp;ldquo;gotchas&amp;rdquo; right away. You&amp;rsquo;re welcome to leave a comment on this post if you have any questions, or &lt;a href="https://powershell.org/discuss/viewforum.php?f=39&amp;amp;sid=bf378a7ec4e2c6748515b1d3bb87429f"&gt;ask in the forums&lt;/a&gt;.&lt;br&gt;
Note that the forums &lt;strong&gt;may not be used&lt;/strong&gt; to ask for feedback on your entry from judges - they won&amp;rsquo;t be monitoring the forum. It should also not be used for technical support questions about the Web site; the site will have a &amp;ldquo;feedback&amp;rdquo; link on the bottom of every page for that purpose.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I&rsquo;ve<a href="https://powershell.org/games">posted an instruction booklet</a> for the 2013 Scripting Games. Although you can&rsquo;t register until April 22nd, you can get a sneak peek at what the new Games Web site looks like, and start preparing yourself to compete.<br><strong>READ THE FRIENDLY MANUAL.</strong><br>
There are some one-time decisions you&rsquo;ll have to make, and some &ldquo;if you mess this up, you&rsquo;re screwed&rdquo; moments (like forgetting your password). It&rsquo;s all on you - so familiarize yourself with the potential &ldquo;gotchas&rdquo; right away. You&rsquo;re welcome to leave a comment on this post if you have any questions, or<a href="https://powershell.org/discuss/viewforum.php?f=39&amp;sid=bf378a7ec4e2c6748515b1d3bb87429f">ask in the forums</a>.<br>
Note that the forums<strong>may not be used</strong> to ask for feedback on your entry from judges - they won&rsquo;t be monitoring the forum. It should also not be used for technical support questions about the Web site; the site will have a &ldquo;feedback&rdquo; link on the bottom of every page for that purpose.</p>
]]></content:encoded></item><item><title>PowerShell Deep Dives"“another MEAP release</title><link>https://powershell.org/articles/2013-04-13-powershell-deep-dives-another-meap-release-2/</link><guid>https://powershell.org/articles/2013-04-13-powershell-deep-dives-another-meap-release-2/</guid><pubDate>Sat, 13 Apr 2013 17:24:52 +0000</pubDate><description>&lt;p&gt;Manning have released another set of chapters in their early access program for &lt;a href="http://www.manning.com/hicks/"&gt;PowerShell Deep Dives&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you have an interest in PowerShell I would strongly urge you to buy a copy. It has chapters from a number of well known PowerShell authors together with some very good material from new authors. Best of all the royalties are going to charity.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2834/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2834/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2834&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Manning have released another set of chapters in their early access program for<a href="http://www.manning.com/hicks/">PowerShell Deep Dives</a>.</p><p>If you have an interest in PowerShell I would strongly urge you to buy a copy. It has chapters from a number of well known PowerShell authors together with some very good material from new authors. Best of all the royalties are going to charity.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2834/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2834/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2834&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Busy, busy, busy</title><link>https://powershell.org/articles/2013-04-13-busy-busy-busy-2/</link><guid>https://powershell.org/articles/2013-04-13-busy-busy-busy-2/</guid><pubDate>Sat, 13 Apr 2013 17:17:13 +0000</pubDate><description>&lt;p&gt;A very busy time coming up in PowerShell land with the first PowerShell Summit kicking off in just over a week&amp;quot;™s time. The 2013 Scripting Games will also be starting very soon.&lt;/p&gt;
&lt;p&gt;I&amp;quot;™ll try and post about both of them as time allows&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2832/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2832/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2832&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>A very busy time coming up in PowerShell land with the first PowerShell Summit kicking off in just over a week"™s time. The 2013 Scripting Games will also be starting very soon.</p><p>I"™ll try and post about both of them as time allows</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2832/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2832/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2832&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Creating a new disk</title><link>https://powershell.org/articles/2013-04-12-creating-a-new-disk-3/</link><guid>https://powershell.org/articles/2013-04-12-creating-a-new-disk-3/</guid><pubDate>Fri, 12 Apr 2013 18:44:16 +0000</pubDate><description>&lt;p&gt;I really like Windows Server Core. The concept has come of age in Windows 2012.&lt;/p&gt;
&lt;p&gt;I needed to add a new disk to a virtual machine – that&amp;quot;™s easy using the Hyper-V cmdlets. But what about formating the disk.&lt;/p&gt;
&lt;p&gt;A module new to Windows 2012 &amp;amp; Windows can be used. Its the Storage module. I&amp;quot;™ve not had chance, or reason, to play with this module yet. So many cmdlets so little time.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I really like Windows Server Core. The concept has come of age in Windows 2012.</p><p>I needed to add a new disk to a virtual machine – that"™s easy using the Hyper-V cmdlets. But what about formating the disk.</p><p>A module new to Windows 2012 &amp; Windows can be used. Its the Storage module. I"™ve not had chance, or reason, to play with this module yet. So many cmdlets so little time.</p><p>Start with viewing the disks:</p><p>PS C:\Users\richard&gt; Get-Disk | ft -a</p><p>Number Friendly Name OperationalStatus Total Size Partition Style
—— ————- —————– ———- —————
0 Virtual HD ATA Device Online 120 GB MBR
1 Microsoft Virtual Disk Offline 127 GB RAW</p><p>Disk 1 is the new disk so need to initialise it.</p><p>PS C:\Users\richard&gt; Initialize-Disk -Number 1 -PartitionStyle MBR</p><p>View the disks again</p><p>PS C:\Users\richard&gt; Get-Disk | ft -a</p><p>Number Friendly Name OperationalStatus Total Size Partition Style
—— ————- —————– ———- —————
0 Virtual HD ATA Device Online 120 GB MBR
1 Microsoft Virtual Disk Online 127 GB MBR</p><p>Create a partition on the disk - -useMaximimSize means use all of the disk for this partition</p><p>PS C:\Users\richard&gt; New-Partition -DiskNumber 1 -UseMaximumSize -DriveLetter R</p><p>Now view the partitions</p><p>PS C:\Users\richard&gt; Get-Partition | ft -a</p><p>Disk Number: 0</p><p>PartitionNumber DriveLetter Offset Size Type
————— ———– —— —- —-
1 1048576 350 MB IFS
2 C 368050176 119.66 GB IFS</p><p>Disk Number: 1</p><p>PartitionNumber DriveLetter Offset Size Type
————— ———– —— —- —-
1 R 1048576 127 GB Logical</p><p>And finally format the new disk:</p><p>PS C:\Users\richard&gt; Get-Volume | where DriveLetter -eq R | Format-Volume -FileSystem NTFS -NewFileSystemLabel Backup</p><p>Confirm<br>
Are you sure you want to perform this action?<br>
Warning, all data on the volume will be lost!<br>
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is &ldquo;Y&rdquo;): Y</p><p>You get a nice friendly warning (you could bypass using &ldquo;“Confirm $false) and the format happens</p><p>You could pipe the cmdlets together to do everything in one pass. Best of all &ldquo;“ the cmdlets are WMI based.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2830/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2830/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2830&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Windows Server Backup</title><link>https://powershell.org/articles/2013-04-11-windows-server-backup-4/</link><guid>https://powershell.org/articles/2013-04-11-windows-server-backup-4/</guid><pubDate>Thu, 11 Apr 2013 19:50:36 +0000</pubDate><description>&lt;p&gt;Windows Server 2012 has a PowerShell enabled backup utility. When you enable the feature you get a module called WindowsServerBackup. It has the cmldets you would expect for creating and managing backups. No surprise you may say as this was avialable in Windows 2008 R2.&lt;/p&gt;
&lt;p&gt;The difference with Windows Server 2012 is that you can do restores from PowerShell cmdlets whcih wasn&amp;quot;™t available in the earlier version.&lt;/p&gt;
&lt;p&gt;The restore cmdlets are&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Windows Server 2012 has a PowerShell enabled backup utility. When you enable the feature you get a module called WindowsServerBackup. It has the cmldets you would expect for creating and managing backups. No surprise you may say as this was avialable in Windows 2008 R2.</p><p>The difference with Windows Server 2012 is that you can do restores from PowerShell cmdlets whcih wasn"™t available in the earlier version.</p><p>The restore cmdlets are</p><p>Start-WBFileRecovery</p><p>Start-WBHyperVRecovery</p><p>Start-WBSystemStateRecovery</p><p>Start-WBVolumeRecovery</p><p>This might not replace your currebt backup system but is very useful for backing up test environments and experimenting with things like authorative AD restores.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2828/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2828/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2828&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>[UPDATED] Time is running out to own a piece of PowerShell.org</title><link>https://powershell.org/articles/2013-04-11-time-is-running-out-to-own-a-piece-of-powershell-org/</link><guid>https://powershell.org/articles/2013-04-11-time-is-running-out-to-own-a-piece-of-powershell-org/</guid><pubDate>Thu, 11 Apr 2013 08:25:30 +0000</pubDate><description>&lt;p&gt;Believe it or not, we are coming up on our one year anniversary, and will be winding down our capital campaign. If you&amp;rsquo;d like to become a stockholder in PowerShell.org, you will have until June 1st May 15 to do so. Read the details at &lt;a href="https://powershell.org/discuss/viewtopic.php?f=26&amp;amp;t=239"&gt;https://powershell.org/discuss/viewtopic.php?f=26&amp;amp;t=239&lt;/a&gt; if you&amp;rsquo;re interested!&lt;br&gt;
&lt;strong&gt;Updated&lt;/strong&gt; to show May 15 as the cutoff date. Our shareholder meeting notices and ballots will go out on May 16, so we can&amp;rsquo;t accept new stock purchases after that date.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Believe it or not, we are coming up on our one year anniversary, and will be winding down our capital campaign. If you&rsquo;d like to become a stockholder in PowerShell.org, you will have until June 1st May 15 to do so. Read the details at<a href="https://powershell.org/discuss/viewtopic.php?f=26&amp;t=239">https://powershell.org/discuss/viewtopic.php?f=26&amp;t=239</a> if you&rsquo;re interested!<br><strong>Updated</strong> to show May 15 as the cutoff date. Our shareholder meeting notices and ballots will go out on May 16, so we can&rsquo;t accept new stock purchases after that date.</p>
]]></content:encoded></item><item><title>Running workflows</title><link>https://powershell.org/articles/2013-04-08-running-workflows/</link><guid>https://powershell.org/articles/2013-04-08-running-workflows/</guid><pubDate>Mon, 08 Apr 2013 17:12:38 +0000</pubDate><description>&lt;p&gt;I tripped over an interesting issue recently regarding the running of PowerShell workflows.&lt;/p&gt;
&lt;p&gt;Consider the world&amp;quot;™s simplest workflow&lt;/p&gt;
&lt;p&gt;workflow test-w1 {&amp;ldquo;hello world&amp;rdquo;}&lt;/p&gt;
&lt;p&gt;If I run this on a 32bit Windows 8 PowerShell machine &amp;ldquo;“ it works&lt;/p&gt;
&lt;p&gt;If I run this on Windows 2012 (64bit) on PowerShell it works&lt;/p&gt;
&lt;p&gt;if I run this on Windows 2012 PowerShell (x86) &amp;ldquo;“ it doesn&amp;rdquo;™t work!&lt;/p&gt;
&lt;p&gt;Be aware of how you are running your workflows&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I tripped over an interesting issue recently regarding the running of PowerShell workflows.</p><p>Consider the world"™s simplest workflow</p><p>workflow test-w1 {&ldquo;hello world&rdquo;}</p><p>If I run this on a 32bit Windows 8 PowerShell machine &ldquo;“ it works</p><p>If I run this on Windows 2012 (64bit) on PowerShell it works</p><p>if I run this on Windows 2012 PowerShell (x86) &ldquo;“ it doesn&rdquo;™t work!</p><p>Be aware of how you are running your workflows</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2827/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2827/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2827&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>PhillyPoSH 04/04/2013 meeting summary</title><link>https://powershell.org/articles/2013-04-07-phillyposh-04042013-meeting-summary/</link><guid>https://powershell.org/articles/2013-04-07-phillyposh-04042013-meeting-summary/</guid><pubDate>Mon, 08 Apr 2013 02:58:13 +0000</pubDate><description>&lt;ol&gt;
&lt;li&gt;&lt;a href="http://www.jasonhelmick.com/"&gt;Jason Helmick&lt;/a&gt; remotely gave a demo of &lt;a href="http://sapien.com/software/powershell_studio"&gt;Sapien&amp;quot;™s Powershell Studio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.edwilson.com/"&gt;Ed Wilson&lt;/a&gt;, &lt;a href="http://blogs.technet.com/b/heyscriptingguy/"&gt;The Scripting Guy&lt;/a&gt;, gave a presentation on the different ways to remotely manage a Windows 8 workstation (remotely via the &lt;a href="http://powershellgroup.org/charlotte.nc"&gt;Charlotte PowerShell User Group&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Announcements
&lt;ol&gt;
&lt;li&gt;The &lt;a href="https://powershell.org/category/announcements/scripting-games/"&gt;Scripting games start&lt;/a&gt; on &lt;a href="https://powershell.org/2013/04/03/2013-scripting-games-schedule/"&gt;04/25/2013,&lt;/a&gt; make sure to sign up! We plan on doing a post mortem once the games are done just like we did with the &lt;a href="https://powershell.org/2013/03/10/phillyposh-03072013-meeting-summary-and-presentation-materials/"&gt;Winter Scripting Camp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Check out the &lt;a href="http://mspsug.com/"&gt;Mississippi PowerShell User&lt;/a&gt;, which meets virtually every 2nd Tuesday. Take a look at their &lt;a href="http://mspsug.com/2013/02/27/mississippi-powershell-user-group-speaker-lineup-for-2013/"&gt;schedule which is filled with great speakers&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;</description><content:encoded>&lt;![CDATA[<ol><li><a href="http://www.jasonhelmick.com/">Jason Helmick</a> remotely gave a demo of<a href="http://sapien.com/software/powershell_studio">Sapien"™s Powershell Studio</a></li><li><a href="http://www.edwilson.com/">Ed Wilson</a>, <a href="http://blogs.technet.com/b/heyscriptingguy/">The Scripting Guy</a>, gave a presentation on the different ways to remotely manage a Windows 8 workstation (remotely via the <a href="http://powershellgroup.org/charlotte.nc">Charlotte PowerShell User Group</a>)</li><li>Announcements<ol><li>The<a href="https://powershell.org/category/announcements/scripting-games/">Scripting games start</a> on<a href="https://powershell.org/2013/04/03/2013-scripting-games-schedule/">04/25/2013,</a> make sure to sign up! We plan on doing a post mortem once the games are done just like we did with the<a href="https://powershell.org/2013/03/10/phillyposh-03072013-meeting-summary-and-presentation-materials/">Winter Scripting Camp</a></li><li>Check out the<a href="http://mspsug.com/">Mississippi PowerShell User</a>, which meets virtually every 2nd Tuesday. Take a look at their<a href="http://mspsug.com/2013/02/27/mississippi-powershell-user-group-speaker-lineup-for-2013/">schedule which is filled with great speakers</a>.</li></ol></li></ol>
]]></content:encoded></item><item><title>AD Management in a Month of Lunches</title><link>https://powershell.org/articles/2013-04-06-ad-management-in-a-month-of-lunches/</link><guid>https://powershell.org/articles/2013-04-06-ad-management-in-a-month-of-lunches/</guid><pubDate>Sat, 06 Apr 2013 15:40:22 +0000</pubDate><description>&lt;p&gt;The MEAP marches on with chapter 8 now released:&lt;/p&gt;
&lt;p&gt;Chapter 8 &amp;ldquo;“ creating Group Policies&lt;/p&gt;
&lt;p&gt;details from &lt;a href="http://www.manning.com/siddaway3/" title="http://www.manning.com/siddaway3/"&gt;http://www.manning.com/siddaway3/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2826/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2826/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2826&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The MEAP marches on with chapter 8 now released:</p><p>Chapter 8 &ldquo;“ creating Group Policies</p><p>details from<a href="http://www.manning.com/siddaway3/" title="http://www.manning.com/siddaway3/">http://www.manning.com/siddaway3/</a></p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2826/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2826/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2826&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>2013 Scripting Games Judges</title><link>https://powershell.org/articles/2013-04-06-2013-scripting-games-judges/</link><guid>https://powershell.org/articles/2013-04-06-2013-scripting-games-judges/</guid><pubDate>Sat, 06 Apr 2013 12:32:23 +0000</pubDate><description>&lt;p&gt;As described in the 2013 Scripting Games Competitors&amp;rsquo; Guide, our expert judges this year will not be awarded numeric scores. Frankly, folks seem more interested in having their entries peer-reviewed than just getting a number - and why not? Expert review is a great way to learn! Unfortunately, there aren&amp;rsquo;t enough judges in the world to review all the entries we&amp;rsquo;ll receive, so our judges will be picking their own &amp;ldquo;best and worst&amp;rdquo; lists, and commenting on those (taking care to not reveal authors&amp;rsquo; names, as much as possible).&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As described in the 2013 Scripting Games Competitors&rsquo; Guide, our expert judges this year will not be awarded numeric scores. Frankly, folks seem more interested in having their entries peer-reviewed than just getting a number - and why not? Expert review is a great way to learn! Unfortunately, there aren&rsquo;t enough judges in the world to review all the entries we&rsquo;ll receive, so our judges will be picking their own &ldquo;best and worst&rdquo; lists, and commenting on those (taking care to not reveal authors&rsquo; names, as much as possible).</p><p>Our judges will be blogging either here on PowerShell.org, or on their own blogs; we&rsquo;ve asked them to all at least post links here at PowerShell.org so that you can find their write-ups. You can use the<a href="https://powershell.org/category/announcements/scripting-games/judges-notes/">Judges&rsquo; Notes blog category</a> to find their posts - and hopefully learn something!<br>
This year&rsquo;s judges (in no special order, other than this is how they&rsquo;re in my address book for some reason):</p><ul><li>Jan Egil Ring</li><li>Jonathan Medd</li><li>Bartek Bielawski</li><li>Sean Kearney</li><li>Richard Siddaway</li><li>Mark Schill</li><li>Art Beane</li><li>Jason Helmick</li><li>Ed Wilson</li><li>Oliver Lipkau</li><li>Glenn Sizemore</li><li>Tobias Weltner</li><li>Boe Pox</li><li>Bhargav Shukla</li></ul><p>Thanks so much to these folks - they&rsquo;re going to be donating a LOT of time to review entries, pick out ones they love, point out ones that could use improvement, and above all tell us<em>why</em> so that we can all learn to do better.<br>
The idea is to have a diversity of opinions. Multiple judges may latch on to the same entries and offer differing advice - and that&rsquo;s<em>awesome</em>, because it helps us all develop new approaches, and understand that in PowerShell there are very few &ldquo;one, right ways&rdquo; to do anything.<br>
The Games begin April 22nd!</p>
]]></content:encoded></item><item><title>2013 Scripting Games' Mighty Panel of Celebrity Judges</title><link>https://powershell.org/articles/2013-04-06-2013-scripting-games-mighty-panel-of-celebrity-judges/</link><guid>https://powershell.org/articles/2013-04-06-2013-scripting-games-mighty-panel-of-celebrity-judges/</guid><pubDate>Sat, 06 Apr 2013 12:21:38 +0000</pubDate><description>&lt;p&gt;As revealed in the &lt;a href="https://powershell.org/games/"&gt;2013 Scripting Games Competitors&amp;rsquo; Guide&lt;/a&gt;, the 2013 Games will invite the community in general to award numeric votes for entries. Our expert judges will instead focus on commentary, helping make the Games into an even better learning experience. They&amp;rsquo;ll be commenting without revealing competitors&amp;rsquo; names, and even if you don&amp;rsquo;t recognize your entry in their comments, you&amp;rsquo;ll hopefully find plenty to learn from.&lt;/p&gt;
&lt;p&gt;Our top prizes, however, will be awarded by a Mighty Panel of Celebrity Judges. They&amp;rsquo;ll review all the other judges&amp;rsquo; top picks, stack-rank them, and through some Ingenious Number Crunchingâ„¢ award the top prizes.&lt;br&gt;
Bet you&amp;rsquo;d like to meet the judges.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>As revealed in the<a href="/games/">2013 Scripting Games Competitors&rsquo; Guide</a>, the 2013 Games will invite the community in general to award numeric votes for entries. Our expert judges will instead focus on commentary, helping make the Games into an even better learning experience. They&rsquo;ll be commenting without revealing competitors&rsquo; names, and even if you don&rsquo;t recognize your entry in their comments, you&rsquo;ll hopefully find plenty to learn from.</p><p>Our top prizes, however, will be awarded by a Mighty Panel of Celebrity Judges. They&rsquo;ll review all the other judges&rsquo; top picks, stack-rank them, and through some Ingenious Number Crunchingâ„¢ award the top prizes.<br>
Bet you&rsquo;d like to meet the judges.</p><ul><li><strong>Don Jones</strong> (that&rsquo;s me) is a Windows PowerShell MVP Award recipient, author of bazillions of books, and one of the most well-known PowerShell educators out there.</li><li><strong>Jeffery Hicks</strong> is also a PowerShell MVP, has also written gobs of books, and does more than a little PowerShell education here and there.</li><li><strong>June Blender</strong> is a former PowerShell team member (who wrote the Get-Help help), still a big PowerShell enthusiast, and has spent a ton of time figuring out how people learn to use the shell.</li><li><strong>Ed Wilson</strong> is the Scripting Guy, and needs absolutely no more introduction than that. He&rsquo;s single-handedly kept scripting alive, and helps us all learn every day with the &ldquo;Hey, Scripting Guy!&rdquo; blog.</li><li><strong>Jon White</strong> - As a member of the PowerShell feature team since its inception, Jon  was the first person in the world to write a production PowerShell script.</li><li><strong>David Simmons</strong> is a proud new member of the PowerShell team, but follower within Microsoft since its early days, and has been involved since the 1980"™s outside of and within Microsoft in development of hi-performance dynamic languages and their runtime engines including various JavaScript engines.</li></ul><p>Finally, this year we&rsquo;re proud to bring a member of the community on board as a judge. Selected from the top posters in the PowerShell.org forums, I bring you&hellip;</p><p><strong>Jakub JareÅ¡</strong> (nohandle in the forums), who lives in Prague, Czech Republic.</p><p>Meet him in his own words:</p><p>Since 2008 he works for Trask solutions a.s. as a system engineer focused on Microsoft desktop operating systems. He enjoys competition and solving problems that everyone else gave up on. Jakub is pretty new to the PowerShell language and the community, he is scripting roughly a year, but during that time he spent all of his free time and energy learning to unleash the power in PowerShell. He is a member of the PowerShell.org, Powershell.com forums, guest writer on PowershellMagazine.com and blogs on PowerShell.cz.</p><p>Welcome, Jakub! This just goes to show that the PowerShell community truly is a diverse one that&rsquo;s constantly growing. I hope<em>everyone</em> will be excited about grading the entries we&rsquo;ll get for each event, and showing your support for your fellow competitors.<br>
The Games commence on April 22nd, 2013!</p>
]]></content:encoded></item><item><title>Coming: Tips for the Scripting Games</title><link>https://powershell.org/articles/2013-04-05-coming-tips-for-the-scripting-games/</link><guid>https://powershell.org/articles/2013-04-05-coming-tips-for-the-scripting-games/</guid><pubDate>Sat, 06 Apr 2013 06:36:05 +0000</pubDate><description>&lt;p&gt;In preparation for the upcoming Scripting Games, the April 2013 issue of the free PowerShell.org TechLetter will feature tips, examples, and advice for helping you do the best in the Games! Remember that the Competitor Guide is now available, so you can start reviewing how the Games will be graded (by the community) and judged this year.&lt;br&gt;
If you&amp;rsquo;re not already receiving the TechLetter, subscribe by April 15th to receive the April issue in your Inbox!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>In preparation for the upcoming Scripting Games, the April 2013 issue of the free PowerShell.org TechLetter will feature tips, examples, and advice for helping you do the best in the Games! Remember that the Competitor Guide is now available, so you can start reviewing how the Games will be graded (by the community) and judged this year.<br>
If you&rsquo;re not already receiving the TechLetter, subscribe by April 15th to receive the April issue in your Inbox!</p>
]]></content:encoded></item><item><title>PowerShell Script that Relaunches as Admin</title><link>https://powershell.org/articles/2013-04-05-powershell-script-that-relaunches-as-admin/</link><guid>https://powershell.org/articles/2013-04-05-powershell-script-that-relaunches-as-admin/</guid><pubDate>Fri, 05 Apr 2013 15:08:17 +0000</pubDate><description>&lt;p&gt;If were following good security practices we run our Windows system with UAC enabled. This means that if you forget to launch your PowerShell prompt as Administrator when you run a script that requires administrative privilege then that script will fail.&lt;/p&gt;
&lt;p&gt;It would be nice to build a mechanism into our script to &amp;ldquo;auto-elevate&amp;rdquo; if UAC is enabled. The trick to doing this is to run Start-Process &amp;ldquo;“verb runas. After that you only need to figure out if the current user is an administrator and if UAC is enabled. And you have to package up the script&amp;rdquo;™s parameters as an array of strings. All of this can be accomplished fairly easily with this bit of PowerShell script:&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>If were following good security practices we run our Windows system with UAC enabled. This means that if you forget to launch your PowerShell prompt as Administrator when you run a script that requires administrative privilege then that script will fail.</p><p>It would be nice to build a mechanism into our script to &ldquo;auto-elevate&rdquo; if UAC is enabled. The trick to doing this is to run Start-Process &ldquo;“verb runas. After that you only need to figure out if the current user is an administrator and if UAC is enabled. And you have to package up the script&rdquo;™s parameters as an array of strings. All of this can be accomplished fairly easily with this bit of PowerShell script:</p><p>`function
IsAdministrator
{
$Identity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$Principal = New-Object System.Security.Principal.WindowsPrincipal($Identity)
$Principal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
}</p><p>function
IsUacEnabled
{
(Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System).EnableLua
-ne
0
}</p><h1 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><h1 id="main-script" class="ps-heading">Main script<a class="ps-heading-anchor" href="#main-script" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><h1 id="" class="ps-heading"><a class="ps-heading-anchor" href="#" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>if
(!(IsAdministrator))
{</p><p>if
(IsUacEnabled)
{
[string[]]$argList = @(
&lsquo;-NoProfile&rsquo;
,
&lsquo;-NoExit&rsquo;
,
&lsquo;-File&rsquo;
, $MyInvocation.MyCommand.Path)
$argList += $MyInvocation.BoundParameters.GetEnumerator() | Foreach {
&ldquo;-$($<em>.Key)&rdquo;
,
&ldquo;$($</em>.Value)&rdquo;
}
$argList += $MyInvocation.UnboundArguments
Start-Process PowerShell.exe -Verb Runas -WorkingDirectory $pwd -ArgumentList $argList</p><p>return</p><pre><code>}</code></pre><p>else</p><pre><code>{</code></pre><p>throw</p><p>&ldquo;You must be administrator to run this script&rdquo;</p><pre><code>}</code></pre><p>}</p><p>`If you launch this script from a non-elevated context, it will fire up a new PoweShell session that is elevated assuming UAC is enabled.</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/rkeithhill.wordpress.com/276/"><img src="http://feeds.wordpress.com/1.0/comments/rkeithhill.wordpress.com/276/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=rkeithhill.wordpress.com&amp;blog=18780344&amp;%23038;post=276&amp;%23038;subd=rkeithhill&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Manning Deal of the Day "“ April 6 2013</title><link>https://powershell.org/articles/2013-04-04-manning-deal-of-the-day-april-6-2013-2/</link><guid>https://powershell.org/articles/2013-04-04-manning-deal-of-the-day-april-6-2013-2/</guid><pubDate>Thu, 04 Apr 2013 20:42:32 +0000</pubDate><description>&lt;p&gt;My PowerShell and WMI book will be Manning&amp;quot;™s deal of the day for 6 April 2013. The deal will go live at Midnight US ET and will stay active for about 48 hours.&lt;/p&gt;
&lt;p&gt;This is your chance to get the book with a 50% discount.&lt;/p&gt;
&lt;p&gt;Use code dotd0406au at &lt;a href="http://manning.com/siddaway2/"&gt;manning.com/siddaway2/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Deal of the Day offer also applies to &lt;em&gt;SharePoint Workflow in Action&lt;/em&gt; ****(&lt;a href="http://www.manning.com/wicklund/"&gt;http://www.manning.com/wicklund/&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Enjoy&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2825/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2825/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2825&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>My PowerShell and WMI book will be Manning"™s deal of the day for 6 April 2013. The deal will go live at Midnight US ET and will stay active for about 48 hours.</p><p>This is your chance to get the book with a 50% discount.</p><p>Use code dotd0406au at<a href="http://manning.com/siddaway2/">manning.com/siddaway2/</a></p><p>The Deal of the Day offer also applies to<em>SharePoint Workflow in Action</em> ****(<a href="http://www.manning.com/wicklund/">http://www.manning.com/wicklund/</a>).</p><p>Enjoy</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2825/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2825/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2825&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>2013 Scripting Games Schedule</title><link>https://powershell.org/articles/2013-04-03-2013-scripting-games-schedule/</link><guid>https://powershell.org/articles/2013-04-03-2013-scripting-games-schedule/</guid><pubDate>Thu, 04 Apr 2013 06:26:31 +0000</pubDate><description>&lt;p&gt;Registration for the 2013 Scripting Games will begin April 22nd (check this post in case we need to make a change to that). You will register for &lt;strong&gt;either&lt;/strong&gt; the Beginner or Advanced track.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://powershell.org/games/BeginnerPractice.pdf"&gt;Get the Beginner Track Practice Event&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://powershell.org/games/AdvancedPractice.pdf"&gt;Get the Advanced Track Practice Event&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each event will kick off on a Thursday, which is when you will be able to download the event details in a PDF file. You will have until the end of the following Monday to upload your one and only entry. Please pay attention to the time zone information displayed on the Web site so that you don&amp;rsquo;t misunderstand when the event starts and stops!&lt;br&gt;
The dates in this schedule refer to 00:00 hours, GMT, on the date given. So &amp;ldquo;April 25&amp;rdquo; means &amp;ldquo;00:00 hours on April 25, GMT,&amp;rdquo; or just as the clock ticks from April 24 to April 25 GMT. This is especially important for the end time - &amp;ldquo;April 30&amp;rdquo; means &amp;ldquo;as soon as it stops being April 29, GMT.&amp;rdquo;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Registration for the 2013 Scripting Games will begin April 22nd (check this post in case we need to make a change to that). You will register for<strong>either</strong> the Beginner or Advanced track.</p><ul><li><a href="https://powershell.org/games/BeginnerPractice.pdf">Get the Beginner Track Practice Event</a></li><li><a href="https://powershell.org/games/AdvancedPractice.pdf">Get the Advanced Track Practice Event</a></li></ul><p>Each event will kick off on a Thursday, which is when you will be able to download the event details in a PDF file. You will have until the end of the following Monday to upload your one and only entry. Please pay attention to the time zone information displayed on the Web site so that you don&rsquo;t misunderstand when the event starts and stops!<br>
The dates in this schedule refer to 00:00 hours, GMT, on the date given. So &ldquo;April 25&rdquo; means &ldquo;00:00 hours on April 25, GMT,&rdquo; or just as the clock ticks from April 24 to April 25 GMT. This is especially important for the end time - &ldquo;April 30&rdquo; means &ldquo;as soon as it stops being April 29, GMT.&rdquo;</p><ul><li>Event 1 starts April 25, ends April 30. Voting runs April 30 to May 7.</li><li>Event 2 starts May 2, ends May 7. Voting runs May 7 to May 14.</li><li>Event 3 starts May 9, ends May 14. Voting runs May 14 to May 21.</li><li>Event 4 starts May 16, ends May 21. Voting runs May 21 to May 28.</li><li>Event 5 starts May 23, ends May 28. Voting runs May 28 to June 4.</li><li>Event 6 starts May 30, ends June 4. Voting runs June 4 to June 11.</li></ul><p>For each event, you get to upload one and only one entry - and once uploaded, you may not change, revise, correct, or alter your entry.<br><strong>In each case,</strong> our commenting judges will be asked to post comments
during the voting period
following each event. Our celebrity judges will announce the top winners for each event about one week after the voting period ends.<a href="https://powershell.org/category/announcements/scripting-games/">We will post those announcements right here</a>.<br>
Tuesday morning after the event closes, the event opens for public viewing, which is when people can vote on your entry and our judges can comment. Voting runs for one week following event close (Tuesday to Tuesday).<br><strong>Remember: Even if you&rsquo;re not competing, you can vote on other people&rsquo;s entries. Voting is one of the best ways to win prizes in the Games this year, as each vote counts as a &ldquo;raffle ticket&rdquo; to one of our many prizes.</strong><br>
Registration and all other URLs will be prominently posted on the<a href="https://powershell.org/games">2013 Scripting Games Home Page</a>.</p>
]]></content:encoded></item><item><title>Putting the date in a file name</title><link>https://powershell.org/articles/2013-04-03-putting-the-date-in-a-file-name/</link><guid>https://powershell.org/articles/2013-04-03-putting-the-date-in-a-file-name/</guid><pubDate>Wed, 03 Apr 2013 19:18:43 +0000</pubDate><description>&lt;p&gt;I often need to create file names that include the date &amp;amp; time the file was created in the name. I&amp;quot;™ve come up with all sorts of ways to do but this I think is the simplest.&lt;/p&gt;
&lt;p&gt;I want the date in this format: year-month-day-hour-minute-second. In other words a format that is easily sortable. I discovered that if you convert a data to a string there is a formatter that does most of the work for you. That&amp;quot;™s a lower case s.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I often need to create file names that include the date &amp; time the file was created in the name. I"™ve come up with all sorts of ways to do but this I think is the simplest.</p><p>I want the date in this format: year-month-day-hour-minute-second. In other words a format that is easily sortable. I discovered that if you convert a data to a string there is a formatter that does most of the work for you. That"™s a lower case s.</p><p>PS&gt; (Get-Date).ToString(&ldquo;s&rdquo;)<br>
2013-04-03T20:09:31</p><p>You can"™t have a : symbol in a file name so need to get rid of those</p><p>PS&gt; (Get-Date).ToString(&ldquo;s&rdquo;).Replace(":","-")<br>
2013-04-03T20-10-02</p><p>To complete the file name</p><p>PS&gt; $datestring = (Get-Date).ToString(&ldquo;s&rdquo;).Replace(":","-")<br>
PS&gt; $file = &ldquo;c:\folder\Prefix_$datestring.txt&rdquo;<br>
PS&gt; $file<br>
c:\folder\Prefix_2013-04-03T20-16-48.txt<br>
PS&gt;</p><p>I"™ve done this as a two step process otherwise when you replace the : you also take out the one for the disk drive &ldquo;“ oops</p><p>Enjoy</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2824/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2824/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2824&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>PowerShell excerpt week</title><link>https://powershell.org/articles/2013-04-03-powershell-excerpt-week-2/</link><guid>https://powershell.org/articles/2013-04-03-powershell-excerpt-week-2/</guid><pubDate>Wed, 03 Apr 2013 19:00:52 +0000</pubDate><description>&lt;p&gt;The Scripting Guy is running a series of excerpts from the PowerShell books published by Manning. Today is PowerShell in Practice &lt;a href="http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/03/excel-spreadsheets.aspx"&gt;http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/03/excel-spreadsheets.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Check out the deals all this week on Manning PowerShell books&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2823/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2823/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2823&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The Scripting Guy is running a series of excerpts from the PowerShell books published by Manning. Today is PowerShell in Practice<a href="http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/03/excel-spreadsheets.aspx">http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/03/excel-spreadsheets.aspx</a></p><p>Check out the deals all this week on Manning PowerShell books</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2823/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2823/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2823&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>2013 Scripting Games Competitor Guide (for the Public, too!)</title><link>https://powershell.org/articles/2013-04-02-2013-scripting-games-competitor-guide-for-the-public-too/</link><guid>https://powershell.org/articles/2013-04-02-2013-scripting-games-competitor-guide-for-the-public-too/</guid><pubDate>Tue, 02 Apr 2013 14:58:41 +0000</pubDate><description>&lt;p&gt;Our Competitor Guide is now online - you can download it here:&lt;br&gt;
&lt;a href="https://powershell.org/wp-content/uploads/2013/04/2013CompetitorGuide.pdf"&gt;2013 Competitor Guide&lt;/a&gt;&lt;br&gt;
We&amp;rsquo;re doing things a bit differently this year. We&amp;rsquo;ll be engaging the overall PowerShell community for numeric grades - and those &lt;em&gt;doing&lt;/em&gt; the grading have an awesome chance to win some great prizes! Our expert Judges will be focused on commentary, making this even more of a learning event. Download the Guide and see what&amp;rsquo;s in store - the Games are scheduled to start the week of April 22nd.&lt;br&gt;
As a note, you should get used to checking our Scripting Games Announcements thread (&lt;a href="https://powershell.org/category/announcements/scripting-games/"&gt;https://powershell.org/category/announcements/scripting-games/&lt;/a&gt;) so that you don&amp;rsquo;t miss any goodies.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Our Competitor Guide is now online - you can download it here:<br><a href="https://powershell.org/wp-content/uploads/2013/04/2013CompetitorGuide.pdf">2013 Competitor Guide</a><br>
We&rsquo;re doing things a bit differently this year. We&rsquo;ll be engaging the overall PowerShell community for numeric grades - and those<em>doing</em> the grading have an awesome chance to win some great prizes! Our expert Judges will be focused on commentary, making this even more of a learning event. Download the Guide and see what&rsquo;s in store - the Games are scheduled to start the week of April 22nd.<br>
As a note, you should get used to checking our Scripting Games Announcements thread (<a href="https://powershell.org/category/announcements/scripting-games/">https://powershell.org/category/announcements/scripting-games/</a>) so that you don&rsquo;t miss any goodies.</p>
]]></content:encoded></item><item><title>MVP renewal 2013</title><link>https://powershell.org/articles/2013-04-01-mvp-renewal-2013/</link><guid>https://powershell.org/articles/2013-04-01-mvp-renewal-2013/</guid><pubDate>Mon, 01 Apr 2013 16:46:55 +0000</pubDate><description>&lt;p&gt;This afternoon I received the email notifying me that my MVP award had been renewed for another year.&lt;/p&gt;
&lt;p&gt;Thank you to Microsoft &amp;ldquo;“ I regard the award as a great honour.&lt;/p&gt;
&lt;p&gt;And thank you to the PowerShell community &amp;ldquo;“ its a great place to be&lt;/p&gt;
&lt;p&gt;&lt;a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2822/"&gt;&lt;img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2822/" alt=""&gt;&lt;/a&gt;&lt;img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;amp;blog=16267735&amp;amp;%23038;post=2822&amp;amp;%23038;subd=richardspowershellblog&amp;amp;%23038;ref=&amp;amp;%23038;feed=1" alt=""&gt;&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>This afternoon I received the email notifying me that my MVP award had been renewed for another year.</p><p>Thank you to Microsoft &ldquo;“ I regard the award as a great honour.</p><p>And thank you to the PowerShell community &ldquo;“ its a great place to be</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2822/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2822/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2822&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item><item><title>Shutting down a remote computer</title><link>https://powershell.org/articles/2013-04-01-shutting-down-a-remote-computer/</link><guid>https://powershell.org/articles/2013-04-01-shutting-down-a-remote-computer/</guid><pubDate>Mon, 01 Apr 2013 11:15:52 +0000</pubDate><description>&lt;p&gt;PowerShell provides the Stop-Computer cmdlet for closing down a remote machine. I find this especially useful in my virtual test environment. I&amp;quot;™ll have several machines running but won&amp;quot;™t necessarily have logged onto them. Using Stop-Computer means that I can shut them down cleanly without the hassle of logging onto them.&lt;/p&gt;
&lt;p&gt;In modern Windows systems you have to explicitly enable remote WMI access through the Windows firewall. Stop-Computer uses WMI. If the WMI firewall ports aren&amp;quot;™t enabled you can&amp;quot;™t use Stop-Computer. I&amp;quot;™ve taken to use the CIM cmdlets rather than WMI so sometimes don&amp;quot;™t open the WMI firewall ports.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>PowerShell provides the Stop-Computer cmdlet for closing down a remote machine. I find this especially useful in my virtual test environment. I"™ll have several machines running but won"™t necessarily have logged onto them. Using Stop-Computer means that I can shut them down cleanly without the hassle of logging onto them.</p><p>In modern Windows systems you have to explicitly enable remote WMI access through the Windows firewall. Stop-Computer uses WMI. If the WMI firewall ports aren"™t enabled you can"™t use Stop-Computer. I"™ve taken to use the CIM cmdlets rather than WMI so sometimes don"™t open the WMI firewall ports.</p><p>One quick function later and I have an answer</p><p>`function</p><p>invoke-cimshutdown</p><p>{</p><p>[</p><p>CmdletBinding</p><p>(</p><p>)</p><p>]</p><p>param</p><p>(</p><p>[string]</p><p>$computername</p><p>)</p><p>$comp</p><p>=</p><p>Get-CimInstance</p><p>win32_operatingsystem</p><p>-ComputerName</p><p>$computername</p><p>Invoke-CimMethod</p><p>-InputObject</p><p>$comp</p><p>-MethodName</p><p>Shutdown</p><p>}</p><p>`Pass the computer name as a parameter &ldquo;“ I deliberately didn&rdquo;™t put a default</p><p>Use Get-CimInstance to get the Win32_operatingsystem class and use Invoke-CimMethod to call the Shutdown method.</p><p>Another reason not to enable WMI on my server 2012 firewalls.</p><p>You can use this on legacy versions of Windows if you have PowerShell v3, and therefore WSMAN v3, installed</p><p><a href="http://feeds.wordpress.com/1.0/gocomments/richardspowershellblog.wordpress.com/2821/"><img src="http://feeds.wordpress.com/1.0/comments/richardspowershellblog.wordpress.com/2821/" alt=""/><img src="http://stats.wordpress.com/b.gif?host=richardspowershellblog.wordpress.com&amp;blog=16267735&amp;%23038;post=2821&amp;%23038;subd=richardspowershellblog&amp;%23038;ref=&amp;%23038;feed=1" alt=""/>
]]></content:encoded></item></channel></rss>