Giter VIP home page Giter VIP logo

boxstarter's Introduction

Boxstarter

Boxstarter setup script for setting up a customized windows environment in a completely unattended manner using PowerShell and Chocolatey packages.

How To Use

Open an elevated PowerShell console and run the following command:

PS > Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1"; &Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('<Profile>') -options @('<Option>') }

I have setup different profile which can be installed separately or not. For the full list, look in the profile folder.

However, if you want to launch your own script (from gist) and take benefit of my premade function then run the following command

PS > Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1"; &Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -Scripts @('<YourScript>') }

Examples

  1. Deploy the Essential profile.
PS > Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1"; &Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('Essential') }
  1. Deploy the Essential profile without windows updates.
PS > Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1"; &Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('Essential') -options @('Boxstarter::WindowsUpdate=false') }
  1. Deploy the Essential and DevCore profiles without windows updates and visual studio code default extentensions.
PS > Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1"; &Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('Essential', 'DevCore') -options @('Boxstarter::WindowsUpdate=false', 'Boxstarter::DevCore::VisualStudioCodeExtensions=false') }
  1. Deploy your own boxstarter script.
PS > Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1"; &Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -Scripts @('https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/example/gist/MyGist.ps1') }

Troubleshooting

If you are behind a proxy, you may be unable to execute boxstarter.

Then you have few options to get it working:

  1. Using default proxy credential
PS > $webclient = New-Object System.Net.WebClient
PS > $webclient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
PS > wget -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('<Profile>') -options @('<Option>') }
  1. Using basic authentication
PS > $user = "Domaine\username"
PS > $pass= "password"
PS > $headers = @{ Authorization = "Basic {0}" -f [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $($user),$($pass)))) }
PS > wget -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -Headers $headers -OutFile "$($env:temp)\boxstarter.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('<Profile>') -options @('<Option>') }
  1. Using credential
PS > $user = "Domaine\username"
PS > $pass= "password"
PS > $credential = New-Object System.Management.Automation.PSCredential($user, (ConvertTo-SecureString $pass -AsPlainText -Force))
PS > wget -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -Credential $credential -OutFile "$($env:temp)\boxstarter.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('<Profile>') -options @('<Option>') }
  1. Using proxy credential
PS > $user = "Domaine\username"
PS > $pass= "password"
PS > $credential = New-Object System.Management.Automation.PSCredential($user, (ConvertTo-SecureString $pass -AsPlainText -Force))
PS > $webclient = New-Object System.Net.WebClient
PS > $webclient.Proxy.Credentials = $credential
PS > wget -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('<Profile>') -options @('<Option>') }
  1. Defining your proxy settings
PS > $user="Domaine\username"
PS > $pass="password"
PS > $webProxy = New-Object System.Net.WebProxy("http://your.webproxy:8080",$true)
PS > $webclient = New-Object System.Net.webclient
PS > $webclient.Proxy=$webproxy
PS > $webclient.proxy.Credentials = New-Object System.Net.NetworkCredential($user, $pass)
PS > wget -Uri 'https://raw.githubusercontent.com/AbsCoDes/boxstarter/master/boxstarter.ps1' -OutFile "$($env:temp)\boxstarter.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\boxstarter.ps1" -profiles @('<Profile>') -options @('<Option>') }

Real life example

Look at the scripts in the example folder to find real examples.

boxstarter's People

Contributors

gennesseaux avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.