Code Monkey home page Code Monkey logo

boxstarter's Introduction

Automated Windows PC Setup

A script for setting up a Windows PC using BoxStarter and Chocolatey.

This script is based on my original gist and neutmute script's

How To Use

There are a few options for launching a BoxStarter script check out the offical documentation for all the various methods. We'll focus on two methods - manual and bootstrapper.

Bootstrapper

The Bootstrapper method is the recommended way to run this script. Simply open a evelated powershell console and run the following command

> wget -Uri 'https://raw.githubusercontent.com/JonCubed/boxstarter/master/bootstrap.ps1' -OutFile "$($env:temp)\bootstrap.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\bootstrap.ps1" <arguments> }

You can remove <arguments> or replace it with one or more argument lists below

Argument Type Requires Value Description
InstallDev Switch Configures machine for development and install development apps
InstallHome Switch Configures machine for home and install home apps
SkipWindowsUpdate Switch Skips running windows update
DataDrive Char Drive letter to move data too. Defaults to System Drive
SourceCodeFolder String InstallDev Relative or Absolute path to source code folder. If relative will use Data Drive value
EnableWindowsAuthFeature Switch InstallDev Enable Windows Authentication in IIS
SqlServer2016IsoImage String InstallDev Absolute path to Sql Server 2016 ISO
SqlServer2014IsoImage String InstallDev Absolute path to Sql Server 2014 ISO

Examples

  1. Setup a development box without windows update
> wget -Uri 'https://raw.githubusercontent.com/JonCubed/boxstarter/master/bootstrap.ps1' -OutFile "$($env:temp)\bootstrap.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\bootstrap.ps1" -InstallDev -SkipWindowsUpdate }
  1. Setup a development box, move windows libraries and source code folder to another drive
> wget -Uri 'https://raw.githubusercontent.com/JonCubed/boxstarter/master/bootstrap.ps1' -OutFile "$($env:temp)\bootstrap.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\bootstrap.ps1" -InstallDev -DataDrive 'D' -SourceCodeFolder '/source' }
  1. Setup a development box with sql server 2016
> wget -Uri 'https://raw.githubusercontent.com/JonCubed/boxstarter/master/bootstrap.ps1' -OutFile "$($env:temp)\bootstrap.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\bootstrap.ps1" -InstallDev -SqlServer2016IsoImage 'D:/temp/en_sql_server_2016_developer_x64_dvd_8777069.iso' }
  1. Setup a development box with sql server 2014
> wget -Uri 'https://raw.githubusercontent.com/JonCubed/boxstarter/master/bootstrap.ps1' -OutFile "$($env:temp)\bootstrap.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\bootstrap.ps1" -InstallDev -SqlServer2014IsoImage 'D:/temp/en_sql_server_2014_developer_x64_dvd_8777069.iso' }
  1. Setup a home box
> wget -Uri 'https://raw.githubusercontent.com/JonCubed/boxstarter/master/bootstrap.ps1' -OutFile "$($env:temp)\bootstrap.ps1";&Invoke-Command -ScriptBlock { &"$($env:temp)\bootstrap.ps1" -InstallHome }

Manual

If you want more control over what is happening you can manually run the script.

  1. You must first setup environment keys for the features you would like to install.

    Key Value Requires Value Description
    BoxStarter:InstallDev 1 Configures machine for development and install development apps
    BoxStarter:InstallHome 1 Configures machine for home and install home apps
    BoxStarter:SkipWindowsUpdate 1 Skips running windows update
    BoxStarter:DataDrive Char Drive letter to move data too. Defaults to System Drive
    BoxStarter:SourceCodeFolder String BoxStarter:InstallDev Relative or Absolute path to source code folder. If relative will use Data Drive value
    BoxStarter:EnableWindowsAuthFeature 1 BoxStarter:InstallDev Enable Windows Authentication in IIS
    choco:sqlserver2016:isoImage String BoxStarter:InstallDev Absolute path to Sql Server 2016 ISO
    choco:sqlserver2014:isoImage String BoxStarter:InstallDev Absolute path to Sql Server 2014 ISO

    Environment variables must be added to Machine and Process scopes

  2. Run the following command

    • In Command prompt or Powershell
    > START http://boxstarter.org/package/nr/url?http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/JonCubed/boxstarter/master/box.ps1
  • In Edge Or Internet Explorer, go to

    http://boxstarter.org/package/nr/url?http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/JonCubed/boxstarter/master/box.ps1

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.