PowerShell version 7 is currently in preview and while it can be installed on Windows, Linux, and macOS, the examples shown in this blog article focus on installing it on a Windows based system, specifically Windows 10 using Windows PowerShell version 5 or higher which ships by default with Windows 10. Your mileage may vary with other operating systems, other versions of Windows, and/or other versions of Windows PowerShell. The easiest way that I’ve found to install the preview of PowerShell version 7 is to first install Jeff Hicks' PSReleaseTools PowerShell module from the PowerShell Gallery using Windows PowerShell.
By now, I’m sure you’ve heard about The PowerShell Conference Book. If not, see my previous blog article. The PowerShell Conference Book is currently the featured book on Leanpub. It’s also the number one best seller on Leanpub. And the top book on Leanpub. The book was published last Friday, July 6th with nine of the thirty-three chapters and we’ve added an additional six chapters since then. I would like to thank everyone who has purchased the book so far.
A couple of months ago, I saw a tweet from Don Jones about how much it costs to sponsor one person for the OnRamp Scholarship Program. I replied wanting to know if the DevOps Collective had considered becoming part of the Leanpub for Causes program so that portions of an author’s royalties could be donated to the program. My initial thought was that I could donate a portion of the royalties from my PowerShell 101 book to the program.
Last week, I received a comment on my previous blog article from fellow Microsoft MVP Joel Bennett which referenced using an ErrorMessage parameter similar to how ValidatePattern works in PowerShell Core version 6. I knew I’d seen some discussion about this on GitHub, but I wasn’t aware that it had made it into the production release. Joel’s message is shown in the following image. I had to figure out how to use custom error messages with ValidatePattern.
You’ve decided to install PowerShell Core on your Windows system. First of all, keep in mind that PowerShell Core version 6.0 is not an upgrade or replacement to Windows PowerShell version 5.1. It installs side by side on Windows systems. Being aware of this makes what is shown in this blog article make more sense, otherwise it can be confusing. Based on the response to a tweet of mine from Don Jones, it appears that I’m not the only one who thought PowerShell Core should have been version 1.