PowerShell V5 (WMF 5.0) Preview: OneGet and PowerShellGet

The most recent Windows Management Framework (WMF) 5.0 Preview, the November 2014 preview, provides a glimpse of many improvements you can expect when PowerShell V5 is released.

A couple of the most noticeable additions are OneGet and PowerShellGet. If you have experience in *nix, these two new features are very similar to apt-get or yum or RPM. It allows you to connect to web-based package repositories, and install them.

You can start using OneGet by importing it first (or just let your module autoloading do the work):

Import-Module –Name OneGet

OneGet currently allows you to browse through and install packages from the Chocolatey repository.

To get a list of packages you can install from Chocolatey, you can use the following:

Find-Package –Source Chocolatey

And to install, for example, the MagicDisk package:

Find-Package -Name MagicDisc | Install-Package

Probably a little bit confusing why there are “two” features. PowerShell MVP Kirk Munro explains these two very well in his blog post for the MVP Award Program. To summarize his points:

  • In the next Windows and WMF version, there will be a component called OneGet which will be the package management component
  • There will be a series of PowerShell cmdlets around the OneGet component, which we will simply call the OneGet cmdlets
  • PowerShellGet is another layer on top of the OneGet cmdlets, basically a wrapper for it, which provides more PowerShell-specific package management. Specifically this allows you to discover and install PowerShell modules, and register and manage PSRepository.

There you go. This is one of many features that are coming your way when PowerShell V5 comes around!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s