# Inspired by https://gist.github.com/mivano/2b078f267d3ca1e9996c07085eb59a60 # and personal machine setup scripts ###################### # Configure Chocolatey ###################### choco config set --name=cacheLocation --value=C:\ChocolateyCache choco feature enable --name=allowGlobalConfirmation choco feature enable --name=useRememberedArgumentsForUpgrades ################## # Privacy Settings ################## # Privacy: Let apps use my advertising ID: Disable Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 # To Restore: #Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 # Privacy: SmartScreen Filter for Store Apps: Disable #Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 # To Restore (enable): Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 1 # WiFi Sense: HotSpot Sharing: Disable # Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting -Name value -Type DWord -Value 0 # WiFi Sense: Shared HotSpot Auto-Connect: Disable Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots -Name value -Type DWord -Value 0 # Disable Telemetry (requires a reboot to take effect) # Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWord -Value 0 # Get-Service DiagTrack,Dmwappushservice | Stop-Service | Set-Service -StartupType Disabled ############################ # Personal Preferences on UI ############################ Set-WindowsExplorerOptions ` -EnableShowHiddenFilesFoldersDrives ` -EnableShowFileExtensions ` -DisableOpenFileExplorerToQuickAccess ` -DisableShowRecentFilesInQuickAccess ` -DisableShowFrequentFoldersInQuickAccess Set-TaskbarOptions ` -Dock Bottom ` -Combine Always ` -AlwaysShowIconsOff ` -Size Large Set-TaskbarOptions -Lock Update-ExecutionPolicy RemoteSigned ############################### # Windows 10 Metro App Removals # These start commented out so you choose # Just remove the # (comment in PowerShell) on the ones you want to remove ############################### # Be gone, heathen! Get-AppxPackage king.com.CandyCrushSaga | Remove-AppxPackage # Bing Weather, News, Sports, and Finance (Money): # Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage # Xbox: # Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage # Windows Phone Companion Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage # Solitaire Collection Get-AppxPackage Microsoft.MicrosoftSolitaireCollection | Remove-AppxPackage # People # Get-AppxPackage Microsoft.People | Remove-AppxPackage # Groove Music # Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage # Movies & TV #Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage # OneNote #Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage # Photos #Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage # Sound Recorder #Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage # Mail & Calendar #Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage # Skype (Metro version) #Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage ################## # Windows Features ################## choco install Microsoft-Hyper-V-All --source windowsfeatures choco install Microsoft-Windows-Subsystem-Linux --source windowsfeatures ################# # Windows Updates ################# # Change Windows Updates to "Notify to schedule restart" # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name UxOption -Type DWord -Value 1 # To Restore (Automatic): # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings -Name UxOption -Type DWord -Value 0 # Disable P2P Update downlods outside of local network # Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config -Name DODownloadMode -Type DWord -Value 1 # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization -Name SystemSettingsDownloadMode -Type DWord -Value 3 # To restore (PCs on my local network and PCs on the internet) # Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config -Name DODownloadMode -Type DWord -Value 3 # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization -Name SystemSettingsDownloadMode -Type DWord -Value 1 # To disable P2P update downloads completely: # Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config -Name DODownloadMode -Type DWord -Value 0 Install-WindowsUpdate -AcceptEula -GetUpdatesFromMS ################## # Install packages ################## # Typefaces choco install firacode -y choco install sourcecodepro -y choco install hackfont -y choco install dejavufonts -y choco install inconsolata -y choco install lato -y choco install bitstreamverafonts -y # Tools/Utilities choco install git -y choco install git-credential-winstore -y choco install gitextensions -y choco install 7zip -y choco install greenshot -y # better screenshots choco install carnac -y # http://carnackeys.com/ HUD for keypresses (useful for presentations) choco install sysinternals -y # Languange Runtimes choco install nodejs -y choco install miniconda -y choco install jdk8 -y # Applications choco install firefox-dev -y choco install googlechrome -y choco install intellijidea-community -y choco install visualstudiocode -y choco install atom -y choco install sublimetext3 -y choco install hyper -y choco install yarn -y choco install docker-for-windows -y choco install kubernetes-cli choco install beyondcompare -y choco install ProcExp -y choco install poshgit -y ########################### # Set up powershell profile ########################### Install-Module z -AllowClobber -Scope CurrentUser Write-Host "Creating custom $profile.CurrentUserAllHosts for Powershell" if (!(test-path $profile.CurrentUserAllHosts)) { New-Item -path $profile.CurrentUserAllHosts -type file -force } Add-Content $profile.CurrentUserAllHosts $(Invoke-RestMethod "https://gist.github.com/lediur/6222254ed6e31fc70ff0aedee6a34bf8/raw/profile.ps1") Write-Host ######### # Cleanup ######### del C:\eula*.txt del C:\install.* del C:\vcredist.* del C:\vc_red.*