Exploring Windows Management Framework 5.0 May 2014 Preview

The Windows Management Framework 5.0 Preview was released in early April, and an update to it was posted during Microsoft TechEd in May. Some major things are changing with PowerShell; the main one being that new versions of PowerShell are not going to be tied to major OS releases. PowerShell will be released as it is ready, and then added into the OS for the latest version.

Two of the major changes with PowerShell v5.0 include two new modules; the OneGet Module and the PowerShellGet Module. In this blog post we are going to explore some of the basics for these modules. If you would like to play with the Windows Management Framework 5.0, if can be downloaded from the Microsoft Download Center. Please note that this is preview code and should not be used in production. You are using this at your own risk and I strongly encourage testing it on the VM until the final code is released.

Please note that this is just a very quick overview of the modules and we will dive into more depth on them in upcoming blog posts.

psv5

 

PowerShell OneGet Module:

The PowerShell OneGet Module was available in the April preview of the WMF 5.0. The OneGet Module is used as a method to obtain software in an automated fashion; very similar to YUM (Yellowdog Updated, Modified) or APT-GET (Advanced Packaging Tool) that you would have used while working with Linux distributions. While in a Windows World you may have worked with the Chocolatey Gallery which is a NuGet based package installer.

I personally have been using Chocolatey for about a year now, and I am very excited to see OneGet coming along. It is even more exciting to see that Microsoft isn’t just ignoring the existence of Chocolatey, they are using it as their first publicly available software repository.

The Cmdlet’s:

Currently detailed Help documents do not exist for the below cmdlets. I’ve provided a quick summary of what these cmdlets can do from what I’ve gathered by analyzing the parameters available with them.

OneGetCmdlets

Add-PackageSource

Add-PackageSource will add additional sources outside of the default ones provided with PowerShell OneGet. The below parameters are available.

add-packagesource

Find-Package

Fine-Package will perform a search of multiple Package Sources with ability to filter by Version, Name, Provider, and Source. On top of the parameters that the Get-help returns it also has additional Parameters in including…

  • AllowPrereleaseVersions
  • AllVersions
  • LocalOnly
  • Hint
  • LeavePartialPackageInstalled

find-package

Get-Package

Get-Package will return a list of all packages currently installed with a few parameters you can use to filter the results a bit.

get-package

Get-PackageSource

Get-PackageSource will return a list of PackageSource repositories that you have setup with OneGet. It includes some minor filtering parameters you can use.

Get-PackageSource

Install-Package

This is one of the more self explanatory cmdlets included with the OneGet Module. This will install a package that you specify or multiple packages that you specify. This cmdlet includes quite a few parameters that you can use to filter for where you want the package installed from all the way down to exactly which version of the package you want installed.

Install-Package

Remove-PackageSource

Remove-PackageSource is used to remove package repositories that have been added to your OneGet Module.

Remove-PackageSource

Uninstall-Package

Another fairly self explanatory cmdlet. This will uninstall a package that you have previously installed using OneGet.

Uninstall-Package

PowerShellGet Module:

The PowerShellGet Module is new in the May preview and is similar to OneGet in the manor that it will automatically download files for you and place them in the correct folder. The big difference between OneGet and PowerShellGet is that PowerShellGet is used to download PowerShell Modules from a trusted repository hosted by Microsoft. Currently there isn’t much in the repository, only 62 modules with 18 of them being experimental currently.

The Cmdlet’s:

The nice thing about the PowerShellGet Module is that a lot of the help is already available if you run an Update-Help. The Module includes only 4 cmdlets, but that is all it really needs.

PowerShellGetCmdlets

Find-Module

Find-Module

Install-Module

Install-Module

Publish-Module

Publish-Module

Update-Module

Update-Module

Be Sociable, Share!
  1. Jeffrey Snover[MSFT]

    I hope you like the interface we put on the Chocolately repository.

    Jeffrey Snover[MSFT]
    Distinguished Engineer

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">