Last active
February 13, 2019 11:12
-
-
Save JuryA/1db33ab88f7028c2defecdaaba94ac6a to your computer and use it in GitHub Desktop.
Bootstrap script
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
#As described here: http://boxstarter.org/Learn/WebLauncher | |
#The command to run, built from the raw link of this gist | |
#START http://boxstarter.org/package/nr/url?https://gist.github.com/JuryA/1db33ab88f7028c2defecdaaba94ac6a/raw | |
# 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 | |
# BOOTSTRAP # | |
Set-ExecutionPolicy Bypass -Scope Process -Force # during this running PS process disable Execution Policy Security | |
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); Get-BoxStarter -Force # install Boxstarter - tool for easier OS deployment | |
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco feature enable -n allowGlobalConfirmation | |
# Restrict Windows Update P2P only to local network | |
Write-Host "Restricting Windows Update P2P only to local network..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) { | |
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1 | |
If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization")) { | |
New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" | Out-Null | |
} | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization" -Name "SystemSettingsDownloadMode" -Type DWord -Value 3 | |
# Enable sharing mapped drives between users | |
Write-Host "Enabling sharing mapped drives between users..." | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "EnableLinkedConnections" -Type DWord -Value 1 | |
# Enable obsolete SMB 1.0 protocol | |
Write-Host "Enabling SMB 1.0 protocol..." | |
Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force | |
# Set current network profile to private (allow file sharing, device discovery, etc.) | |
Write-Host "Setting current network profile to private..." | |
Set-NetConnectionProfile -NetworkCategory Private | |
# Disable Autoplay | |
Write-Host "Disabling Autoplay..." | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" -Name "DisableAutoplay" -Type DWord -Value 1 | |
# Disable Autorun for all drives | |
Write-Host "Disabling Autorun for all drives..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer")) { | |
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" -Name "NoDriveTypeAutoRun" -Type DWord -Value 255 | |
#Special windowsy stuff. see http://boxstarter.org/WinConfig | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
Enable-RemoteDesktop | |
Install-WindowsUpdate -AcceptEula | |
Disable-UAC | |
Set-StartScreenOptions -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst | |
Set-TaskbarOptions -Size Large -Lock -Dock Bottom | |
#opens PC to This PC, not quick access | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1 | |
#taskbar where window is open for multi-monitor | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2 | |
# will expand explorer to the actual folder you're in | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1 | |
Update-ExecutionPolicy | |
# Debloat | |
# Uninstall default Microsoft applications | |
Write-Host "Uninstalling default Microsoft applications..." | |
Get-AppxPackage "Microsoft.3DBuilder" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.BingFinance" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.BingNews" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.BingSports" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.BingWeather" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.Getstarted" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.MicrosoftOfficeHub" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.Office.OneNote" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.People" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.SkypeApp" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.Windows.Photos" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.WindowsAlarms" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.WindowsCamera" | Remove-AppxPackage | |
# Get-AppxPackage "microsoft.windowscommunicationsapps" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.WindowsMaps" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.WindowsPhone" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.WindowsSoundRecorder" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.ZuneMusic" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.ZuneVideo" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.AppConnector" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.ConnectivityStore" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.Office.Sway" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.Messaging" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.CommsPhone" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.MicrosoftStickyNotes" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.OneConnect" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.WindowsFeedbackHub" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.MinecraftUWP" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.MicrosoftPowerBIForWindows" | Remove-AppxPackage | |
Get-AppxPackage "Microsoft.NetworkSpeedTest" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.MSPaint" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.Microsoft3DViewer" | Remove-AppxPackage | |
# Get-AppxPackage "Microsoft.RemoteDesktop" | Remove-AppxPackage | |
# Uninstall default third party applications | |
Write-Host "Uninstalling default third party applications..." | |
Get-AppxPackage "9E2F88E3.Twitter" | Remove-AppxPackage | |
Get-AppxPackage "king.com.CandyCrushSodaSaga" | Remove-AppxPackage | |
Get-AppxPackage "4DF9E0F8.Netflix" | Remove-AppxPackage | |
Get-AppxPackage "Drawboard.DrawboardPDF" | Remove-AppxPackage | |
Get-AppxPackage "D52A8D61.FarmVille2CountryEscape" | Remove-AppxPackage | |
Get-AppxPackage "GAMELOFTSA.Asphalt8Airborne" | Remove-AppxPackage | |
Get-AppxPackage "flaregamesGmbH.RoyalRevolt2" | Remove-AppxPackage | |
Get-AppxPackage "AdobeSystemsIncorporated.AdobePhotoshopExpress" | Remove-AppxPackage | |
Get-AppxPackage "ActiproSoftwareLLC.562882FEEB491" | Remove-AppxPackage | |
Get-AppxPackage "D5EA27B7.Duolingo-LearnLanguagesforFree" | Remove-AppxPackage | |
Get-AppxPackage "Facebook.Facebook" | Remove-AppxPackage | |
Get-AppxPackage "46928bounde.EclipseManager" | Remove-AppxPackage | |
Get-AppxPackage "A278AB0D.MarchofEmpires" | Remove-AppxPackage | |
Get-AppxPackage "KeeperSecurityInc.Keeper" | Remove-AppxPackage | |
Get-AppxPackage "king.com.BubbleWitch3Saga" | Remove-AppxPackage | |
Get-AppxPackage "89006A2E.AutodeskSketchBook" | Remove-AppxPackage | |
Get-AppxPackage "CAF9E577.Plex" | Remove-AppxPackage | |
# WSL | |
cinst Microsoft-Windows-Subsystem-Linux --source windowsFeatures -y --limit-output --no-progress | |
#--- Ubuntu --- | |
# TODO: Move this to choco install once --root is included in that package | |
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/Ubuntu.appx | |
# run the distro once and have it install locally with root user, unset password | |
# RefreshEnv | |
# Ubuntu1804 install --root | |
# Ubuntu1804 run apt update | |
# Ubuntu1804 run apt upgrade -y | |
# Invoke-Reboot | |
# cinst wsl-ubuntu-1804 -y --limit-output --no-progress | |
# Ubuntu1804 run ln -sf $(wslpath -u '%USERPROFILE%/.ssh') $HOME | |
#Ubuntu1804 run ln -sf $(wslpath -u '%USERPROFILE%/.gitconfig') $HOME | |
#Ubuntu1804 run apt update -y | |
#Ubuntu1804 run apt install python-pip -y | |
#wsl pip install --upgrade pip | |
#Ubuntu1804 run apt install -y python-apt pythonpy python3-pip | |
#Ubuntu1804 run sudo ln -fs $(which pip) /usr/bin/ | |
#Ubuntu1804 run pip3 install docker-py | |
#Ubuntu1804 run pip3 install ansible-lint | |
#--- Enable developer mode on the system --- | |
Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1 | |
# Development | |
cinst vscode -y --no-progress --limit-output | |
cinst git -y --package-parameters="'/GitAndUnixToolsOnPath /WindowsTerminal'" --no-progress --limit-output | |
# git config --global user.name "Jiri Altman" | |
# git config --global user.email "jiri.altman@konicaminolta.cz" | |
# Vagrant + Docker + Kubernetes + Hyper-V | |
#cinst Microsoft-Hyper-V-All --source WindowsFeatures -y --no-progress --limit-output | |
#cinst HypervisorPlatform --source WindowsFeatures -y --no-progress --limit-output | |
#cinst VirtualMachinePlatform --source WindowsFeatures -y --no-progress --limit-output | |
#RefreshEnv | |
#cinst vagrant -y --no-progress --limit-output | |
#[Environment]::SetEnvironmentVariable("VAGRANT_DEFAULT_PROVIDER", "hyperv", "Machine") | |
#[Environment]::SetEnvironmentVariable("VAGRANT_LINKED_CLONE", "1", "Machine") | |
#[Environment]::SetEnvironmentVariable("VAGRANT_NETWORK_BRIDGE", "Default Switch", "Machine") | |
#[Environment]::SetEnvironmentVariable("VAGRANT_SMB_USERNAME", "vagrant", "Machine") | |
#[Environment]::SetEnvironmentVariable("VAGRANT_SMB_PASSWORD", "f4Ddpu!fk^Y7qj91^JY6", "Machine") | |
# cinst Containers --source WindowsFeatures -y --no-progress --limit-output | |
#RefreshEnv | |
#cinst docker -y --no-progress --limit-output | |
#cinst docker-machine -y --no-progress --limit-output | |
#cinst docker-for-windows -y --no-progress --limit-output | |
#cinst docker-compose -y --no-progress --limit-output | |
#[Environment]::SetEnvironmentVariable("COMPOSE_CONVERT_WINDOWS_PATHS", "1", "Machine") | |
#cinst -y vscode-docker --no-progress --limit-output | |
#cinst kubernetes-kompose -y --no-progress --limit-output | |
# Java | |
choco install jre8 jdk8 -y --no-progress --limit-output | |
cinst python -y --no-progress --limit-output | |
refreshenv | |
python -m pip install --upgrade pip | |
# Install ML related python packages through pip | |
cinst --source python numpy | |
cinst --source python scipy | |
cinst --source python pandas | |
cinst --source python matplotlib | |
cinst --source python tensorflow | |
cinst --source python keras | |
# Get Visual Studio C++ Redistributables | |
cinst install -y vcredist2015 --no-progress --limit-output | |
# Misc Tools | |
#cinst Client-ProjFS --source WindowsFeatures -y --no-progress --limit-output | |
#cinst ServicesForNFS-ClientOnly --source WindowsFeatures -y --no-progress --limit-output | |
#cinst NFS-Administration --source WindowsFeatures -y --no-progress --limit-output | |
cinst youtube-dl -y --no-prompt --limit-output | |
cinst 7zip -y --no-progress --limit-output | |
cinst sysinternals -y --no-progress --limit-output | |
cinst greenshot -y --no-progress --limit-output | |
cinst googlechrome -y --no-progress --limit-output | |
#cinst lastpass lastpass-chrome -y --no-progress --limit-output | |
#cinst teamviewer -y --no-progress --limit-output | |
cinst adobereader -y --no-progress --limit-output | |
#cinst itunes -y --no-progress --limit-output | |
#cinst totalcommander -y --no-progress --limit-output | |
cinst curl -y --no-progress --limit-output | |
cinst keepass -y --no-progress --limit-output | |
#cinst fiddler -y --no-progress --limit-output | |
#cinst wireshark winpcap netca -y --no-progress --limit-output | |
cinst winscp kitty -y --no-progress --limit-output | |
Install-ChocolateyPinnedTaskBarItem "$($Boxstarter.programFiles86)\Google\Chrome\Application\chrome.exe" | |
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase | |
Enable-UAC |
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
Write-Host "Scoop Package Manager installation.." | |
Invoke-Expression (New-Object Net.WebClient).downloadstring('https://get.scoop.sh') | |
scoop install concfg | |
scoop install syncthing | |
concfg import monokai |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment