Skip to content

Instantly share code, notes, and snippets.

@joaocc
Last active November 6, 2016 09:40
Show Gist options
  • Save joaocc/f61f9a8e59a5575220ce to your computer and use it in GitHub Desktop.
Save joaocc/f61f9a8e59a5575220ce to your computer and use it in GitHub Desktop.
Deploy--boxstarter--win2012r2
#
# v1.1.5 2015-08-28 HighSkillz Ltd
#
# START http://goo.gl/bVJNzp
# START http://boxstarter.org/package/url?https://bitbucket.org/api/2.0/snippets/highskillz-deploy/KAMLg/files/win2012r2--hyperv.boxst
#
# START http://goo.gl/yVuh3L
# START http://boxstarter.org/package/url?https://gist.githubusercontent.com/joaocc/f61f9a8e59a5575220ce/raw/win2012r2--hyperv.boxst
# ================================================================
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
# ================================================================
#netdom renamecomputer %computername% /newname:{newComputerName}
#shutdown /r
# ================================================================
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-UAC
Set-TaskbarSmall
netsh.exe advfirewall firewall set rule group="remote desktop" new enable=yes
# we add toolsroot here because it usually requires a logout
# for the env variable to take effect...
# and, at this point, it's very likelly that a reboot will be required
choco install -y toolsroot
# .Net framework
choco install -y DotNet3.5
choco install -y DotNet4.6.1
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
# Hyper-V
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V-Management-Clients /All
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V-Management-PowerShell /All
dism.exe /Online /Enable-Feature:RSAT-Hyper-V-Tools-Feature /All
# File Share support
dism.exe /Online /Enable-Feature:File-Services /all
dism.exe /Online /Enable-Feature:FileServerVSSAgent /all
dism.exe /Online /Enable-Feature:WindowsServerBackup /all
#dism.exe /Online /Enable-Feature:WirelessNetworking /all
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# Get-NetConnectionProfile
# Set-NetConnectionProfile -InterfaceIndex # -NetworkCategory Private
# ----------------------------------------------------------------
# server settings
Configure-SMRemoting.exe -disable
# ----------------------------------------------------------------
# NFS may be useful for Vagrant
#
#dism.exe /Online /Enable-Feature:ServicesForNFS-ServerAndClient /All
#dism.exe /Online /Enable-Feature:NFS-Administration /All
# ----------------------------------------------------------------
# must be installed after Hyper-V
choco install -y vagrant
# ----------------------------------------------------------------
# other stuff
#choco install -y mono
# nodejs
choco install -y nodejs
# Python
#choco install -y python2
#choco install -y python3
# VCREdist
choco install -y vcredist2005
choco install -y vcredist2008
choco install -y vcredist2010
choco install -y vcredist2012
choco install -y vcredist2013
choco install -y vcredist2015
Add-WindowsFeature telnet-client
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
#
choco install -y googlechrome-allusers
choco install -y gitextensions
choco install -y git-credential-winstore
choco install -y sourcetree
choco install -y patheditor
choco install -y sysinternals
choco install -y 7zip
choco install -y LinkShellExtension
choco install -y filezilla
choco install -y baretail
choco install -y notepadplusplus
choco install -y sublimetext3
#choco install -y beyondcompare
choco install -y kdiff3
choco install -y meld
choco install -y chocolateygui
DISM.EXE /enable-feature /online /featureName:MicrosoftWindowsPowerShellISE
# ################################################################
Install-WindowsUpdate -AcceptEula
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
#
vagrant plugin install vagrant-rdp
#vagrant box add mwrock/Windows2012R2 --provider hyperv
##vagrant box add ericmann/trusty64 --provider hyperv
#vagrant box add withinboredom/Trusty64 --provider hyperv
#
# v1.5.1 2016-11-05 HighSkillz Ltd
#
# START https://goo.gl/MQVl9w
# START http://boxstarter.org/package/url?https://gist.githubusercontent.com/joaocc/f61f9a8e59a5575220ce/raw/win2012r2--nondev-1611.boxst
# ================================================================
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
# ================================================================
#netdom renamecomputer %computername% /newname:{newComputerName}
#shutdown /r
# ================================================================
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-UAC
Set-TaskbarSmall
netsh.exe advfirewall firewall set rule group="remote desktop" new enable=yes
#########
# TOOLSROOT package can cause gb.mongodb to fail install
#
# we add toolsroot here because it usually requires a logout
# for the env variable to take effect...
# and, at this point, it's very likelly that a reboot will be required
### choco install -y toolsroot
# .Net framework
choco install dotnet-4.6.2
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
# File Share support
dism.exe /Online /Enable-Feature:File-Services /all
dism.exe /Online /Enable-Feature:FileServerVSSAgent /all
dism.exe /Online /Enable-Feature:WindowsServerBackup /all
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# Get-NetConnectionProfile
# Set-NetConnectionProfile -InterfaceIndex # -NetworkCategory Private
# ----------------------------------------------------------------
# server settings
#Configure-SMRemoting.exe -disable
# ----------------------------------------------------------------
# other stuff
#choco install -y mono
# nodejs
choco install -y nodejs 6.9.1
# Python
#choco install -y python2
choco install -y python3
# VCREdist
#choco install -y vcredist2005
#choco install -y vcredist2008
choco install -y vcredist2010
choco install -y vcredist2012
choco install -y vcredist2013
choco install -y vcredist2015
Add-WindowsFeature telnet-client
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
#
choco install -y googlechrome
choco install -y git
choco install -y gitextensions
choco install -y sourcetree
#choco install -y duplicati.portable
choco install -y patheditor
choco install -y sysinternals
choco install -y 7zip
choco install -y LinkShellExtension
choco install -y filezilla
choco install -y baretail
choco install -y logexpert
choco install -y logparser
choco install -y notepadplusplus
choco install -y sublimetext3
choco install -y beyondcompare
choco install -y kdiff3
choco install -y meld
choco install -y windirstat
choco install -y make
choco install -y mremoteng
choco install -y chocolateygui
DISM.EXE /enable-feature /online /featureName:MicrosoftWindowsPowerShellISE
# ################################################################
Install-WindowsUpdate -AcceptEula
if (Test-PendingReboot) { Invoke-Reboot }
#
# v1.1.5 2015-08-28 HighSkillz Ltd
#
# START http://goo.gl/8jp3pU
# START http://boxstarter.org/package/url?https://bitbucket.org/api/2.0/snippets/highskillz-deploy/KAMLg/files/win2012r2--webapp.boxst
#
# START http://goo.gl/uNLOL9
# START http://boxstarter.org/package/url?https://gist.githubusercontent.com/joaocc/f61f9a8e59a5575220ce/raw/win2012r2--webapp.boxst
# ================================================================
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
# ================================================================
#netdom renamecomputer %computername% /newname:{newComputerName}
#shutdown /r
# ================================================================
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-UAC
Set-TaskbarSmall
netsh.exe advfirewall firewall set rule group="remote desktop" new enable=yes
#########
# TOOLSROOT package can cause gb.mongodb to fail install
#
# we add toolsroot here because it usually requires a logout
# for the env variable to take effect...
# and, at this point, it's very likelly that a reboot will be required
### choco install -y toolsroot
# .Net framework
choco install -y DotNet3.5
choco install -y DotNet4.6.1
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
# File Share support
dism.exe /Online /Enable-Feature:File-Services /all
dism.exe /Online /Enable-Feature:FileServerVSSAgent /all
dism.exe /Online /Enable-Feature:WindowsServerBackup /all
# ----------------------------------------------------------------
# WebPI (seems to require requires .net 2.0)
#choco install -y WebPI
choco install -y WebPIcmd
# WebDepoloy
WebPICMD.exe /Install /AcceptEula /Products:WDeploy36NoSMO
# ----------------------------------------------------------------
# IIS stuff
import-module servermanager
add-windowsfeature Web-Server, Web-ISAPI-Filter, Web-ISAPI-Ext, Web-Dyn-Compression, Web-Scripting-Tools, Web-Windows-Auth, Web-Net-Ext45, Web-Asp-Net45, Web-Http-Redirect, Web-Custom-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Http-Tracing, Web-Basic-Auth, Web-AppInit, Web-Mgmt-Console, Web-CGI
#add-windowsfeature Web-WebSockets
WebPICMD.exe /Install /AcceptEula /Products:ARRv3_0
WebPICMD.exe /Install /AcceptEula /Products:PHP55
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# Get-NetConnectionProfile
# Set-NetConnectionProfile -InterfaceIndex # -NetworkCategory Private
# ----------------------------------------------------------------
# server settings
#Configure-SMRemoting.exe -disable
# ----------------------------------------------------------------
# other stuff
#choco install -y mono
# nodejs
choco install -y nodejs
# Python
#choco install -y python2
#choco install -y python3
# VCREdist
choco install -y vcredist2005
choco install -y vcredist2008
choco install -y vcredist2010
choco install -y vcredist2012
choco install -y vcredist2013
choco install -y vcredist2015
s
Add-WindowsFeature telnet-client
# ################################################################
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
# MongoDB
#
choco install -y gb.mongodb
#choco install -y mongodb.core
#choco install -y mongodb.core.2.4
choco install -y robomongo
choco install -y mongovue
#choco install -y mongodbfortango
npm install -g node-mongo-seeds
# ----------------------------------------------------------------
# MySQL
#
choco install -y mysql -version 5.5.30
choco install -y mysql.workbench -version 6.3.4
if (Test-PendingReboot) { Invoke-Reboot }
# ----------------------------------------------------------------
#
choco install -y googlechrome-allusers
choco install -y gitextensions
choco install -y git-credential-winstore
choco install -y sourcetree
choco install -y fiddler4
choco install -y patheditor
choco install -y sysinternals
choco install -y 7zip
choco install -y LinkShellExtension
choco install -y filezilla
choco install -y baretail
choco install -y logexpert
choco install -y logparser
choco install -y notepadplusplus
choco install -y sublimetext3
#choco install -y beyondcompare
choco install -y kdiff3
choco install -y meld
choco install -y chocolateygui
DISM.EXE /enable-feature /online /featureName:MicrosoftWindowsPowerShellISE
# ################################################################
Install-WindowsUpdate -AcceptEula
if (Test-PendingReboot) { Invoke-Reboot }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment