&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 July 2015 on PowerShell.org - Welcome Automaters!</title><link>https://powershell.org/articles/2015/07/</link><description>Recent content in Articles from July 2015 on PowerShell.org - Welcome Automaters!</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://powershell.org/articles/2015/07/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction to Powershell</title><link>https://powershell.org/articles/2015-07-31-introduction-to-powershell/</link><guid>https://powershell.org/articles/2015-07-31-introduction-to-powershell/</guid><pubDate>Fri, 31 Jul 2015 11:07:47 +0000</pubDate><description>&lt;p&gt;Hi Guys,&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to have a PowerShell ramble on a semi regular basis. What prompts me to write here on powershell.org is that I love powershell. I makes my job so much better. I&amp;rsquo;m an IT Pro and work for a large ish world spanning company. I mostly work with windows servers but get to work with other technology too. Like VMware and Citrix for example. The other thing I want to point out is that I&amp;rsquo;m not a programer. I don&amp;rsquo;t know VB Script and no one taught me
PowerShell
. There are many people though that helped me on my PowerShell Journey through their books, blogs, postings, and videos. &lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Hi Guys,</p><p>I&rsquo;m going to have a PowerShell ramble on a semi regular basis. What prompts me to write here on powershell.org is that I love powershell. I makes my job so much better. I&rsquo;m an IT Pro and work for a large ish world spanning company. I mostly work with windows servers but get to work with other technology too. Like VMware and Citrix for example. The other thing I want to point out is that I&rsquo;m not a programer. I don&rsquo;t know VB Script and no one taught me
PowerShell
. There are many people though that helped me on my PowerShell Journey through their books, blogs, postings, and videos. </p><p>I want to spread the word of PowerShell. I want people to understand that it helps in so many ways. I&rsquo;ve learned about wmi, .net classes and all the properties of an AD object. This helps me understand the computers I work with every day. With a GUI these things are under the hood and no one needs to know too much about them. With 
PowerShell you naturally learn about these things as you come across them. Didn&rsquo;t know that you can install VMware tools without having to restart? Well if you use PowerShell there&rsquo;s a switch that stands out that makes it obvious.  It makes life easier.</p><p>One thing I really love about 
PowerShell is that it is very consistent (well mostly). So once you learn the basics anything else you want to do is kind of the same. I don&rsquo;t need complication. I have so many technologies to learn ( the System Center Suite comes to mind) that I really don&rsquo;t want to waste my time learning where in the GUI Microsoft have hidden what I&rsquo;m looking for this time. You see, I have always thought computers existed for a reason. To automate things. To do the work for us. To make life easier. We have i7 processors. They are so powerful.. just amazing. So why as an admin would you want to be clicking on menus and buttons. Hit the PowerShell go button and let the computer do all the work. It&rsquo;s liberating!</p><p>Now I know what some people think. It&rsquo;s too hard. And it is hard. There are people that are so good at powershell that it just blows me away. But what I want to stress is that you don&rsquo;t have to be that good. You can be, but you don&rsquo;t have to be. So take it one step at a time and then it&rsquo;s not so hard. But it&rsquo;s like a snow ball rolling down hill. If you use it your knowledge will grow exponentially. So I want to stress 3 things this week.</p><ol><li><p>  You<em>can</em> learn 
PowerShell.</p></li><li><p>  
PowerShell has a shell&hellip;.. Don&rsquo;t know what a shell is? It&rsquo;s a window into the operating system that lets you communicate with it.  So open PowerShell and start communicating. Always have the shell open. If you want to open the temp folder on C drive. Type invoke-item c:\temp and press enter. Now you think of something to do! One step at a time. If you&rsquo;re not in a hurry try and find out how to do it in powershell. Remember you are just starting out so don&rsquo;t be hard on yourself.</p></li><li><p>  Of course 
PowerShell is a scripting language as well. So think of something to automate. Maybe there is a process you have to restart everyday. That old server with the legacy app. Automate it! It will be a great first script. And don&rsquo;t forget that you can use scheduled tasks to help with the automation. And it&rsquo;s not that hard to send an email letting you know it&rsquo;s been done with the send-mail cmdlet. Enjoy. Don&rsquo;t start with something critical.</p></li></ol><p>I haven&rsquo;t told you specifically how to do things on purpose. There are heaps of books, technet articles and other plog posts. Google is your best friend. (sorry Bing). So today I got an alert from Operations Manager telling me a C drive on a server was running out of space. It wasn&rsquo;t the usual suspects like a large profile or log files etc. I didn&rsquo;t want to look through every folder and I can&rsquo;t use programs like treesize for policy reasons. So I wrote a quick script that looped through all the folders, measured the length of the files, added them together and let me know where the space had gone. I used Google. And I confess I do not understand 100% how the cmdlet for measuring stuff works. You&rsquo;re probably smarter than me so don&rsquo;t worry.  I can worry about that later. I worked out how to use it to do what I wanted. That was enough for today. I got the job done and the Server fixed. I don&rsquo;t know how I would have found the solution without 
PowerShell. In case you are curious the little script looked like this. Open the Powershell ISE. Make sure under view you change it so you can see the scripting pane. Poke around&hellip;. explore, you&rsquo;ll find it. </p><h1 id="so-this-bit-gets-the-names-of-all-the-directories-and-stores-them-in-a-variable-called-folders-i-know-its-so-cool" class="ps-heading">so this bit gets the names of all the directories and stores them in a Variable called $folders. I know! It&rsquo;s so cool!<a class="ps-heading-anchor" href="#so-this-bit-gets-the-names-of-all-the-directories-and-stores-them-in-a-variable-called-folders-i-know-its-so-cool" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>$folders = Get-ChildItem \Yourservername\C$\windows -force | where {$_.mode -like &ldquo;*d*&rdquo;}</p><p>#And this bit goes through each one and counts the file lengths adding them together. It prints out the name of the folder followed by how big it is. Powershell is like magic, what can I say.</p><p>foreach ($folder in $folders)</p><p>{</p><p>$folder.name</p><p>$colItems = (Get-ChildItem &ldquo;\
Yourservername
\C$\windows$($folder.name)&rdquo; -Recurse -force | Measure-Object -Property length -Maximum -Minimum -Average -Sum)</p><p>&ldquo;{0:N2}&rdquo; -f ($colItems.sum / 1MB) + " MB"</p><p>}</p><p>Now there are many different ways to write the same script. For me the important thing is that I understand it. In more permanent or bigger scripts in production make sure you explain each part of the script in detail. # lets you write in the script without powershell reading it when it&rsquo;s running the script. Keep this script. Start a collection of all your scripts. You can safely keep them all in a folder in text files. And always test scripts first!!!. Do not just run them. As a rule of thumb though if the cmdlet is get-&hellip;.. then you are safe enough. The get- cmdlets just read information and then display it for you. For example get-ADuser -filter * will just give you a list of all your users in Active Directory. If you use remove-ADuser -filter * the results will be far more tragic&hellip; (Please don&rsquo;t try it!)</p><p>Thanks for reading. Comment if you feel you want to. The blogs is titled introduction to
PowerShell. Should be called introduction to blogging&hellip;. 
It&rsquo;s my first ever blog so sorry if it&rsquo;s a bit rough. I&rsquo;ll write some more PowerShell insights next week. I sincerely hope you start your 
PowerShell journey or continue with it. The rewards are definitely worth it. </p><p>Steve</p>
]]></content:encoded></item><item><title>[UPDATED] Even Vaguely Considering PowerShell Cruise? READ THIS RIGHT NOW.</title><link>https://powershell.org/articles/2015-07-29-even-vaguely-considering-powershell-cruise-read-this-right-now/</link><guid>https://powershell.org/articles/2015-07-29-even-vaguely-considering-powershell-cruise-read-this-right-now/</guid><pubDate>Wed, 29 Jul 2015 19:02:14 +0000</pubDate><description>&lt;p&gt;It&amp;rsquo;s no secret that I&amp;rsquo;m a big fan of next year&amp;rsquo;s &lt;a href="http://poshcruise.org"&gt;PowerShell Cruise&lt;/a&gt; and am excited for the folks who are organizing it. Tonight&amp;rsquo;s &lt;a href="https://t.co/StJPSxbexE"&gt;webinar&lt;/a&gt; (which they&amp;rsquo;ll post to their YouTube channel) will be a chance for you to learn more.&lt;/p&gt;
&lt;p&gt;But.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve never cruised before, you may not be aware of how the majority of the cruise industry works:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your cruise price includes your room, and is based on two people staying in the room together.&lt;/li&gt;
&lt;li&gt;Your cruise price includes most food on the ship - certain specialty restaurants may charge a la carte like a normal restaurant, or may have a small ($25-ish) per-person charge to dine there. If they have the per-person charge, everything on the menu is  then included at no extra charge.&lt;/li&gt;
&lt;li&gt;Your drinks cost extra - everything but water, tea, and plain coffee in most cases. Even soda is an extra price.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;rsquo;s why I want you to think &lt;strong&gt;really really hard&lt;/strong&gt; about what I&amp;rsquo;m going to write next.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>It&rsquo;s no secret that I&rsquo;m a big fan of next year&rsquo;s<a href="http://poshcruise.org">PowerShell Cruise</a> and am excited for the folks who are organizing it. Tonight&rsquo;s<a href="https://t.co/StJPSxbexE">webinar</a> (which they&rsquo;ll post to their YouTube channel) will be a chance for you to learn more.</p><p>But.</p><p>If you&rsquo;ve never cruised before, you may not be aware of how the majority of the cruise industry works:</p><ul><li>Your cruise price includes your room, and is based on two people staying in the room together.</li><li>Your cruise price includes most food on the ship - certain specialty restaurants may charge a la carte like a normal restaurant, or may have a small ($25-ish) per-person charge to dine there. If they have the per-person charge, everything on the menu is  then included at no extra charge.</li><li>Your drinks cost extra - everything but water, tea, and plain coffee in most cases. Even soda is an extra price.</li></ul><p>That&rsquo;s why I want you to think <strong>really really hard</strong> about what I&rsquo;m going to write next.</p><p>If you **put a deposit down for the cruise before Friday July 31 2015, you can get all beverages included for just $68 extra per person. **That&rsquo;s all your soda. All your drinks (including cocktails up to $15 each). If you plan to have one nice glass of wine per day, and then drink cola, this will pay for itself easily. </p><p>The deposit is $250 per person, meaning $500 per stateroom. And it&rsquo;s fully refundable - <strong>you can get the entire deposit back</strong> - until April 2016. **So you don&rsquo;t need to make up your mind yet, **but if you don&rsquo;t do the deposit <strong>now</strong> you can&rsquo;t get the cheap drink package. Sure, you could buy it later, but it&rsquo;ll run you another $350 or so per person, I believe. </p><p>Even if you&rsquo;re planning to take the kids, they can get the drink package too - it&rsquo;ll cover their soft drinks for the entire cruise. </p><p>So look - I don&rsquo;t want anyone to miss this opportunity just because they&hellip; well, <em>missed</em> it. And keep in mind, this is the _first of a kind event, _and there will be swag to prove you were there. So there&rsquo;s a lot of reasons to <em>at least consider going</em> - and if you&rsquo;re considering it, get that deposit in <em>right now</em> so you can score the drink package, at the very least.<a href="http://poshcruise.org/booking.html">Call the travel agency that&rsquo;s handling the bookings</a> (don&rsquo;t e-mail, you want this done _now). _</p><p>Thank you. This ends the public service announcement. Resume shelling.</p>
]]></content:encoded></item><item><title>2015-July Scripting Games Wrap-Up</title><link>https://powershell.org/articles/2015-07-29-2015-july-scripting-games-wrap-up/</link><guid>https://powershell.org/articles/2015-07-29-2015-july-scripting-games-wrap-up/</guid><pubDate>Wed, 29 Jul 2015 17:39:26 +0000</pubDate><description>&lt;p&gt;The &lt;a href="https://powershell.org/2015/07/04/2015-july-scripting-games-puzzle/"&gt;July puzzler&lt;/a&gt; wasn&amp;rsquo;t intended to break your brain - but it was intended to highlight an extremely important pipeline technique - and to make you think about how PowerShell parses command lines. Let&amp;rsquo;s begin with our Celebrity Entry, from Boe Prox. We think you&amp;rsquo;ll discover some interesting new techniques in this answer - and learn from understanding how he got there.&lt;/p&gt;
&lt;h1 id="celebrity-entry" class="ps-heading"&gt;Celebrity Entry&lt;a class="ps-heading-anchor" href="#celebrity-entry" 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;/h1&gt;
&lt;p&gt;The 2015 Scripting Games have started and have taken a different route this year in that we are they are running a monthly puzzle vs. the usual format. That being said, I was asked to be a celebrity contestant and put together my solution as well as adding my thoughts (I promise to try and stay on a clear path) and various routes that I took to get to my final solution.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The<a href="https://powershell.org/2015/07/04/2015-july-scripting-games-puzzle/">July puzzler</a> wasn&rsquo;t intended to break your brain - but it was intended to highlight an extremely important pipeline technique - and to make you think about how PowerShell parses command lines. Let&rsquo;s begin with our Celebrity Entry, from Boe Prox. We think you&rsquo;ll discover some interesting new techniques in this answer - and learn from understanding how he got there.</p><h1 id="celebrity-entry" class="ps-heading">Celebrity Entry<a class="ps-heading-anchor" href="#celebrity-entry" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>The 2015 Scripting Games have started and have taken a different route this year in that we are they are running a monthly puzzle vs. the usual format. That being said, I was asked to be a celebrity contestant and put together my solution as well as adding my thoughts (I promise to try and stay on a clear path) and various routes that I took to get to my final solution.</p><p>The event, while seemingly simple, did cause me to spend some time trying to whittle down the number of characters to try and get as few as possible (because shorter code, while harder to read is always fun to write ;)).</p><p>The rules of engagement for this particular puzzle are as follows:</p><p>_Write a one-liner that produces the following output (note that property values will be different from computer to computer; that’s fine). _</p><p><strong>_PSComputerName ServicePackMajorVersion Version  BIOSSerial  _</strong></p><p><em>By definition, a one-liner is a single, long command or pipeline that you type, hitting Enter only at the very end. If it wraps to more than one physical line as you’re typing, that’s OK. But, in order to really test your skill with the parser, try to make your one-liner as short as technically possible while still running correctly.</em></p><p>That’s not all though, here are some extra pieces to make it a little more challenging;</p><ul><li>Try to use no more than one semicolon total in the entire one-liner</li><li>Try not to use ForEach-Object or one of its aliases</li><li>Write the command so that it could target multiple computers (no error handling needed) if desired</li><li>Want to go obscure? Feel free to use aliases and whatever other shortcuts you want to produce a teeny-tiny one-liner.</li></ul><p>Now that we have all of this understood, it is time to start looking at how I am going to handle this.</p><p>I know already that I need to look at WMI as my source to pull this information. PSComputername is already available when I use Get-CIMInstance to handle my query.</p><p>The first thing that I need to do is that in order to pull both the<strong>ServicePackMajorVersion</strong> and<strong>Version</strong> I need to use the Cim_OperatingSystem class (it has everything I need from Win32_OperatingSystem, but at fewer characters!), but then I have the BIOSSerial property which happens to exist on the Win32_BIOS class. If I intend to overcome the<em>only use 1 semicolon</em> challenge and also make this a one liner, I need to start thinking of a good workaround. Fortunately, a workaround exists in creating a custom property that will define the BIOSSerial label and then performs a query to the class that returns the serial number.</p><p><code>Get-CIMInstance -Class Cim_OperatingSystem | Select-Object PSComputername,ServicePackMajorVersion,Version,@{Label='BIOSSerial';Expression={(Get-CIMInstance -Class Win32_BIOS).SerialNumber}}</code>This works great and also ensures that I only have a single semicolon to boot! At this point I technically have a submission that works…but it is missing a few things extra that would really meet all of the requirements to include being able to target multiple systems as well as shrinking the code down to its smallest possible size while still retaining its functionality.</p><h2 id="handling-multiple-systems" class="ps-heading"><strong>Handling Multiple Systems</strong><a class="ps-heading-anchor" href="#handling-multiple-systems" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>First off is the concept of
allowing for multiple systems
(remember that this was one of the challenge requirements). I wanted something that would be dynamic enough to where I wasn’t hard coding a host file or computer names into the script.</p><p>I thought I could get away with this using Read-Host, but unfortunately for me, it displays everything as a single string, not an array of strings that I had hoped for. </p><p><code>(Read-Host ' ').GetType().Fullname</code>That pretty much threw out one idea that I had until I had the idea of splitting the comma (which would be the common character to use with building a collection of items) if it was used with Read-Host and instantly this is back in the game! I also realized that I just needed to give a single character (that wasn’t a single or double quote) to knock out a couple of characters for the prompt.</p><p><code>(Read-Host .).split(',')</code>I almost thought that I had this done until I did a little more research. Sure enough, there is a better approach to be had here in the form of<strong>Echo</strong>, which happens to be an alias for Write-Output. If nothing is supplied to it, it prompts for input and continues to do so until you hit return on an empty line which means…you guessed it…instant collections that can be passed to the command!</p><p>That really knocked down my character count!</p><h2 id="shrinking-cmdlets" class="ps-heading"><strong>Shrinking Cmdlets</strong><a class="ps-heading-anchor" href="#shrinking-cmdlets" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Obviously, this is where aliases begin to come into play. I start knocking down my cmdlets to get them as small as possible. Get-WMIObject becomes gwmi and Select-Object becomes Select. Next up I can take my custom property and bring Label down to just ‘l’ and then make Expression ‘e’.  Because it was not explicitly mentioned that we would be outputting this to a file or doing anything else with it, I am going to instead use Format-Table, or more appropriately, its alias of<strong>FT</strong> to further reclaim the valuable character count.</p><p><code>FT @{l='BIOSSerial';e={(gcim -Class Win32_BIOS).SerialNumber}}</code>As a bonus to this, I am also going to use the smallest possible property names with wildcards to still have the proper display but much fewer characters.</p><p><code>ft PSC*,*aj*,V*,@{n='BIOSSerial';e={(gcim Win32_BIOS).SerialNumber}}</code>##<strong>Shrinking Parameters</strong></p><p>Getting there… Parameters also will sometimes have their own aliases that can be used, so –Computername can become –cn and –Class can be knocked down to –cl without fear of running into the dreaded ambiguous parameter error. But why stop at shortened parameter names when positional parameter can be much more fun while at the same time squeezing out more characters in my attempt to make this as small as possible. Using gwmi, we have the positional parameter for the –Class parameter meaning that we can specific the class first and the cmdlet will process it just as though we specified the parameter name.</p><h2 id="positional-parameter" class="ps-heading"><strong>Positional Parameter</strong><a class="ps-heading-anchor" href="#positional-parameter" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Parameter aliases are nice and all, but if I want to continue to shrink down my command, I need to look at parameters by position. With Get-WMIObject, I only have one option for a positional parameter with –Class (which happens to be as position 0). –Computername is unfortunately not a positional parameter (as shown in the image below) in the way that I can just have it right after –Class.</p><p><code>(Get-Command Get-CimInstance).Parameters.GetEnumerator()|ForEach{ $Param = $_.Key $_.Value.Attributes|ForEach{ If ($_.TypeId -eq [System.Management.Automation.ParameterAttribute]) { [pscustomobject]@{ Name=$Param Position=$_.Position ParamSet=$_.ParameterSetName } } } }</code>But…it turns out Computername is an accepted value via the pipeline, so now I can go that route and not have to worry about specifying any parameters in my one liner!</p><p>What I ended up with is the following submission (I’ve broke this out at a natural line break for the sake of readability):</p><p><code>echo|gcim cim_operatingsystem| ft PSC*,*j*,V*,@{n='BIOSSerial';e={(gcim Win32_BIOS).SerialNumber}}</code>This one liner is<strong>97</strong> characters in length (woo hoo!) with the various aliases being used, removing any unnecessary white space in between things such as the pipe (|) and commas. I also ensure that the output is exactly what was shown in the example for the event. My victory was short lived however.</p><p>Did you notice what I was missing here in this approach? I didn’t realize this until I was at the end of this article that I was only querying the local system for the BIOS. With that issue, I quickly fixed it (at the cost of more characters) and now have something that comes in at<strong>105 characters</strong>
and
meets the requirements and challenges.</p><p><code>echo|gcim cim_operatingsystem| ft PSC*,*j*,V*,@{n='BIOSSerial';e={($_.csname|gcim Win32_BIOS).SerialNumber}}</code>##<strong>Side Note on Invoke-Command</strong></p><p>I could have went with Invoke-Command (using icm an alias) but the problem lies with the output object that includes Runspaceid which obviously would not meet the requirement of this puzzle.</p><p>With that, I look forward to seeing what everyone else has put together and learning some awesome ways of accomplishing this puzzle including who can put together an insanely short command that meets all of the design criteria!</p><h1 id="official-answer" class="ps-heading">Official Answer<a class="ps-heading-anchor" href="#official-answer" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>While there&rsquo;s no one right way to accomplish this task, our puzzle author obviously has an answer in mind. Here it is:</p><p><code>gwmi win32_operatingsystem | select pscomputername,servicepackmajorversion,version,@{n='BIOSSerial';e={gwmi win32_bios | select -expand serialnumber}}</code>This solution doesn&rsquo;t hit all of the additional challenges, but it perhaps makes it clearer to see the most important bit: using a custom property to execute a second query, and extracting the results of that query into the custom property&rsquo;s value. Boe&rsquo;s celebrity solution, above, is a much more concise version of this, and meets many more of the optional challenges!</p><h1 id="interesting-submissions" class="ps-heading">Interesting Submissions<a class="ps-heading-anchor" href="#interesting-submissions" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h1><p>Stephen Testino had an interesting approach:</p><p><code>gwmi win32_operatingsystem -co @(".") | select *pu*, *j*, v*, @{n="BIOSSerial";e={(gwmi win32_bios -co $_.csname).serialnumber}}</code>Here, you&rsquo;re seeing the value in using wildcards with Select-Object. Stephen also saved a little space by not using Select-Object and -ExpandProperty to get the SerialNumber property&rsquo;s contents; instead, he used a parenthetical expression. A but harder to read, perhaps, but more concise in this case. You might argue that the addition of the -ComputerName parameter isn&rsquo;t necessary, since the local computer is already the default; creating a one-element array was also unnecessary because PowerShell would have done that anyway.</p><p>&ldquo;powershelleanpeoplesfront&rdquo; offered one of the Invoke-Command approaches we saw:</p><p><code>icm{gwmi cim_operatingsystem|ft psc*,*j*,v*,@{n='BIOSSerial';e={(gwmi win32_bios).SerialNumber}}}-cn .</code>Basically the same idea. In this case, Format-Table is being used as an alternate for Select-Object. Within the scope of the puzzle, they&rsquo;re doing the same thing; the only downside to using Format-Table is that the output can&rsquo;t then be piped on to very many other cmdlets. So in a more real-world scenario, Select-Object offers more flexibility.</p><p>Paal had one of the &ldquo;who cares about the optional challenges?&rdquo; answers (which is totally fine, as it&rsquo;s a lot easier to read!!!) - a lot of people came up with something similar to this.</p><p><code># https://powershell.org/2015/07/04/2015-july-scripting-games-puzzle/ Get-CimInstance -ClassName Win32_OperatingSystem -ComputerName $Computers | Format-Table -AutoSize PSComputerName,ServicePackMajorVersion,Version,@{l="BIOSSerial"; e={(Get-CimInstance -ClassName Win32_BIOS -ComputerName $_.PSComputerName).SerialNumber}}</code>Again, note the use of Format-Table. Within the scope of this puzzle, it&rsquo;s fine - but make sure you know why Select-Table can do more or less the same thing, and how it differs from formatting.</p><p>Joshua Wortz used pipeline input to save some space:</p><p><code>@('Comp1','Comp2')|gcim win32_operatingsystem|ft PSC*,*j*,V*,@{N="BIOSSerial";E={(gwmi win32_bios -cn $_.pscomputername).serialnumber}}</code>By piping in the computer names, you eliminate the need to manually specify -ComputerName. However, Joshua could have eliminated the <strong>@()</strong> array construct; PowerShell usually treats comma-separated strings as arrays anyway, so you&rsquo;d reduce your character count by three more that way. With the Win32_OperatingSystem class in particular, you also get a CSName property that could be used instead of PSComputerName, for ad additional reduction in character count. You&rsquo;ll notice that some entries used CSName, probably for that reason. The PSComputerName property wasn&rsquo;t added until PowerShell 3, also.</p><p>Stephen Owen<a href="https://gist.github.com/1RedOne/e2a89f1a2ec5413d2c37#file-july-2015-powershell-challenge">posted an entry that included his thoughts</a>, and that&rsquo;s something <em>everyone</em> is welcome, and encouraged, to do. It&rsquo;s super-useful to everyone in the community to see your thought process as well as your solution! Stephen also had the same learning moment that Boe had, which was that the output of Read-Host is a single string, not the array you need in order to feed the names to a parameter. That&rsquo;s valuable knowledge! Several others, based on their solutions&rsquo; use of -Split or the Split() method, learned the same thing.</p><p>&ldquo;kvprasoon&rdquo; has an absolutely unique approach:</p><p><code>foreach($O in "Win32_operatingsystem","win32_bios"){if($O -eq "win32_bios"){$r+=(gwmi $O|select @{E="Serialnumber";L="BIOS Serialnumber"},Pscomputername,@{E={$r.servicepackmajorversion};L="servicepackmajorversion"},@{E={$R.version};L="version"})} else{[array]$r+=(gwmi $O|select @{E={""};L="Serialnumber"},Pscomputername,servicepackmajorversion,version)};$R[1]}</code>I think that&rsquo;s probably <em>way</em> more code than anyone else wrote, and having it as a one-liner makes it pretty tough to read, but it&rsquo;s definitely an interesting approach. I think, though, that this demonstrates how <em>not</em> to use the pipeline in PowerShell. This is really structural code, and it doesn&rsquo;t let PowerShell do most of the work that it&rsquo;s willing to do. But hopefully everyone can learn a little bit by comparing this to some of the more commonly offered patterns, including those I&rsquo;ve shared here. For the record, the same user also posted other, better solutions; in the future, we ask folks to post just one submission, to make the read-through a little easier.</p><p>I hope everyone found this puzzle to be fun, a little challenging, and perhaps learned something new. Two notes going forward:</p><ul><li>**Please post only one solution. **Keep in mind that you can always go back and edit your Gist, and we&rsquo;ll always pull the most recent one, so there&rsquo;s no need to re-post a new solution if you want to change something.</li><li>**Please use Gists, as indicated in the instructions. **That&rsquo;s different from a regular GitHub URL, and it&rsquo;s not the same as just pasting code into a comment. </li></ul><p>If you&rsquo;re a blogger, you are <strong>more than welcome</strong> to create a blog article about your solution; just add that article&rsquo;s URL to the comment with your Gist URL.</p><p>See you in a little bit with next month&rsquo;s puzzle!</p>
]]></content:encoded></item><item><title>Powershell IS for the desktop tech as well</title><link>https://powershell.org/articles/2015-07-28-powershell-is-for-the-desktop-tech-as-well/</link><guid>https://powershell.org/articles/2015-07-28-powershell-is-for-the-desktop-tech-as-well/</guid><pubDate>Wed, 29 Jul 2015 00:06:26 +0000</pubDate><description>&lt;p&gt;Every day some one tends to ask me if there is a simpler way to do task A or B, and the minute I mention PowerShell the response is almost always the same, &amp;ldquo;yea i have been meaning to learn that but. This really saddens me for 2 reasons, &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Because PowerShell can and does make your life simpler &lt;/li&gt;
&lt;li&gt;i am already seeing peoples jobs get replaced when they fall behind in the skill and as more and more companies move closer to automation it will only get worse. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It saddens me even more so when I see co-workers who i have taken the time to write the scripts to improve the speed of resolution not use them either. then wounder why i am able to fix the same issue in a fraction of the time they have. &lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Every day some one tends to ask me if there is a simpler way to do task A or B, and the minute I mention PowerShell the response is almost always the same, &ldquo;yea i have been meaning to learn that but. This really saddens me for 2 reasons, </p><ol><li>Because PowerShell can and does make your life simpler </li><li>i am already seeing peoples jobs get replaced when they fall behind in the skill and as more and more companies move closer to automation it will only get worse. </li></ol><p>It saddens me even more so when I see co-workers who i have taken the time to write the scripts to improve the speed of resolution not use them either. then wounder why i am able to fix the same issue in a fraction of the time they have. </p><p>As you probably guessed from the title i am talking about people in the world of desktop technicians. the , in my opinion, unsung heroes of IT support. <br>
Powershell is not just for system admins, the local desktop guy can make his life much simpler by scripting out the simple stuff to save you time and money. <br>
here is an example, <br>
one of our clients has an issue with network printers getting jammed up if they do not print PDF documents as an image, once I had to do 3 or 4 of these i decided this took to long to fix, since we have to stop the print spooler, delete all the Print jobs and then restart then spooler again, and when you have 20-30 PCs to do this on i am sue you can guess this takes up a lot of our time. so I wrote a script to solve the issue, and it is really simple as well </p><p>`/**</p><ul><li>function Start-Error49FixV3
{
[CmdletBinding()]
[OutputType([int])]
Param
(
# Enter the Hostname of the Target PC(s)
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[string[]]$Computername
)
Begin
{
}
Process
{
foreach ($Computer in $Computername)
{
Invoke-Command -computername $Computer -ScriptBlock {Stop-Service -Displayname &ldquo;Citrix Print Manager Service&rdquo;}
Invoke-Command -computername $Computer -ScriptBlock {Stop-Service -Name spooler -force}
Remove-Item -Path \$Computer\c$\Windows\System32\spool\PRINTERS* -recurse
Invoke-Command -computername $Computer -ScriptBlock {Start-Service -Displayname &ldquo;Citrix Print Manager Service&rdquo;}
Invoke-Command -computername $Computer -ScriptBlock {Start-Service -Name spooler}
Get-Service -Computername $Computer -name Spooler | Select name,status,$Computer | sort $Computer |format-table -AutoSize
Get-Service -Computername $Computer -Displayname &ldquo;Citrix Print Manager Service&rdquo; | Select name,status,$Computer | sort $Computer |format-table -AutoSize
}
}
End
{
}
}
*/
`This simple line of Code was able to turn this process from being done after hours to a normall 20 minute fix for most of the clients locations, not only allowing us to get back to other issues faster but also helpinn to make the client happy since they no longer ad to wait a day for the printer to get backup and running.<br>
This is just one example, i could fill up your PC with other even simpler examples but instead i would rather show you. so over the course of the blog I am going to introduce you to a verity of topics from how to right clean code, how to test it safely, and lastly how to get a devops platform discussion into your work place for this so your code can get properly validated and confirmed safe in the environment.<br>
also if you have any questions on anything to do with PowerHhell feel free to drop it in the comments below or e-mail me @<a href="mailto:Brian.Bourque@live.com">Brian.Bourque@live.com</a><br>
until next time guys happy scripting</li></ul>
]]></content:encoded></item><item><title>PowerShell Summit NA 2016 – call for topics coming soon</title><link>https://powershell.org/articles/2015-07-28-powershell-summit-na-2016-call-for-topics-coming-soon/</link><guid>https://powershell.org/articles/2015-07-28-powershell-summit-na-2016-call-for-topics-coming-soon/</guid><pubDate>Tue, 28 Jul 2015 15:28:45 +0000</pubDate><description>&lt;p&gt;The North American PowerShell Summit 2016 will take place at the
Meydenbauer center in Bellevue WA. on April 4-6 2016. The Summit is a community event, with community based speakers. That means we need **you **to submit sessions. Members of the PowerShell team will be attending, and speaking, as in previous years as will a number of PowerShell MVPs. One of the goals of PowerShell.org is to help build the PowerShell community and that means helping and developing new speakers. You don&amp;rsquo;t have to be an established speaker to present at the Summit - just knowledgeable about your topic and enthusiastic about PowerShell.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>The North American PowerShell Summit 2016 will take place at the
Meydenbauer center in Bellevue WA. on April 4-6 2016. The Summit is a community event, with community based speakers. That means we need **you **to submit sessions. Members of the PowerShell team will be attending, and speaking, as in previous years as will a number of PowerShell MVPs. One of the goals of PowerShell.org is to help build the PowerShell community and that means helping and developing new speakers. You don&rsquo;t have to be an established speaker to present at the Summit - just knowledgeable about your topic and enthusiastic about PowerShell.</p><p>We&rsquo;ll be posting the official &ldquo;Call for Topics&rdquo; next week. This is a warning to get you thinking about topics you can present at the Summit.  Standard sessions are 45 minutes with Q&amp;A though expect discussions to continue over coffee.</p><p>This year we&rsquo;re expecting to be able to cover at least some of the hotel room costs for speakers - more details next week.</p><p>In the mean time - start thinking of those ideas and be ready to submit them when we open up the event site for speaker submissions. Established expert or new-comer - we need your sessions to make the Summit work. We&rsquo;ve had 3 excellent NA Summits so far - your session will help make 2016 the best one yet.</p>
]]></content:encoded></item><item><title>Curious about PowerShell Cruise? Here's how to learn more.</title><link>https://powershell.org/articles/2015-07-24-curious-about-powershell-cruise-heres-how-to-learn-more/</link><guid>https://powershell.org/articles/2015-07-24-curious-about-powershell-cruise-heres-how-to-learn-more/</guid><pubDate>Fri, 24 Jul 2015 19:58:17 +0000</pubDate><description>&lt;p&gt;I&amp;rsquo;m stupid-excited about &lt;a href="Http://PoshCruise.org"&gt;PowerShell Cruise&lt;/a&gt;. Did you know you can register now for just $500, which is fully refundable up to a point? And that doing so NOW gets you awesome amenities like free Internet minutes or liquor packages? Did you know I&amp;rsquo;m speaking? Did you&amp;hellip; &lt;/p&gt;
&lt;p&gt;Wait. You probably have a ton of questions, especially if you&amp;rsquo;ve never cruised. So on Wednesday July 29, at 4pm Pacific, get your answers. Go to https://attendee.gotowebinar.com/register/4206318439550861826 to register for a webinar. I&amp;rsquo;ll host, and I&amp;rsquo;ll be joined by the event organizers, as well as the travel agency that&amp;rsquo;s handling the bookings. There&amp;rsquo;s literally no PowerShell Cruise question these brave souls can&amp;rsquo;t answer.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>I&rsquo;m stupid-excited about<a href="Http://PoshCruise.org">PowerShell Cruise</a>. Did you know you can register now for just $500, which is fully refundable up to a point? And that doing so NOW gets you awesome amenities like free Internet minutes or liquor packages? Did you know I&rsquo;m speaking? Did you&hellip; </p><p>Wait. You probably have a ton of questions, especially if you&rsquo;ve never cruised. So on Wednesday July 29, at 4pm Pacific, get your answers. Go to https://attendee.gotowebinar.com/register/4206318439550861826 to register for a webinar. I&rsquo;ll host, and I&rsquo;ll be joined by the event organizers, as well as the travel agency that&rsquo;s handling the bookings. There&rsquo;s literally no PowerShell Cruise question these brave souls can&rsquo;t answer.</p><p>Did you know the conference portion of the cruise - the technical conten - will be FREE? Did you know two people can sail for under $1900, inclusive of meals, snacks, and most onboard activities? NO, you did not know, and that&rsquo;s why you need to at least show up and get the facts. We will record the whole thing, too.</p><p>I want to emphasize that this isn&rsquo;t a PowerShell.org event - we are just being as hugely supportive as possible to the bold individuals who are trying to do this thing for their community, at no profit for themselves, and with (probably) more than a few evil eyes from their spouses. So show your love and join the webinar!!!</p>
]]></content:encoded></item><item><title>Building a test lab : The basics Part 1 RootCA</title><link>https://powershell.org/articles/2015-07-15-building-a-test-lab-the-basics-part-1-rootca/</link><guid>https://powershell.org/articles/2015-07-15-building-a-test-lab-the-basics-part-1-rootca/</guid><pubDate>Thu, 16 Jul 2015 04:16:28 +0000</pubDate><description>&lt;p&gt;Part of building a functional test lab is being able to deal with cattle and not pets. With that in mode I&amp;rsquo;m writing a series about the script necessary to build a production like lab for testing DSC, and be able to to tear it down and rebuild it with little effort.&lt;/p&gt;
&lt;p&gt;Part 1 is about bootstrapping DSC for the Root CA. and doing so without using plaintext passwords.&lt;/p&gt;
&lt;p&gt;I would welcome some feedback on both my methods and writing style.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Part of building a functional test lab is being able to deal with cattle and not pets. With that in mode I&rsquo;m writing a series about the script necessary to build a production like lab for testing DSC, and be able to to tear it down and rebuild it with little effort.</p><p>Part 1 is about bootstrapping DSC for the Root CA. and doing so without using plaintext passwords.</p><p>I would welcome some feedback on both my methods and writing style.</p><p><a href="https://bladefirelight.wordpress.com/2015/07/16/building-the-basics-part-1-pki-rootca/">Building the basics Part 1 | PKI: RootCA</a></p>
]]></content:encoded></item><item><title>Curious About the #PoshCruise? Ask Questions Here.</title><link>https://powershell.org/articles/2015-07-14-curious-about-the-poshcruise-ask-questions-here/</link><guid>https://powershell.org/articles/2015-07-14-curious-about-the-poshcruise-ask-questions-here/</guid><pubDate>Tue, 14 Jul 2015 16:12:57 +0000</pubDate><description>&lt;p&gt;Jeffrey Langdon, Doug Finke, and untold others are putting together &lt;a href="http://poshcruise.org"&gt;PoshCruise&lt;/a&gt;, a PowerShell Cruise Conference. I wanted to make sure everyone knew about it, because it (A) stands to be a lot of run, and (B) offers some special pricing through this month.&lt;/p&gt;
&lt;p&gt;The &amp;ldquo;conference&amp;rdquo; itself is free - you just have to pay for your cruise. There&amp;rsquo;ll be presentations (I&amp;rsquo;m guessing mainly on the &amp;ldquo;at sea&amp;rdquo; days of the 7-day trip, although personally I&amp;rsquo;ve rented a beach cabana on Great Stirrup Cay and will hold forth on technical topics over tropical cocktails). &lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Jeffrey Langdon, Doug Finke, and untold others are putting together<a href="http://poshcruise.org">PoshCruise</a>, a PowerShell Cruise Conference. I wanted to make sure everyone knew about it, because it (A) stands to be a lot of run, and (B) offers some special pricing through this month.</p><p>The &ldquo;conference&rdquo; itself is free - you just have to pay for your cruise. There&rsquo;ll be presentations (I&rsquo;m guessing mainly on the &ldquo;at sea&rdquo; days of the 7-day trip, although personally I&rsquo;ve rented a beach cabana on Great Stirrup Cay and will hold forth on technical topics over tropical cocktails). </p><p>Cruises can be a pretty good deal in terms of value. NCL, the cruise line, is really clear about<a href="https://www.ncl.com/faq/cruise-fare-includes">what&rsquo;s included</a> and what&rsquo;s extra. And, unlike many lines, NCL&rsquo;s &ldquo;Freestyle Cruising&rdquo; means you&rsquo;re not locked into a schedule for things like meals - you just eat when you want, where you want, in a number of different venues. I plan to inject PowerShell into every possible minute of the cruise - PowerShell in the pool, DSC in the whiskey bar, Toolmaking in the buffet, you name it.</p><p>If you&rsquo;ve not cruised before, and are curious about how different stuff works, pop a question into the comments here. I&rsquo;ve cruised a _ton, _so I&rsquo;ll do my best to answer - and if something comes up about the PowerShell aspect of the cruise, I&rsquo;ll grab one of the guys to drop an answer here.</p><p>At a per-person price as low as $950 (based on double occupancy), it&rsquo;s amongst the cheapest conferences you&rsquo;ll find. You&rsquo;ll need to factor in airfare to NYC, about $110 in shipboard service charges, but apart from that you don&rsquo;t <em>have</em> to spend any more. That covers your food, beverages like tea and water, and most shipboard activities. Packages can lower the price of alcoholic or soft drinks (especially if you book early, when those packages are either included in the price or are heavily discounted), even.</p><p>So&hellip; whatcha wanna know about a PoshCruise?</p>
]]></content:encoded></item><item><title>PhillyPoSH 07/07/2015 meeting summary and presentation materials</title><link>https://powershell.org/articles/2015-07-13-phillyposh-07072015-meeting-summary-and-presentation-materials/</link><guid>https://powershell.org/articles/2015-07-13-phillyposh-07072015-meeting-summary-and-presentation-materials/</guid><pubDate>Tue, 14 Jul 2015 00:51:36 +0000</pubDate><description>&lt;p&gt;&lt;a href="https://twitter.com/Iczer1"&gt;John Mello&lt;/a&gt; gave a presentation entitled “ConvertFrom-String Overview and Examples”.
&lt;a href="https://github.com/PhillyPoSH/2015-07-ConvertFrom-String"&gt;A copy of his demo scripts and presentation&lt;/a&gt;
are available at our
&lt;a href="https://github.com/PhillyPoSH"&gt;GitHub site&lt;/a&gt;
. &lt;a href="https://twitter.com/techguytj"&gt;TJ Turner&lt;/a&gt;&amp;rsquo;s presentation &amp;ldquo;&lt;a href="http://techguytj.com/whats-in-your-toolbox/"&gt;What&amp;rsquo;s in your Toolbox&lt;/a&gt;&amp;rdquo; is available at his &lt;a href="http://techguytj.com/"&gt;blog&lt;/a&gt;. 
&lt;a href="https://www.youtube.com/watch?v=GGr3dQRi5nQ"&gt;A recording of this meeting&lt;/a&gt;
has been posted to our
&lt;a href="https://www.youtube.com/channel/UCAc_ow5FIJtRpvew__9Iqzg"&gt;YouTube channel&lt;/a&gt;
.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p><a href="https://twitter.com/Iczer1">John Mello</a> gave a presentation entitled “ConvertFrom-String Overview and Examples”.<a href="https://github.com/PhillyPoSH/2015-07-ConvertFrom-String">A copy of his demo scripts and presentation</a>
are available at our<a href="https://github.com/PhillyPoSH">GitHub site</a>
. <a href="https://twitter.com/techguytj">TJ Turner</a>&rsquo;s presentation &ldquo;<a href="http://techguytj.com/whats-in-your-toolbox/">What&rsquo;s in your Toolbox</a>&rdquo; is available at his<a href="http://techguytj.com/">blog</a>. <a href="https://www.youtube.com/watch?v=GGr3dQRi5nQ">A recording of this meeting</a>
has been posted to our<a href="https://www.youtube.com/channel/UCAc_ow5FIJtRpvew__9Iqzg">YouTube channel</a>
.</p>
]]></content:encoded></item><item><title>Philadelphia PowerShell User Group Meeting – August 6th 2015</title><link>https://powershell.org/articles/2015-07-12-philadelphia-powershell-user-group-meeting-august-6th-2015/</link><guid>https://powershell.org/articles/2015-07-12-philadelphia-powershell-user-group-meeting-august-6th-2015/</guid><pubDate>Mon, 13 Jul 2015 03:40:33 +0000</pubDate><description>&lt;p&gt;Join us on Thursday, August 6th when &lt;a href="https://twitter.com/juneb_get_help"&gt;June Blender&lt;/a&gt; will be conducting a hands on lab (in person!) called &lt;strong&gt;Working with Classes in PowerShell&lt;/strong&gt; &lt;strong&gt;5.0.&lt;/strong&gt; To participate in the lab, bring a laptop (or VM) with PowerShell 5.0, but it&amp;rsquo;s not required! After that, we will review the results of the &lt;a href="https://powershell.org/2015/07/04/2015-july-scripting-games-puzzle/"&gt;
July Scripting games puzzle
&lt;/a&gt;. &lt;/p&gt;
&lt;h4 id="aboutjune" class="ps-heading"&gt;About June&lt;a class="ps-heading-anchor" href="#aboutjune" 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;/h4&gt;
&lt;p&gt;June Blender is a technology evangelist for SAPIEN Technologies, Inc.
Formerly a Senior Programming Writer at Microsoft Corporation, she is best known for her work with the Windows PowerShell product team from 2006-2012. developing the help system and writing the Get-Help help topics for PowerShell 1.0 – 3.0. In other roles, June wrote content for the Azure Active Directory SDK and Azure PowerShell Help, Windows Driver Kits, Windows Support Tools, and Windows Resource Kits.
She 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 is a Windows PowerShell MVP, a PowerShell Hero, an Honorary Scripting Guy, and a frequent contributor to PowerShell.org. Contact her at [&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Join us on Thursday, August 6th when <a href="https://twitter.com/juneb_get_help">June Blender</a> will be conducting a hands on lab (in person!) called<strong>Working with Classes in PowerShell</strong><strong>5.0.</strong> To participate in the lab, bring a laptop (or VM) with PowerShell 5.0, but it&rsquo;s not required! After that, we will review the results of the <a href="https://powershell.org/2015/07/04/2015-july-scripting-games-puzzle/">
July Scripting games puzzle</a>. </p><h4 id="aboutjune" class="ps-heading">About June<a class="ps-heading-anchor" href="#aboutjune" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h4><p>June Blender is a technology evangelist for SAPIEN Technologies, Inc.
Formerly a Senior Programming Writer at Microsoft Corporation, she is best known for her work with the Windows PowerShell product team from 2006-2012. developing the help system and writing the Get-Help help topics for PowerShell 1.0 – 3.0. In other roles, June wrote content for the Azure Active Directory SDK and Azure PowerShell Help, Windows Driver Kits, Windows Support Tools, and Windows Resource Kits.
She 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 is a Windows PowerShell MVP, a PowerShell Hero, an Honorary Scripting Guy, and a frequent contributor to PowerShell.org. Contact her at [</p><p><a href="mailto:juneb@sapien.com">juneb@sapien.com</a></p><p>]<a href="mailto:juneb@sapien.com">3</a>
and follow her on the
[</p><p>SAPIEN Blog</p><p>]<a href="http://www.sapien.com/blog/">4</a>
and on Twitter at
[</p><p>@juneb_get_help</p><p>](<a href="https://twitter.com/juneb_get_help">https://twitter.com/juneb_get_help</a>)
.</p><p>Please <a href="https://www.eventbrite.com/e/phillyposh-august-6th-2015-june-blender-tickets-17741751055?ref=ebtn">
register</a> if you plan to attend in person or online. The meeting URL to join us remotely will be included in your Eventbrite registration confirmation.</p><p><a href="http://www.eventbrite.com/e/phillyposh-august-6th-2015-june-blender-tickets-17741751055?ref=ebtnebregn"><img src="https://www.eventbrite.com/custombutton?eid=17741751055" alt="Eventbrite - PhillyPosh August 6th 2015 - June Blender"/></p>
]]></content:encoded></item><item><title>NYC Powershell Usergroup meets on July 13th</title><link>https://powershell.org/articles/2015-07-10-nyc-powershell-usergroup-meets-on-july13/</link><guid>https://powershell.org/articles/2015-07-10-nyc-powershell-usergroup-meets-on-july13/</guid><pubDate>Fri, 10 Jul 2015 18:03:27 +0000</pubDate><description>&lt;p&gt;We have an exciting line-up for the July Powershell User-Group meeting.&lt;br&gt;
Powershell MVP, Tome Tanasovski will be presenting a beginner’s track on Powershell covering File Management, and Date/Time manipulations.&lt;br&gt;
We also have Powershell MVP Doug Finke, who will be covering Pester.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AGENDA:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Tome Tanasovski&lt;/strong&gt;:&lt;br&gt;
File management&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Managing paths&lt;/li&gt;
&lt;li&gt;Reading data from a file&lt;/li&gt;
&lt;li&gt;Finding strings in a collection of files&lt;/li&gt;
&lt;li&gt;XML and CSV file manipulation&lt;/li&gt;
&lt;li&gt;Exporting data to an HTML page&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Handling dates and time&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>We have an exciting line-up for the July Powershell User-Group meeting.<br>
Powershell MVP, Tome Tanasovski will be presenting a beginner’s track on Powershell covering File Management, and Date/Time manipulations.<br>
We also have Powershell MVP Doug Finke, who will be covering Pester.</p><p><strong>AGENDA:</strong></p><p><strong>Tome Tanasovski</strong>:<br>
File management</p><ul><li>Managing paths</li><li>Reading data from a file</li><li>Finding strings in a collection of files</li><li>XML and CSV file manipulation</li><li>Exporting data to an HTML page</li></ul><p>Handling dates and time</p><ul><li>Date and time formatting and custom date formats</li><li>Creating and updating a datetime object</li><li>Date comparison</li><li>Timespan datatype</li></ul><p>**Bio<br>
** Tome is an executive for a market-leading global financial services firm in New York City where he focuses on automation, private cloud, and distributed computing. He is the founder and leader of the New York City PowerShell User group, a blogger, and speaks regularly at conferences and user groups. In 2011, he became a cofounder of the NYC Techstravaganza, coauthored the Windows PowerShell Bible, and received the title of Honorary Scripting Guy from the Hey Scripting Guy! blog. Tome has also received the MVP award from Microsoft for the last five years in Windows PowerShell.<br><strong>Blog</strong>:<a href="http://powertoe.wordpress.com">http://powertoe.wordpress.com</a><br><strong>Twitter</strong>:<a href="http://twitter.com/toenuff">http://twitter.com/toenuff</a></p><p>**<br>
Doug Finke:<br>
** Testing PowerShell Scripts with Pester.<br>
This will be a demo heavy presentation showing how to test scripts and test Modules</p><ul><li>Pester, Why Test, How to Test, Mocks.</li><li>Visual Studio PoshTools Addin</li></ul><p><strong>Bio</strong><br>
Doug Finke, author of<em>PowerShell for Developers</em>, 7 time MVP recipient and an international professional speaker. Doug works at Start-Automating, a company that builds advanced PowerShell tools, provides PowerShell training and PowerShell consulting. You can catch up with Doug at his blog Development in a Blink at<br><strong>Blog:</strong><a href="http://dougfinke.com/blog">http://dougfinke.com/blog</a><br><strong>Twitter:</strong><a href="https://twitter.com/dfinke">https://twitter.com/dfinke</a> </p><p>Pizza is being sponsored by SAPIEN, Makers of PowerShell Studio and Primal Script</p><p><a href="http://www.sapien.com"><img src="https://powershell.org/wp-content/uploads/2015/06/SapienLogo3.png" alt="SapienLogo3"/></p><p>6 pm - 6:30 - Pizza and catching up<br>
6:30 - 7:15 – Tome Tanasovski.<br>
7:15 - 7:45 – Doug Finke.<br>
8ish - ?? - Drinks at Beer Authority (next to Port Authority)</p><p>You must RSVP via Event Brite in order to attend:<a href="https://www.eventbrite.com/e/nyc-powershell-ug-doug-finke-introduction-to-pester-tome-managing-datetime-with-powershellfile-tickets-17726352999">Register Here</a>!</p><p><a href="https://www.eventbrite.com/e/nyc-powershell-ug-doug-finke-introduction-to-pester-tome-managing-datetime-with-powershellfile-tickets-17726352999"><img src="https://powershell.org/wp-content/uploads/2015/06/EventBriteLogo.png" alt="EventBriteLogoEventBriteLogo"/></p><p><strong>Meeting Date:</strong><br>
Monday, July 13, 2015 - 18:00 - 20:00</p><p><strong>Location</strong></p><p>Microsoft - Times Square - 6th Floor<br>
11 Times Square<br>
New York, NY 10018<br>
United States<br>
See map:<a href="https://www.google.com/maps/place/11+Times+Square,+New+York,+NY+10036/@40.7567203,-73.9896494,17z/data=!3m1!4b1!4m2!3m1!1s0x89c258534f8455ad:0x55d4588f7b23a524">Google Maps</a></p>
]]></content:encoded></item><item><title>Mississippi PowerShell User Group Virtual Meeting – July 14th 2015</title><link>https://powershell.org/articles/2015-07-07-mississippi-powershell-user-group-virtual-meeting-july-14th-2015/</link><guid>https://powershell.org/articles/2015-07-07-mississippi-powershell-user-group-virtual-meeting-july-14th-2015/</guid><pubDate>Tue, 07 Jul 2015 15:19:57 +0000</pubDate><description>&lt;p&gt;Join us virtually on Tuesday, July 14th at 8:30pm Central Time when PowerShell MVP Sean Kearney will present “&lt;em&gt;&lt;strong&gt;Introduction to Windows PowerShell&lt;/strong&gt;&lt;/em&gt;”.&lt;/p&gt;
&lt;p&gt;Windows PowerShell is not a difficult system to work with however sometimes, like with anything in life, you stare at it and say “Where do I even start?”. In this session we will do a very simple overview of Windows PowerShell and what it is and how to make it useful at very simple level. It comes directly from a person who had Zero time to learn about any technology in his first IT Job, Windows PowerShell MVP, Sean Kearney. You might not master PowerShell after this session, but you certainly should be a little more comfortable to open up the door and play afterwards.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Join us virtually on Tuesday, July 14th at 8:30pm Central Time when PowerShell MVP Sean Kearney will present “<em><strong>Introduction to Windows PowerShell</strong></em>”.</p><p>Windows PowerShell is not a difficult system to work with however sometimes, like with anything in life, you stare at it and say “Where do I even start?”. In this session we will do a very simple overview of Windows PowerShell and what it is and how to make it useful at very simple level. It comes directly from a person who had Zero time to learn about any technology in his first IT Job, Windows PowerShell MVP, Sean Kearney. You might not master PowerShell after this session, but you certainly should be a little more comfortable to open up the door and play afterwards.</p><p>Visit the<a href="http://mspsug.com/2015/06/30/mspsug-virtual-meeting-introduction-to-windows-powershell-on-tuesday-july-14th-at-830pm-cdt/">Mississippi PowerShell User Group</a> website to learn more about Sean and to find out more details about this month’s meeting.</p><p>The Mississippi PowerShell User Group Meetings are held online (via Microsoft Lync) on the second Tuesday of each month at 8:30pm Central Time and are free to attend. The system requirements to attend these online meetings can be found on the MSPSUG website under the “<a href="http://mspsug.com/attendee-info/">Attendee Info</a>” section.</p><p>Register via<a href="http://mspsug.eventbrite.com/">EventBrite</a> to receive the URL for this meeting.</p><p>µ</p>
]]></content:encoded></item><item><title>RabbitMQ and PowerShell</title><link>https://powershell.org/articles/2015-07-07-rabbitmq-and-powershell/</link><guid>https://powershell.org/articles/2015-07-07-rabbitmq-and-powershell/</guid><pubDate>Tue, 07 Jul 2015 11:22:36 +0000</pubDate><description>&lt;p&gt;Have you ever needed to communicate between scripts, perhaps running on different servers and in different languages?  Did you use a non-standard &amp;ldquo;messaging&amp;rdquo; solution like the file system or a SQL database? Did you try to avoid this and squeeze everything into a monolithic, delicate script?&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ramblingcookiemonster.github.io/RabbitMQ-Intro/"&gt;RabbitMQ&lt;/a&gt; is a solid messaging solution that happens to have a handy REST API and .NET client, which means we can use PowerShell!&lt;/p&gt;
&lt;p&gt;Wrote a quick hit on setting up a simple RabbitMQ deployment and using PowerShell to manage the solution and send and receive messages. Thanks go to Mariusz Wojcik and Chris Duck for writing and sharing the PowerShell modules that were tweaked for this article.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Have you ever needed to communicate between scripts, perhaps running on different servers and in different languages?  Did you use a non-standard &ldquo;messaging&rdquo; solution like the file system or a SQL database? Did you try to avoid this and squeeze everything into a monolithic, delicate script?</p><p><a href="http://ramblingcookiemonster.github.io/RabbitMQ-Intro/">RabbitMQ</a> is a solid messaging solution that happens to have a handy REST API and .NET client, which means we can use PowerShell!</p><p>Wrote a quick hit on setting up a simple RabbitMQ deployment and using PowerShell to manage the solution and send and receive messages. Thanks go to Mariusz Wojcik and Chris Duck for writing and sharing the PowerShell modules that were tweaked for this article.</p><p><a href="http://ramblingcookiemonster.github.io/RabbitMQ-Intro/">RabbitMQ and PowerShell</a></p><p>Here&rsquo;s an example showing two independent PowerShell sessions talking to each other over a RabbitMQ server:</p><p><a href="https://powershell.org/wp-content/uploads/2015/07/Listener.gif"><img src="https://powershell.org/wp-content/uploads/2015/07/listener-small.gif" alt="listener-small"/><a href="https://powershell.org/wp-content/uploads/2015/07/Listener.gif"/></p><p>Is this something you could use in your solutions? Hit the link and check it out - pull requests and input would be welcome.</p><p>Cheers!</p>
]]></content:encoded></item><item><title>2015-July Scripting Games Puzzle</title><link>https://powershell.org/articles/2015-07-04-2015-july-scripting-games-puzzle/</link><guid>https://powershell.org/articles/2015-07-04-2015-july-scripting-games-puzzle/</guid><pubDate>Sat, 04 Jul 2015 08:01:13 +0000</pubDate><description>&lt;p&gt;Our July 2015 puzzler is designed to make you really think about the PowerShell parser. Normally, you can more or less ignore the parser, because if you&amp;rsquo;re typing best-practice, long-form code (no aliases, spell out parameter names, etc), the parser deals really well with everything. But knowing how the parser works is useful, because when you get into tricky syntax, the parser can be harder to work with. So we&amp;rsquo;re going to test the limits of the parser&amp;rsquo;s patience - and your skills!&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>Our July 2015 puzzler is designed to make you really think about the PowerShell parser. Normally, you can more or less ignore the parser, because if you&rsquo;re typing best-practice, long-form code (no aliases, spell out parameter names, etc), the parser deals really well with everything. But knowing how the parser works is useful, because when you get into tricky syntax, the parser can be harder to work with. So we&rsquo;re going to test the limits of the parser&rsquo;s patience - and your skills!</p><h2 id="instructions" class="ps-heading"><strong>Instructions</strong><a class="ps-heading-anchor" href="#instructions" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>The Scripting Games have been re-imagined as a monthly puzzle. We publish puzzles the first Saturday of each month, along with solutions and commentary for the previous month&rsquo;s puzzle. You can find them all at<a href="https://powershell.org/category/announcements/scripting-games/">https://powershell.org/category/announcements/scripting-games/</a>. Many puzzles will include optional challenges, that you can use to really push your skills.</p><p><strong>To participate</strong>, add your solution to a public Gist (<a href="http://gist.github.com">http://gist.github.com</a>; you&rsquo;ll need a free GitHub account, which all PowerShellers should have anyway). After creating your public Gist, just copy the URL from your browser window and paste it, by itself, as a comment of this post. 
**Only post one entry per person. You are not allowed to come back and post corrected or improved versions. If you do, all of your posts will be ignored. **However, remember that you can always go back and edit your Gist. We&rsquo;ll always pull the most recent one when we display it, so there&rsquo;s no need to post multiple entries if you want to make an edit.</p><p>Don&rsquo;t forget the<a href="https://powershell.org/?p=2574">main rules and purpose of these monthly puzzles</a>, including the fact that you won&rsquo;t receive individual scoring or commentary on your entry.</p><p><strong>User groups are encouraged to work together</strong> on the monthly puzzles. User group leaders should submit their group&rsquo;s best entry to Ed Wilson, the Scripting Guy, via e-mail, prior to the third Saturday of the month. On the last Saturday of the month, Ed will post his favorite, along with commentary and excerpts from noteworthy entries. The user group with the most &ldquo;favorite&rdquo; entries of the year will win a grand prize from PowerShell.org.</p><h2 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></h2><h2 id="our-puzzle" class="ps-heading"><strong>Our Puzzle</strong><a class="ps-heading-anchor" href="#our-puzzle" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>Write a one-liner that produces the following output (note that property values will be different from computer to computer; that’s fine). </p><p><code>PSComputerName ServicePackMajorVersion Version  BIOSSerial                                -------------- ----------------------- -------  ----------                                win81                                0 6.3.9600 VMware-56 4d 09 1 71 dd a9 d0 e6 46 9f</code>By definition, a one-liner is a single, long command or pipeline that you type, hitting Enter only at the very end. If it wraps to more than one physical line as you’re typing, that’s OK. But, in order to really test your skill with the parser, try to make your one-liner as short as technically possible while still running correctly.</p><p><strong>Challenges:</strong></p><p>•</p><p>Try to use no more than one semicolon total in the entire one-liner</p><p>•</p><p>Try not to use ForEach-Object or one of its aliases</p><p>•</p><p>Write the command so that it could target multiple computers (no error handling needed) if desired</p><p>•</p><p>Want to go obscure? Feel free to use aliases and whatever other shortcuts you want to produce a teeny-tiny one-liner.</p>]]></content:encoded></item><item><title>Want to Blog at PowerShell.org?</title><link>https://powershell.org/articles/2015-07-01-want-to-blog-at-powershell-org/</link><guid>https://powershell.org/articles/2015-07-01-want-to-blog-at-powershell-org/</guid><pubDate>Wed, 01 Jul 2015 22:16:52 +0000</pubDate><description>&lt;p&gt;PowerShell.org was never meant to be a small group of people doing good - it was meant to be a place where &lt;em&gt;all of us&lt;/em&gt; can do good for each other. And that&amp;rsquo;s why **everyone is invited to blog here. **&lt;br&gt;
Yup, even you.&lt;br&gt;
If you&amp;rsquo;d like blogging permissions added to your account, just e-mail webmaster@ with your site username, and we&amp;rsquo;ll make it so. Now, I do realize that a lot of folks would much rather blog in their own space, and that&amp;rsquo;s totally, 100% cool. But, if you&amp;rsquo;d like to blog here, we only have a few rules.&lt;/p&gt;</description><content:encoded>&lt;![CDATA[<p>PowerShell.org was never meant to be a small group of people doing good - it was meant to be a place where <em>all of us</em> can do good for each other. And that&rsquo;s why **everyone is invited to blog here. **<br>
Yup, even you.<br>
If you&rsquo;d like blogging permissions added to your account, just e-mail webmaster@ with your site username, and we&rsquo;ll make it so. Now, I do realize that a lot of folks would much rather blog in their own space, and that&rsquo;s totally, 100% cool. But, if you&rsquo;d like to blog here, we only have a few rules.</p><h2 id="your-content-is-your-content" class="ps-heading">Your Content is YOUR Content<a class="ps-heading-anchor" href="#your-content-is-your-content" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>If you ever decide you don&rsquo;t want to blog here anymore, we&rsquo;ll be happy to export your articles (in whatever form WordPress supports at the time) and give you that archive. You can then do whatever you want with your content.</p><h2 id="minimize-dupli-blogging" class="ps-heading">Minimize Dupli-Blogging<a class="ps-heading-anchor" href="#minimize-dupli-blogging" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>We ask that, if you post an article here, that you not also post it in a ton of other places. This isn&rsquo;t an &ldquo;exclusivity&rdquo; thing at all - it&rsquo;s that search engines like Google &ldquo;penalize&rdquo; sites for carrying duplicate content, and that would make it harder for people to find other resources that we offer here.<br>
That said, you&rsquo;re more than welcome to write a post elsewhere, and then write a shorter, &ldquo;introductory&rdquo; post here, pointing to your &ldquo;main&rdquo; article elsewhere. That&rsquo;s absolutely OK. We just ask that the shorter post you submit here be entirely original - that is, not just an excerpt of your longer post, but something uniquely written for this site. Again - that&rsquo;s just us trying to be square with the Goog.<br>
For example, you might write a quick &ldquo;tip&rdquo; article here that offers someone genuine learning value, and then point them to a longer article that includes additional, related material on your own site.</p><h2 id="thats-it" class="ps-heading">That&rsquo;s It<a class="ps-heading-anchor" href="#thats-it" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>PowerShell.org is meant to be a service to <em>you</em> and to the entire community. We get over 200,000 hits a month, so we&rsquo;re a pretty decent place for your writing to get more exposure - and to help more people. But we also want to be a respectful player in the community, so aside from the above ground rules, we really don&rsquo;t want to restrict you or ask you to do something that might not be good for _you. _</p><h2 id="well-also-this" class="ps-heading">Well, Also This<a class="ps-heading-anchor" href="#well-also-this" aria-label="Link to this section" title="Link to this section"><i class="fas fa-link" aria-hidden="true"/></a></h2><p>We&rsquo;ve also created some generic artwork that you can set as the &ldquo;Featured Image&rdquo; for your post. When your post is fresh, it&rsquo;ll cycle through the front page of PowerShell.org in the &ldquo;carousel&rdquo; at the top of the page. Having an image makes it a little sexier. Just click &ldquo;Set featured image&rdquo; and then choose one of the media items we&rsquo;ve provided. You&rsquo;ll find them in the Media Library from December 2015 (there&rsquo;s a drop-down list to filter to that month).<br>
We look forward to hearing from you!</p>
]]></content:encoded></item></channel></rss>