Skip to content

Instantly share code, notes, and snippets.

@henriquecarv
Last active August 30, 2018 14:54
Show Gist options
  • Save henriquecarv/ab9baa4af98ad35d8fc0617c34b41ed5 to your computer and use it in GitHub Desktop.
Save henriquecarv/ab9baa4af98ad35d8fc0617c34b41ed5 to your computer and use it in GitHub Desktop.
Boxstarter script for windows setup
#Open CMD and execute START http://boxstarter.org/package/url? FOLLOWED BY THIS GIST'S 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
}
# Boxstarter options
$Boxstarter.RebookOk=$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
#Basic setup
Update-ExecutionPolicy Unrestricted
Disable-InternetExplorerESC # Turns off IE Enhansed Security Configuration that is on by default on Server OS versions
Disable-UAC
###########################################
# Set explorer options #
###########################################
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowFullPathInTitleBar
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
if (Test-PendingReboot) { Invoke-Reboot }
# Power plan setup
#SetPowerPlan "High performance"
#dev tools
cinst jre8
cinst jdk8
cinst python2
cinst python
cinst nvm
cinst notepadplusplus
cinst git
cinst git-credential-manager-for-windows
cinst visualstudiocode
cinst winmerge
cinst curl
cinst vim
if (Test-PendingReboot) { Invoke-Reboot }
#Browsers
cinst adblockplusie
cinst googlechrome
cinst firefox
#Other essential tools
cinst 7zip
cinst foxitreader
cinst ccleaner
cinst k-litecodecpackmega
cinst filezilla
cinst gimp
cinst pgadmin4
cinst teamviewer
cinst googledrive
cinst teracopy
cinst cdburnerxp
cinst lightshot
cinst wps-office-free
cinst conemu
if (Test-PendingReboot) { Invoke-Reboot }
# Windows Programs
cinst IIS-WebServerRole -source windowsfeatures
cinst IIS-HttpCompressionDynamic -source windowsfeatures
cinst TelnetClient -source windowsFeatures
cinst Microsoft-Hyper-V-All -source windowsFeatures
cinst Microsoft-Windows-Subsystem-Linux -source windowsfeatures
if (Test-PendingReboot) { Invoke-Reboot }
# Update Windows and reboot if necessary
Install-WindowsUpdate -AcceptEula
#--- Rename the Computer ---
# Requires restart, or add the -Restart flag
$computername = "Henrique-PC"
if ($env:computername -ne $computername) {
Rename-Computer -NewName $computername
}
if (Test-PendingReboot) { Invoke-Reboot }
# Git Setup
git config --global core.editor vim
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
git config --global push.default matching
git config --global merge.tool meld
git config --global diff.guitool kdiff3
git config --global push.default current
# NPM Setup
#npm install -g bower gulp @angular/cli webpack cordova ionic
#Visual Studio Code Extensions
code --install-extension ilich8086.CSSfmt
code --install-extension abusaidm.html-snippets
code --install-extension donjayamanne.jquerysnippets
code --install-extension dbalage.vscode-stylesheet-formatter
code --install-extension robertohuertasm.vscode-icons
code --install-extension formulahendry.auto-rename-tag
code --install-extension formulahendry.auto-close-tag
code --install-extension steve8708.Align
code --install-extension humao.rest-client
code --install-extension christian-kohler.path-intellisense
code --install-extension idleberg.icon-fonts
code --install-extension rubbersheep.gi
code --install-extension eg2.tslint
code --install-extension joshpeng.theme-onedark-sublime
code --install-extension MS-vsliveshare.vsliveshare
code --install-extension eg2.vscode-npm-script
code --install-extension christian-kohler.npm-intellisense
code --install-extension esbenp.prettier-vscode
code --install-extension editorconfig.editorconfig
code --install-extension mikestead.dotenv
code --install-extension xabikos.javascriptsnippets
code --install-extension eamodio.gitlens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment