Skip to content

Instantly share code, notes, and snippets.

@jonforums
Created November 23, 2011 20:44
Show Gist options
  • Save jonforums/1389848 to your computer and use it in GitHub Desktop.
Save jonforums/1389848 to your computer and use it in GitHub Desktop.
Playing with chocolatey
1. set PowerShell's execution policies
## as admin
PS C:\Users\Jon> set-executionpolicy RemoteSigned -scope LocalMachine
## as normal user
PS C:\Users\Jon> set-executionpolicy Unrestricted -scope CurrentUser
PS C:\Users\Jon> get-executionpolicy -list
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Unrestricted
LocalMachine RemoteSigned
2. set (and check) chocolatey install directory via env var
PS C:\Users\Jon> ni -path env:ChocolateyInstall -value C:\Apps\Chocolatey
Name Value
---- -----
ChocolateyInstall C:\Apps\Chocolatey
PS C:\Users\Jon> ls env:ChocolateyInstall
Name Value
---- -----
ChocolateyInstall C:\Apps\Chocolatey
3. install chocolately
PS C:\Users\Jon> iex ((new-object net.webclient).DownloadString("http://bit.ly/psChocInstall"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment