PowerShell Version 5

New Modules, Cmdlets, & Parameters in PowerShell Version 5

Think keeping up with the changes between major versions of PowerShell is difficult? Well just try keeping up with the changes that are added and removed in preview versions. The following is a list of the new modules, cmdlets, and parameters that have been added so far in PowerShell version 5 grouped by the different preview releases. Windows Technical Preview Enterprise Edition (Windows 10) PowerShell Version 5 Build 9879

PowerShell Version 5 New Feature: New Parameters added to the New-DscCheckSum and Test-DscConfiguration Cmdlets

I’m continuing on my series of blog articles on the new features in the preview version of PowerShell version 5. Today I’ll be discussing the existing DSC (Desired State Configuration) cmdlets in PowerShell version 4 that now have new parameters as of the May 2014 preview version of PowerShell version 5. To begin, I’ll define a DSC configuration that’s parameterized so that it’s reusable: configuration iSCSI { param ( [Parameter(Mandatory)] [string[]]$ComputerName ) node $ComputerName { WindowsFeature MultipathIO { Name = 'Multipath-IO' Ensure = 'Present' } Service iSCSIService { Name = 'MSiSCSI' StartupType = 'Automatic' State = 'Running' } } } Run the configuration specifying the computer names to create MOF files for:

PowerShell Version 5 New Feature: SkipLast Parameter added to Select-Object

I’m picking up where I left off in my last blog articleon the new features in the PowerShell version 5 preview. Today I be covering a new parameter, SkipLast that has been added to the Select-Object cmdlet. I have a text file where I saved a list of the available packages in the default OneGet Chocolatey repository. There are a total of 1893 items in this file: (Get-Content -Path C:\demo\packages.txt).count I’ll use the new SkipLast parameter to skip the last 1885 items:

I’m Speaking on the New Features in PowerShell version 5 (Preview) at ATL TechStravaganza 2014

I’ve been home for a couple of hours now from the PowerShell Summit North America 2014which was in the Seattle Washington area earlier this week and my brain is about to explode from all of the PowerShell awesomeness that I learned about. There will be many blog articles to follow on those subjects, but I wanted to let my readers know that I’ll be speaking at the ATL TechStravaganza 2014in Atlanta Georgia on Friday, June 6th.

Exploring the Find-Package Cmdlet from the PowerShell version 5 Preview OneGet Module

While presenting on the OneGet Module in the preview version of PowerShell version 5 for the Mississippi PowerShell User Grouplast week I discovered a couple of things about the Find-Package cmdlet that I wanted to share. The first thing is wildcards don’t work with the name parameter: Find-Package -Name *Java* That’s seems to be because they’re already performing a wildcard search as I’ll search for ‘Java’ in the following example and notice that none of the packages are that exact name.

Return an Error Message from a Remote Computer when an Attempt to Install a Package using the OneGet Module Fails

This blog article will walk you through the issue of the OneGet module not returning an error message when an attempt to install a package fails on a remote computer via the Install-Package cmdlet and PowerShell remoting. Attempting to install a package such as WireShark on a remote computer gives you a quick flash across the screen that’s too quick to read and then it gives your prompt back with no errors and no feedback about whether or not the package was installed:

Getting Installed Packages InSync Across Multiple Machines with the PowerShell version 5 Preview OneGet Module

I presented a session for the Mississippi PowerShell User Groupa couple of days ago and I thought I would share a couple of things I showed during that presentation that I hadn’t previously blogged about. I’m starting where I left off during my last blog article about the OneGet modulein the PowerShell version 5 preview. I’ve stored the names of the packages that are installed on the local computer (PC03) in a variable named Software and created PSSessions to three remote computers (PC04, PC05, and PC06).

Using the PowerShell version 5 Preview OneGet Module with PowerShell Remoting

I’m picking up where I left off in my last blog article. Adobe Reader, ImgBurn, and WinRAR have been installed on a Windows 8.1 Enterprise edition computer named PC03. All of the examples shown in this blog article are being run from the PC03 computer. I’ll use a little trick I showed you a few blog articles ago and store the names of the installed packages in a variable and return them at the same time, all in a one-liner:

Installing Software with the OneGet Module in PowerShell version 5

As referenced in my previous blog article, a preview version of PowerShell version 5 was released last week. One of the new modules is named “OneGet” which contains a number of new PowerShell cmdlets: Get-Command -Module OneGet There’s only limited help available for these cmdlets since attempting to update the help fails for the two new modules that are part of the PowerShell version 5 preview: Update-Help Update-Help : Failed to update Help for the module(s) ‘NetworkSwitch, OneGet’ with UI culture(s) {en-US} : For security reasons DTD is prohibited in this XML document.

How to Install the Preview Version of PowerShell Version 5

The Windows Management Framework v5 Previewwas announced and released a few days ago (on April 3, 2014) which includes a preview version of PowerShell version 5. Be sure to read through the System Requirements on the actual download pagebefore attempting to install this preview version because it’s not recommended to be installed at this time on systems with certain software installed such as Exchange Server 2007. I didn’t see this stated on the download page and I think it goes without saying, but I wouldn’t recommend installing this preview version in a production environment.