About PackageManagement and PowerShellGet

New versions of Windows server and client operating systems i.e. windows 10 and windows server 2012 R2 or higher, contains a new feature named as PackageManagement. This should be of particular importance to DevOps folks as it intends to simplify their lives.

Why PackageManagement Feature?

DevOps folks can come with reasons like why do they require another tool in the wild when they already have a choice like chef, puppet etc. The truth is that PackageManagement is not a tool but it intends to be a platform which can then be leveraged by other existing tools. You can think of this as an interface between end users and the software providers. Its actual purpose is to bring together a diverse set of installers, package services, and inventory schemes under a set of unified APIs and PowerShell cmdlets.  Rather than having end-users understand the complexity and diversity behind each package manager, this allows users to simple consume packages in a common way.

What is PackageManegement (or OneGet)?

PackageManagement (formerly known as OneGet) is essentially a package management aggregator or what they call package-manager-manager.  It creates a unified and consistent PowerShell interface for end-users and provides a plug-in model at the back end that different installer technologies or package managers can plug-in as providers, using PackageManagement APIs.  Each provider further manages one or multiple package sources (repositories) where software packages are stored. This can more be understood from below diagram:

PackageManagement Architecture
PackageManagement Architecture

What is PowerShellGet then?

PowerShellGet is a module that defines an extension for PackageManagement (a provider called PSModule) that allows PackageManagement to manage PowerShell modules as software packages.  PowerShellGet also defines PowerShell commands that wrap the native PackageManagement PowerShell commands to provide a focused interface for PowerShell centric package management. This provider was developed at the same time as OneGet, is fundamental to PowerShell going forward, and is included with OneGet (now PackageManagement). PowerShellGet can be accessed by the standard set of OneGet cmdlets, as well as thru its own cmdlets (i.e., Find-Module, Install-Module, etc.).

What does it install on my box?

PackageManagement delegates all installation operations to the installed package provider plugins. However it does include a very minimal set of package providers. This minimum set includes:

  • a Bootstrap provider (the provider that knows where to get more providers from)
  • an MSI provider for handling MSI files
  • an MSU provider for handling Microsoft update files
  • an Programs provider (Add/Remove programs) for providing inventory data of anything that registered itself with Add/Remove programs
  • PowerShellGet — for accessing PowerShell modules.

In next few posts, we’ll see how to get started with these cool new features.

3 thoughts on “About PackageManagement and PowerShellGet

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