Skip to content

Instantly share code, notes, and snippets.

@clabnet
Created March 9, 2017 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clabnet/ebf890eb2812569d0c3d37fff136de11 to your computer and use it in GitHub Desktop.
Save clabnet/ebf890eb2812569d0c3d37fff136de11 to your computer and use it in GitHub Desktop.
# Boxstarter script for development environment
# Set-ExecutionPolicyecution unrestricted
# START http://boxstarter.org/package/nr/url?
# oppure : START http://boxstarter.org/package/nr/url?c:\temp\install-pc-paola.ps1
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.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
# -------------------------
# Windows configuration changes
# -------------------------
Update-ExecutionPolicy Unrestricted
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-GameBarTips
Disable-BingSearch
#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
# Install chocolatey
#cinst chocolatey
#choco feature enable -n allowGlobalConfirmation
#choco feature enable -n allowEmptyChecksums
#choco feature enable -n allowEmptyChecksumsSecure
#choco feature disable -n checksumFiles
# DotNet Runtime
cinst dotnet3.5
cinst dotnet4.5.1
# Browsers
cinst googlechrome -ignore-checksums
cinst firefox -packageParameters "l=it-IT"
# Essentials tools
cinst 7zip
cinst adobereader
cinst javaruntime
cinst notepadplusplus
cinst teamviewer
cinst slack
cinst skype
cinst treesizefree
cinst virtualclonedrive
cinst thunderbird
cinst keepass
cinst PDFCreator
cinst ultradefrag
cinst ccleaner
cinst openvpn
cinst rdmfree
cinst beyondcompare
choco install cutepdf
choco install naps2
choco install pdfsam.install
choco install cloudstation
Install-ChocolateyPinnedTaskBarItem "$env:windir\system32\mstsc.exe"
# Windows Update and reboot if necessary
Install-WindowsUpdate -AcceptEula
# Remove windows update uninstallers
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
#Cleanup the disk
Start-Process -FilePath "$env:programfiles\CCleaner\CCleaner.exe" -ArgumentList "/CLEANER /AUTO"
Start-Sleep -s 20
# Defragment drive
#Start-Process -FilePath "udefrag.exe" -ArgumentList '--optimize --repeat C:' -Wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment