Monday, June 16, 2014

PowerShell OData Provider for OneGet and PowerShellGet

PowerShellGet and OneGet are two new technologies that Microsoft is introducing with PowerShell. In essence, OneGet enables you to find, install, and then use 'packages' from various package repositories (public and private). PowerShellGet enables you to find, install, and  then use PowerShell Modules. These technologies are baked into PowerShell V5 preview releases and presumably will be part of PowerShell V5 when that finally ships. The repositories include places like Chocolatey, and a new repository for PowerShellGet, the PowerShell Repository (Https://msconfiggallery.cloudapp.net). The latter is a repository that is hosted on Azure.

There is some similarity between these two technologies in that both use Open Data Protocol (OData) to access and use the repositories. Stefan Stranger has just published a cool article showing how to use Odata to query for the repositories using OData.  Stefan points out an Odata Profider, over on CodePlex. This provider enables you to access the various repositories using your normal DIR/CD cmdlets (well aliases!), like this (and click the graphic to see a bigger version!):

image

One nice touch to the Odata provider module – it comes with ah about_OData_Query help file that provides more information about the Odata provider. ALL add-in modules should do this.

No comments: