Created
January 19, 2015 11:20
-
-
Save johnkattenhorn/889d104a6814dd888f74 to your computer and use it in GitHub Desktop.
HostDevEnvironment
This file contains 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
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 { | |
# Boxstarter options | |
$Boxstarter.RebootOk=$false # 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 | |
# Basic setup | |
Update-ExecutionPolicy Unrestricted | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
# Enable-RemoteDesktop | |
Disable-InternetExplorerESC | |
#Disable-UAC | |
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 | |
# Update Windows and reboot if necessary | |
Install-WindowsUpdate -AcceptEula | |
if (Test-PendingReboot) { Invoke-Reboot } | |
# Browsers | |
cinst googlechrome | |
cinst firefox | |
cinst Opera | |
cinst safari | |
# Office | |
cinst Office365ProPlus | |
# Collab | |
cinst skype | |
cinst teamviewer | |
# Other essential tools | |
cinst 7zip | |
cinst 7zip.install | |
cinst adobereader | |
cinst javaruntime | |
cinst treesizefree | |
# Text Editor | |
cinst SublimeText3 | |
cinst SublimeText3.PackageControl | |
cinst Microsoft-Hyper-V-All -source windowsFeatures | |
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Google\Chrome\Application\chrome.exe" | |
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Mozilla Firefox\firefox.exe" | |
Install-ChocolateyPinnedTaskBarItem "$env:programfiles\Sublime Text 3\sublime_text.exe" | |
# Other Setup Items | |
# Setup | |
Install-ChocolateyFileAssociation ".txt" "$env:programfiles\Sublime Text 3\sublime_text.exe" | |
Install-ChocolateyFileAssociation ".log" "$env:programfiles\Sublime Text 3\sublime_text.exe" | |
Install-ChocolateyFileAssociation ".config" "$env:programfiles\Sublime Text 3\sublime_text.exe" | |
Install-ChocolateyFileAssociation ".xml" "$env:programfiles\Sublime Text 3\sublime_text.exe" | |
Install-ChocolateyFileAssociation ".ps1" "$env:programfiles\Sublime Text 3\sublime_text.exe" | |
Install-ChocolateyFileAssociation ".psm" "$env:programfiles\Sublime Text 3\sublime_text.exe" | |
# Update Windows and reboot if necessary | |
Install-WindowsUpdate -AcceptEula | |
if (Test-PendingReboot) { Invoke-Reboot } | |
Write-ChocolateySuccess 'DevelopmentEnvironment' | |
} catch { | |
Write-ChocolateyFailure 'DevelopmentEnvironment' $($_.Exception.Message) | |
throw | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment