Skip to content

Instantly share code, notes, and snippets.

@serbrech
Last active August 11, 2017 15:22
Show Gist options
  • Save serbrech/32368c085571e4f6d06d1147f9b41741 to your computer and use it in GitHub Desktop.
Save serbrech/32368c085571e4f6d06d1147f9b41741 to your computer and use it in GitHub Desktop.
My Boxstarter Script
# Initialize reboot log file
$reboot_log = "C:\installation.rbt"
if ( -not (Test-Path $reboot_log) ) { New-Item $reboot_log -type file }
$reboots = Get-Content $reboot_log
# 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
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst
Install-WindowsUpdate -acceptEula
# Install Subsystem for Linux
$section = "LinuxSubsystem"
if(-not ($section -in $reboots)) {
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
Enable-WindowsOptionalFeature -FeatureName Microsoft-Windows-Subsystem-Linux -Online -All -LimitAccess -NoRestart -ErrorAction Stop
# Still need to run `bash` or `lxrun/exe /install /y` manually post install
}
if ( -not ($section -in $reboots) ) { Add-Content $reboot_log $section ; Invoke-Reboot }
cinst notepad2
cinst git-credential-winstore
cinst cmdermini
cinst poshgit
# cinst Firefox
cinst GoogleChrome
# cinst Opera
cinst vlc
cinst skype
cinst markdownpad2
#cinst NugetPackageExplorer
cinst spotify
cinst 7zip.install
cinst nodejs.install
cinst dropbox
cinst 1password
visualstudiocode --params '"/NoDesktopIcon"'
choco install dotnet4.6.2
choco install windirstat --ignore-checksums
choco install sysinternals
choco install visualstudio2015enterprise --ignore-checksums
# Install-ChocolateyPinnedTaskBarItem "$env:programfiles\console\console.exe"
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Google\Chrome\Application\chrome.exe"
# Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"
Install-WindowsUpdate -acceptEula
#Cleanup the disk
# Remove update un-installers
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment