Skip to content

Latest commit

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

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

ArgumentTypeRequiresValue Description
InstallDevSwitchConfigures machine for development and install development apps
InstallHomeSwitchConfigures machine for home and install home apps
SkipWindowsUpdateSwitchSkips running windows update
DataDriveCharDrive letter to move data too. Defaults to System Drive
SourceCodeFolderStringInstallDevRelative or Absolute path to source code folder. If relative will use Data Drive value (default value /sourcecode
EnableWindowsAuthFeatureSwitchInstallDevEnable Windows Authentication in IIS
InstallVS2017CommunitySwitchInstallDevInstall Visual Studio 2017 Community edition
InstallVS2017EnterpriseSwitchInstallDevInstall Visual Studio 2017 Enterprise edition
CustomiseFoldersSwitchCustomise Folder locations and disk names
SqlServer2016IsoImageStringInstallDevAbsolute path to Sql Server 2016 ISO
SqlServer2014IsoImageStringInstallDevAbsolute 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 -InstallVS2017Enterprise -SkipWindowsUpdate }
  2. 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 -InstallVS2017Community -CustomiseFolders -DataDrive 'D'-SourceCodeFolder '/source' }
  3. 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 -InstallVS2017Enterprise -SqlServer2016IsoImage 'D:/temp/en_sql_server_2016_developer_x64_dvd_8777069.iso' }
  4. 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 -InstallVS2017Community -SqlServer2014IsoImage 'D:/temp/en_sql_server_2014_developer_x64_dvd_8777069.iso' }
  5. 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.

    KeyValueRequiresValue Description
    BoxStarter:InstallDev1Configures machine for development and install development apps
    BoxStarter:InstallHome1Configures machine for home and install home apps
    BoxStarter:SkipWindowsUpdate1Skips running windows update
    BoxStarter:DataDriveCharDrive letter to move data too. Defaults to System Drive
    BoxStarter:SourceCodeFolderStringBoxStarter:InstallDevRelative or Absolute path to source code folder. If relative will use Data Drive value
    BoxStarter:EnableWindowsAuthFeature1BoxStarter:InstallDevEnable Windows Authentication in IIS
    BoxStarter:CustomiseFolders1Customise Folder locations and disk names
    BoxStarter:InstallVS2017Community1Install Visual Studio 2017 Community edition
    BoxStarter:InstallVS2017Enterprise1Install Visual Studio 2017 Enterprise edition
    choco:sqlserver2016:isoImageStringBoxStarter:InstallDevAbsolute path to Sql Server 2016 ISO
    choco:sqlserver2014:isoImageStringBoxStarter:InstallDevAbsolute 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

About

BoxStarter box scripts

Resources

Stars

21 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages