Use this script to bootstrap an install of Scoop regardless of your version of Powershell
To use run this from Powershell:
iex (new-object net.webclient).downloadstring('http://bit.ly/1ECcuEn')
| try { | |
| "Checking powershell version..." | |
| # get psversion | |
| $psversion = $psversiontable.psversion.major | |
| if($psversion -lt 3) { | |
| # update powershell using chocolatey | |
| "Your Powershell is too old, we need to update it." | |
| iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
| choco install powershell -version 4.0.20141001 | |
| "#################################" | |
| "# POWERSHELL HAS BEEN UPDATED #" | |
| "# A REBOOT IS REQUIRED #" | |
| "# RUN THIS AGAIN #" | |
| "# AFTER REBOOTING #" | |
| "#################################" | |
| } | |
| else { | |
| "Powershell is up-to-date." | |
| "Installing Scoop..." | |
| iex (new-object net.webclient).downloadstring('https://get.scoop.sh') | |
| } | |
| } | |
| finally { | |
| read-host "Press enter to continue..." | |
| } |