Skip to content

Instantly share code, notes, and snippets.

@dotiful
Last active January 21, 2020 09:56
Show Gist options
  • Save dotiful/00bcb42d9422f626546696051483ac82 to your computer and use it in GitHub Desktop.
Save dotiful/00bcb42d9422f626546696051483ac82 to your computer and use it in GitHub Desktop.
Boxstarter & Chocolatey Installs
<#
The command to run, built from the raw link of this gist
Win+R
iexplore http://boxstarter.org/package/url?
OR (if you don't like the way the web launcher force re-installs everything)
Create another script like the following to install and run the gist:
. { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
install-boxstarterpackage -PackgeName <RAW GIST URL>
NOTES:
- This may need to be run a few times to get 100% to a finished state (though it should reboot and pick up where it left off)
- If you use windows hello or fingerprint scanning for authentication then just press enter 3x when
prompted for a password (and know that passwordless relogin will not work after a reboot)
- You will almost certainly want to modify the configuration and every other aspect of this script
to meet your own needs.
#>
#
# install chocolatey if not installed
#
# Set-ExecutionPolicy Bypass -Scope Process -Force
# if (!(Test-Path -Path "$env:ProgramData\Chocolatey")) {
# Invoke-Expression((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# }
#
# install boxstarter if not installed
#
if (-not (Get-Module -Listavailable -Name "Boxstarter.Chocolatey")) {
. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; Get-Boxstarter -Force
}
#
# Boxstarter options
#
# Allow reboots
$Boxstarter.RebootOk=$true
# Is this a machine with no login password?
$Boxstarter.NoPassword=$true
# Save my password securely and auto-login after a reboot
$Boxstarter.AutoLogin=$false
# Basic setup
Update-ExecutionPolicy RemoteSigned
# Sets options on the Windows Explorer shell
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar -DisableShowRecentFilesInQuickAccess
Disable-UAC # We re-enable at end of script
# Sets options on the Windows Taskbar
# Set-TaskbarOptions -Size Small
# Configure Choco features
choco feature enable -n allowGlobalConfirmation
#
# Install Choco packages
#
cinst autohotkey
cinst bandizip
cinst googlechrome firefox
cinst telegram
# media
cinst aimp
cinst --params "'/Language:en'" vlc
# dev
cinst --params "/GitAndUnixToolsOnPath /NoShellIntegration /NoCredentialManager" git
cinst vscode-insiders
cinst winscp
# cinst nodejs python python2 ruby
#
# WinConfig Features
#
# re-enable UAC
Enable-UAC
# Allows Remote Desktop access and enables Remote Desktop firewall rule
Enable-RemoteDesktop
# Reboot if pending
if (Test-PendingReboot) { Invoke-Reboot }
#
# Install Scoop
#
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
# add bucket
scoop bucket add extras
# dev
scoop install concfg pshazz
# back-up current console settings
concfg export ~/Desktop/console-backup.json
# use tomorrow-night color theme
concfg import tomorrow-night
# fonts
scoop bucket add nerd-fonts
scoop install FiraCode FiraCode-NF Hack-NF
# Update Windows and reboot if necessary
# Install-WindowsUpdate -AcceptEula
# if (Test-PendingReboot) { Invoke-Reboot }
# Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Google\Chrome\Application\chrome.exe"
# function Install-VisualStudioCode {
# $checkpoint = 'VSCode'
# $done = Get-Checkpoint -CheckpointName $checkpoint
# if ($done) {
# Write-BoxstarterMessage "$checkpoint are already installed"
# return
# }
# # install visual studio code and extensions
# choco install visualstudiocode --limitoutput
# Update-Path
# # need to launch vscode so user folders are created as we can install extensions
# Start-Process code
# Start-Sleep -s 10
# code --install-extension ms-vscode.csharp
# code --install-extension ms-vscode.PowerShell
# code --install-extension msazurermtools.azurerm-vscode-tools
# code --install-extension robertohuertasm.vscode-icons
# code --install-extension DavidAnson.vscode-markdownlint
# #code --install-extension msjsdiag.debugger-for-chrome
# Set-Checkpoint -CheckpointName $checkpoint -CheckpointValue 1
# }