Last active
August 29, 2015 14:20
-
-
Save degnome/437bc072ec6cb2df2b3d to your computer and use it in GitHub Desktop.
Boxstarter Script for VM-based Development Environment (VDMS)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This boxstarter script installs a standard VDMS Developer Workstation. | |
# Magic boxstarter URL to start the show: | |
# | |
# start http://boxstarter.org/package/nr/url? | |
function SetPowerPlan([string]$PreferredPlan) | |
{ | |
Write-Host "Setting Powerplan to $PreferredPlan" | |
$guid = (Get-WmiObject -Class win32_powerplan -Namespace root\cimv2\power -Filter "ElementName='$PreferredPlan'").InstanceID.tostring() | |
$regex = [regex]"{(.*?)}$" | |
$newpowerVal = $regex.Match($guid).groups[1].value | |
# setting power setting to high performance | |
powercfg -S $newpowerVal | |
} | |
try { | |
# Allow unattended reboots | |
$Boxstarter.RebootOk=$false | |
$Boxstarter.AutoLogin=$true | |
# Configure basic system settings | |
Update-ExecutionPolicy Unrestricted | |
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Disable-InternetExplorerESC | |
Set-TaskbarOptions -Lock | |
# Power plan setup | |
SetPowerPlan "High performance" | |
Write-BoxstarterMessage "Setting Standby Timeout to Never" | |
& powercfg.exe -change -standby-timeout-ac 0 | |
& powercfg.exe -change -standby-timeout-dc 0 | |
Write-BoxstarterMessage "Setting Monitor Timeout to Never" | |
& powercfg.exe -change -monitor-timeout-ac 0 | |
& powercfg.exe -change -monitor-timeout-dc 0 | |
Write-BoxstarterMessage "Setting Disk Timeout to Never" | |
& powercfg.exe -change -disk-timeout-ac 0 | |
& powercfg.exe -change -disk-timeout-dc 0 | |
Write-BoxstarterMessage "Turning off Windows Hibernation" | |
& powercfg.exe -h off | |
# Default to the desktop rather than application launcher | |
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst | |
# Allow running PowerShell scripts | |
Update-ExecutionPolicy Unrestricted | |
# Update Windows and reboot if necessary | |
Install-WindowsUpdate -AcceptEula | |
# DotNet Runtime | |
cinst dotnet3.5 | |
cinst dotnet4.5.1 | |
# Add Browsers | |
cinst Firefox | |
cinst GoogleChrome | |
# Add Lightweight Editor | |
cinst brackets | |
Install-ChocolateyPinnedTaskBarItem "$($boxstarter.programfiles86)\Brackets\Brackets.exe" | |
# Add Git | |
cinst git.install | |
[Environment]::SetEnvironmentVariable("PATH", $env:Path + ";C:\Program Files\Git\bin", 'User') | |
cinst poshgit | |
cinst git-credential-winstore | |
# Add Console Program | |
cinst conemu | |
Install-ChocolateyPinnedTaskBarItem "$($boxstarter.programfiles86)\ConEmu\ConEmu.exe" | |
# Add Database Tools | |
cinst mssqlserver2012express | |
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe" | |
# Install Visual Studio 2013 Professional with Update 4 | |
cinst VisualStudio2013Professional -InstallArguments "/Features:'WebTools SQL'" | |
Install-ChocolateyPinnedTaskBarItem "$($boxstarter.programfiles86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" | |
cinst VS2013.4 | |
cinst testdriven.net | |
cinst nuget.commandline | |
# VS extensions | |
#Install-ChocolateyVsixPackage ProductivityPowerTools2013 https://visualstudiogallery.msdn.microsoft.com/dbcb8670-889e-4a54-a226-a48a15e4cace/file/117115/4/ProPowerTools.vsix | |
#Install-ChocolateyVsixPackage NuGetPackageManager https://visualstudiogallery.msdn.microsoft.com/4ec1526c-4a8c-4a84-b702-b21a8f5293ca/file/105933/7/NuGet.Tools.2013.vsix | |
#Install-ChocolateyVsixPackage IndentGuides https://visualstudiogallery.msdn.microsoft.com/e792686d-542b-474a-8c55-630980e72c30/file/48932/20/IndentGuide%20v14.vsix | |
#Install-ChocolateyVsixPackage VSCommands https://visualstudiogallery.msdn.microsoft.com/c6d1c265-7007-405c-a68b-5606af238ece/file/106247/18/SquaredInfinity.VSCommands.VS12.vsix | |
#Install-ChocolateyVsixPackage VSColorOutput https://visualstudiogallery.msdn.microsoft.com/f4d9c2b5-d6d7-4543-a7a5-2d7ebabc2496/file/63103/9/VSColorOutput.vsix | |
#Install-ChocolateyVsixPackage PowerShellTools http://visualstudiogallery.msdn.microsoft.com/c9eb3ba8-0c59-4944-9a62-6eee37294597/file/112013/6/PowerShellTools.vsix | |
#Install-ChocolateyVsixPackage WebEssentials2013 https://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361/file/105627/42/WebEssentials2013.vsix | |
# Install all Windows updates | |
Install-WindowsUpdate -AcceptEula | |
Write-ChocolateySuccess 'boxstarter.desktop' | |
} catch { | |
Write-ChocolateyFailure 'boxstarter.desktop' $($_.Exception.Message) | |
throw | |
} | |
#gwmi Win32_Product -Filter "Name LIKE 'Behaviors%'" | foreach { $_.Uninstall() } | |
#gwmi Win32_Product -Filter "Name LIKE 'Microsoft Advertising%'" | foreach { $_.Uninstall() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment