都说 Linux 下装软件方便,APT、YUM 一个命名就能搞定,如今 Windows 10 也在 PowerShell 下提供了一个很是方便的包管理系统 OneGet。git
powershellPS > (Get-Command -Module OneGet).Name Find-Package Get-Package Get-PackageProvider Get-PackageSource Install-Package Register-PackageSource Save-Package Set-PackageSource Uninstall-Package Unregister-PackageSource
虽然如今 OneGet 还只能从 Nuget、Chocolatey 和 PSGallery 这几个源中安装软件包,但相信将来会有更多安装源可用。github
powershellPS > Get-PackageSource | ft name,location -autosize Name Location ---- -------- nuget.org https://www.nuget.org/api/v2/ chocolatey http://chocolatey.org/api/v2/ PSGallery https://www.powershellgallery.com/api/v2/
Get-PackageProvider
显示了 OneGet 如今支持的几种软件包提供形式。shell
ARP msi NuGet Chocolatey PSModule
Get-Package
能显示本机安装的全部软件包,带上名字参数能显示具体的软件包信息。api
Find-Package
用名字来寻找安装源中是否存在相应的软件包。ide
Install-Package
、Unstall-Package
都只须要提供包名就能完成相应的操做,而 Save-Package
只会下载包而不当即安装。code
Register-PackageSource
、Unregister-PackageSource
用来添加、删除安装源,Set-PackageSource
用来修改安装源的设置。get
虽然 OneGet 如今还有不少不完善的地方,但其野心倒是至关的大!it
List of desired package manager plugins for OneGetio
看样子是要把 Windows 下全部的软件都管起来!软件