https://chocolatey.org/install
First, ensure that you are using an administrative shell - you can also install as a non-admin, check out Non-Administrative Installation.
Install with powershell.exe
NOTE: Please inspect https://chocolatey.org/install.ps1 prior to running any of these scripts to ensure safety. We already know it's safe, but you should verify the security and contents of any script from the internet you are not familiar with. All of these scripts download a remote PowerShell script and execute it on your machine. We take security very seriously. Learn more about our security protocols.
With PowerShell, you must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.
Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
Now run the following command:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Paste the copied text into your shell and press Enter.
Wait a few seconds for the command to complete.
If you don't see any errors, you are ready to use Chocolatey! Type choco or choco -? now, or see Getting Started for usage instructions.
执行安装choro
查看版本
搜索包名:
安装包
测试OK
Chocolatey用法:命令
search – 搜索包 choco search something
list – 列出包 choco list -lo
install – 安装 choco install baretail
pin – 固定包的版本,防止包被升级 choco pin windirstat
upgrade – 安装包的升级 choco upgrade baretail
uninstall – 安装包的卸载 choco uninstall baretail
安装Ruby Gem – choco install compass -source ruby
安装Python Egg – choco install sphynx -source python
安装IIS服务器特性 – choco install IIS -source windowsfeatures
安装Webpi特性 – choco install IIS7.5Express -source webpi常用的一些命令
列出本地已安装的包 :choco list –local-only
列出Windows系统已安装的软件:choco list -li OR choco list -lai
升级所有已安装的包:choco upgrade all -y
mysql安装:choco install mysql -y
maven安装:choco install maven
升级maven:choco upgrade maven
java安装 : choco install jdk7,choco install jdk8
参考:https://my.oschina.net/liuzidong/blog/2962146