Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Will's Dev Boxstarter Script
# Invoke using following syntax into IE:
# http://boxstarter.org/package/url?[raw link to this gist]
try {
# Boxstarter options
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false # Is this a machine with no logon password?
$Boxstarter.AutoLogin=$true
# Set Windows variables
Enable-RemoteDesktop
Set-WindowsExplorerOptions -enableshowFileExtensions -enableshowProtectedOSFiles
Set-StartScreenOptions -EnableBootToDesktop
Disable-UAC
Disable-InternetExplorerESC
Update-ExecutionPolicy Unrestricted
cinst TelnetClient -source windowsFeatures
# Setting Time Zone
Write-BoxstarterMessage "Setting time zone to Central Standard Time"
& C:\Windows\system32\tzutil /s "Central Standard Time"
# Set Windows power options
Write-BoxstarterMessage "Setting Standby Timeout to Never"
powercfg -change -standby-timeout-ac 0
powercfg -change -standby-timeout-dc 0
Write-BoxstarterMessage "Setting Monitor Timeout to 20 minutes"
powercfg -change -monitor-timeout-ac 20
powercfg -change -monitor-timeout-dc 20
Write-BoxstarterMessage "Setting Disk Timeout to Never"
powercfg -change -disk-timeout-ac 0
powercfg -change -disk-timeout-dc 0
# AC lid close action (do nothing)
powercfg -setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 0
# DC lid close action (sleep)
powercfg -setdcvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 4f971e89-eebd-4455-a8de-9e59040e7347 5ca83367-6e45-459f-a27b-476b1d01c936 1
Write-BoxstarterMessage "Turning off Windows Hibernation"
powercfg -h off
# Install .NET
cinst -y dotnet3.5
cinst -y dotnet4.5.1
cinst -y dotnet4.5.2
cinst -y netfx-4.5.2-devpack
# Install Browsers
cinst -y googlechrome
cinst -y adblockpluschrome
cinst -y firefox
cinst -y flashplayerplugin
# Install Visual Studio
cinst -y VisualStudio2013Ultimate -InstallArguments "/Features:'WebTools SQL'"
# cinst -y VisualStudio2013Professional -InstallArguments WebTools
# Development Add ons
cinst -y vs2013.4
cinst -y resharper
# cinst resharper -Version 8.2.3000.5176 # we don't have licenses for v9 yet
cinst -y ncrunch2.vs2013
cinst -y fiddler4
cinst -y wireshark
#MVC 4??
#cinst -y aspnetmvc4.install
# Visual Studio Plugins
cinst -y ihateregions
cinst -y nunit
cinst -y visualstudio2013-webessentials.vsix
Install-ChocolateyVsixPackage StopOnFirstBuildError http://visualstudiogallery.msdn.microsoft.com/91aaa139-5d3c-43a7-b39f-369196a84fa5/file/44205/3/StopOnFirstBuildError.vsix
Install-ChocolateyVsixPackage AttachToAny https://visualstudiogallery.msdn.microsoft.com/81677d17-6e81-4f14-87cc-4ccee2fd2589/file/121484/5/AttachToAny.vsix
# Install Other software
cinst -y sublimetext3
cinst -y skype
cinst -y paint.net
cinst -y linqpad4
cinst -y 7zip.install
# File associations\
Install-ChocolateyFileAssociation ".txt" "$env:programfiles\Sublime Text 3\sublime_text.exe"
Install-ChocolateyFileAssociation ".xml" "$env:programfiles\Sublime Text 3\sublime_text.exe"
Install-ChocolateyFileAssociation ".config" "$env:programfiles\Sublime Text 3\sublime_text.exe"
# Icons in task bar
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Google\Chrome\Application\chrome.exe"
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"
# Scaffold out folder system
# C:\Work
if (!(Test-Path -Path C:\Work )) {
mkdir C:\Work
}
# enable IIS features
cinst IIS-WebServerRole -source windowsfeatures
cinst IIS-WebServer -source windowsfeatures
cinst IIS-CommonHttpFeatures -source windowsfeatures
cinst IIS-ApplicationDevelopment -source windowsfeatures
cinst IIS-Security -source windowsfeatures
cinst IIS-URLAuthorization -source windowsfeatures
cinst IIS-RequestFiltering -source windowsfeatures
cinst IIS-NetFxExtensibility -source windowsfeatures
cinst IIS-HealthAndDiagnostics -source windowsfeatures
cinst IIS-HttpLogging -source windowsfeatures
cinst IIS-LoggingLibraries -source windowsfeatures
cinst IIS-RequestMonitor -source windowsfeatures
cinst IIS-HttpTracing -source windowsfeatures
cinst IIS-IPSecurity -source windowsfeatures
cinst IIS-Performance -source windowsfeatures
cinst IIS-WebServerManagementTools -source windowsfeatures
cinst IIS-IIS6ManagementCompatibility -source windowsfeatures
cinst IIS-Metabase -source windowsfeatures
cinst IIS-ISAPIExtensions -source windowsfeatures
cinst IIS-ISAPIFilter -source windowsfeatures
cinst IIS-BasicAuthentication -source windowsfeatures
cinst IIS-WindowsAuthentication -source windowsfeatures
cinst IIS-CGI -source windowsfeatures
cinst IIS-ASPNET -source windowsfeatures
cinst IIS-ASP -source windowsfeatures
cinst IIS-HttpCompressionDynamic -source windowsfeatures
cinst IIS-ManagementScriptingTools -source windowsfeatures
cinst IIS-StaticContent -source windowsfeatures
cinst IIS-DefaultDocument -source windowsfeatures
cinst IIS-DirectoryBrowsing -source windowsfeatures
cinst IIS-WebDAV -source windowsfeatures
cinst IIS-ServerSideIncludes -source windowsfeatures
cinst IIS-CustomLogging -source windowsfeatures
cinst IIS-HttpCompressionStatic -source windowsfeatures
cinst IIS-ManagementConsole -source windowsfeatures
cinst IIS-ManagementService -source windowsfeatures
cinst IIS-WMICompatibility -source windowsfeatures
cinst IIS-LegacyScripts -source windowsfeatures
cinst IIS-LegacySnapIn -source windowsfeatures
cinst IIS-FTPServer -source windowsfeatures
cinst IIS-FTPSvc -source windowsfeatures
cinst IIS-FTPExtensibility -source windowsfeatures
cinst IIS-DigestAuthentication -source windowsfeatures
#Register .NET 4.0 with IIS
."$env:windir\microsoft.net\framework\v4.0.30319\aspnet_regiis.exe" -i
Write-BoxstarterMessage "Downloading VS Settings file"
$downloadPath = $env:USERPROFILE + '\Downloads'
Get-WebFile -url 'https://www.dropbox.com/s/edohw9l7bw3h73o/work-colors-and-settings.vssettings?dl=0' -file $downloadPath\VS-Colors-and-Settings.vssettings
# Install Windows Updates
Write-BoxstarterMessage "Running Windows Update"
Install-WindowsUpdate -Full -AcceptEula
Write-BoxstarterMessage "Machine is complete!"
# Setup left
# Do settings file
# Set up ctrl+shift+alt+d for attachto any
} catch {
Write-ChocolateyFailure 'Boxstarter Error: ' $($_.Exception.Message)
throw
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment