My little secret : Windows PowerShell OneGet

This week, at BUILD, Microsoft will be showing previews of a few technologies that we’ve been working on.  Simultaneously, we will be releasing a preview of the next version of WMF (Windows Management Frameworks — where PowerShell comes from!) on the download center (get the WMF 5.0 Preview).  
I’ve been squirreled away working on a new project which is shipping as part of PowerShell — OneGet
OneGet is a unified interface to package management systems and aims to make Software Discovery, Installation and Inventory (SDII) work via a common set of cmdlets (and eventually a set of APIs). Regardless of the installation technology underneath, users can use these common cmdlets to install/uninstall packages, add/remove/query package repositories, and query a system for the software installed. Included in this CTP is a prototype implementation of a Chocolatey-compatible package manager that can install existing Chocolatey packages.
Keep in mind this is a CTP, and things may be a bit rough around the edges. As we move forward we’ll provide more details around our future plans, including how to write plugins to let other package managers work through the same interface.  
While the source code isn’t yet available, we’ve started a project on Codeplex where you can at least file bugs and we can start filling in the documentation… 
Some Quick Examples:

PS C:\> getcommand Module OneGet
CommandType     Name                                 ModuleName
———–     —-                                 ———-
Cmdlet          AddPackageSource                    OneGet
Cmdlet          FindPackage                         OneGet
Cmdlet          GetPackage                          OneGet
Cmdlet          GetPackageSource                    OneGet
Cmdlet          InstallPackage                      OneGet
Cmdlet          RemovePackageSource                 OneGet
Cmdlet          UninstallPackage                    OneGet
# get a list of registered package sources
PS C:\> Get-PackageSource
Name         Location                      Provider     IsTrusted
—-         ——–                      ——–     ———
chocolatey  Chocolatey   False
# Let’s go look for some packages.
PS C:\> find-package Name zoomit AllVersions
Name         Version     Status      Source        Summary                                                    
—-         ——-     ——      ——         ——-                                                     
zoomit       4.42        Available   chocolatey     ZoomIt is screen zoom and… 
zoomit       4.5         Available   chocolatey     ZoomIt is a screen zoom and…
zoomit       4.50        Available   chocolatey     ZoomIt is a screen zoom and…
# Install a package
PS C:\> Install-Package name zoomit
Name           Version     Status      Source        Summary                                                    
—-           ——-     ——      ——         ——-                                                     
zoomit         4.50        Installed   chocolatey     ZoomIt is ascreen zoom and…
# Show what packages are installed
PS C:\> Get-Package
Name           Version     Status       Source        Summary                                                    
—-           ——-     ——       ——         ——-                                                    
cygget        1.1.1       Installed    Local File     A utility toinstall Cygwin…
zoomit         4.50        Installed    Local File     ZoomIt is ascreen zoom and…
# another way to show it.
PS C:\> get-package |format-table status,name,Version -AutoSize
Status    Name    Version
——    —-    ——-
Installed cygget 1.1.1
Installed zoomit  4.50 
Comments (0)