-
-
Save dewdad/9b815c1cf056eab88bcf54d651fc7e3a to your computer and use it in GitHub Desktop.
My BoxStarter Scripts
This file contains hidden or 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
# SQL Server - do this early to avoid issues with newer versions of VC++ 2015 redist | |
choco install sql-server-2017 | |
choco install sql-server-2017-cumulative-update | |
choco install sql-server-management-studio | |
# tools | |
choco install git | |
choco install nodejs | |
choco install tortoisegit | |
choco install vscode | |
choco pin add -n=vscode | |
choco install yarn | |
choco install 7zip | |
# .NET | |
choco install dotnet4.5 | |
choco install dotnet4.6 | |
choco install dotnet4.6.1 | |
choco install dotnet4.6.2 | |
choco install dotnet4.7 | |
choco install dotnet4.7.1 | |
choco install dotnetcore-sdk | |
choco install netfx-4.5.1-devpack | |
choco install netfx-4.5.2-devpack | |
choco install netfx-4.6.1-devpack | |
choco install netfx-4.7-devpack | |
choco install netfx-4.7.1-devpack | |
# Visual Studio 2017 | |
choco install visualstudio2017professional | |
choco install visualstudio2017-workload-manageddesktop | |
choco install visualstudio2017-workload-netcoretools | |
choco install visualstudio2017-workload-netweb | |
choco install visualstudio2017-workload-node |
This file contains hidden or 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
# 1. Install Chocolatey | |
<# | |
Set-ExecutionPolicy RemoteSigned -Force | |
# Create empty profile (so profile-integration scripts have something to append to) | |
if (-not (Test-Path $PROFILE)) { | |
$directory = [IO.Path]::GetDirectoryName($PROFILE) | |
if (-not (Test-Path $directory)) { | |
New-Item -ItemType Directory $directory | Out-Null | |
} | |
"# Profile" > $PROFILE | |
} | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco feature enable -n=allowGlobalConfirmation | |
choco feature enable -n=useRememberedArgumentsForUpgrades | |
# Copy chocolatey.license.xml to C:\ProgramData\chocolatey\license | |
choco install chocolatey.extension | |
choco install boxstarter | |
#> | |
# 2. Run with this: | |
<# | |
$cred=Get-Credential domain\username | |
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/raw/boxstarter-bare.ps1 -Credential $cred | |
#> | |
# https://github.com/mwrock/boxstarter/issues/241#issuecomment-336028348 | |
New-Item -Path "c:\temp" -ItemType directory -Force | Out-Null | |
Update-ExecutionPolicy RemoteSigned | |
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableExpandToOpenFolder | |
# No SMB1 - https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/ | |
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol | |
Enable-RemoteDesktop | |
# NuGet package provider. Do this early as reboots are required | |
if (-not (Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) { | |
Write-Host "Install-PackageProvider" | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
# Exit equivalent | |
Invoke-Reboot | |
} | |
# Install initial version of PowerShellGet | |
if (-not (Get-InstalledModule -Name PowerShellGet -ErrorAction SilentlyContinue)) { | |
Write-Host "Install-Module PowerShellGet" | |
Install-Module -Name "PowerShellGet" -AllowClobber -Force | |
# Exit equivalent | |
Invoke-Reboot | |
} | |
# Upgrade to latest version (> 2.2) | |
if (Get-InstalledModule -Name PowerShellGet | Where-Object { $_.Version -le 2.2 } ) { | |
#Write-Host "Update-Module PowerShellGet" | |
# Unload this first to avoid | |
#Write-Host "Removing in-use modules" | |
#Remove-Module PowerShellGet -Force | |
#Remove-Module PackageManagement -Force | |
# This fails due to "module 'PackageManagement' is currently in use" error. Don't think there's a way around this. | |
#PowerShellGet\Update-Module -Name PowerShellGet -Force | |
# Exit equivalent | |
#Invoke-Reboot | |
} | |
# Write-Host "Set-PSRepository" | |
# Set-PSRepository -Name PSGallery -InstallationPolicy Trusted -Force | |
# Windows features | |
choco install NetFx3 TelnetClient Microsoft-Hyper-V-All IIS-WebServerRole IIS-NetFxExtensibility45 IIS-HttpCompressionDynamic IIS-WindowsAuthentication IIS-ASPNET45 IIS-IIS6ManagementCompatibility Containers -source windowsfeatures --cacheLocation="c:\temp" | |
# Remove unwanted Store apps | |
Get-AppxPackage Facebook.Facebook | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage TuneIn.TuneInRadio | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage Microsoft.MinecraftUWP | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage Microsoft.MicrosoftSolitaireCollection | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage KeeperSecurityInc.Keeper | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage 2FE3CB00.PicsArt-PhotoStudio | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage 9E2F88E3.Twitter | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name *Twitter | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name *MarchofEmpires | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name king.com.* | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name Microsoft.3DBuilder | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name *Bing* | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name Microsoft.Office.Word | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name Microsoft.Office.PowerPoint | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name Microsoft.Office.Excel | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Get-AppxPackage -AllUser -Name Microsoft.MicrosoftOfficeHub | Remove-AppxPackage -ErrorAction SilentlyContinue | |
Write-Host "Temp: $($env:temp)" | |
# .NET | |
choco install dotnet4.5 --cacheLocation="c:\temp" | |
choco install dotnet4.6 --cacheLocation="c:\temp" | |
choco install dotnet4.6.1 --cacheLocation="c:\temp" | |
choco install dotnet4.6.2 --cacheLocation="c:\temp" | |
choco install dotnet4.7 --cacheLocation="c:\temp" | |
choco install dotnet4.7.1 --cacheLocation="c:\temp" | |
choco install dotnetfx --version 4.7.2.20180712 -m --cacheLocation="c:\temp" | |
choco install dotnetfx --version --version 4.8.0.0-rtw2 --pre -m --cacheLocation="c:\temp" | |
choco install netfx-4.5.1-devpack --cacheLocation="c:\temp" | |
choco install netfx-4.5.2-devpack --cacheLocation="c:\temp" | |
choco install netfx-4.6.1-devpack --cacheLocation="c:\temp" | |
choco install netfx-4.7-devpack --cacheLocation="c:\temp" | |
choco install netfx-4.7.1-devpack --cacheLocation="c:\temp" | |
choco install netfx-4.7.2-devpack --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 1.1.14 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.1.105 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.1.202 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.1.302 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.1.403 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.1.508 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.1.605 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.1.701 -m --cacheLocation="c:\temp" # 2.1 for VS2019 | |
choco install dotnetcore-sdk --version 2.1.801 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.2.108 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.2.205 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 2.2.301 -m --cacheLocation="c:\temp" # 2.2 for VS2019 | |
choco install dotnetcore-sdk --version 2.2.401 -m --cacheLocation="c:\temp" | |
choco install dotnetcore-sdk --version 3.0.103 -m --cacheLocation="c:\temp" # 3.0 for VS2019 | |
choco install dotnetcore-sdk --version 3.1.101 -m --cacheLocation="c:\temp" # 3.0 for VS2019 | |
choco pin add -n=dotnetcore-sdk # Pin to avoid upgrade uninstalling all these versions! | |
cinst firefox --cacheLocation="c:\temp" | |
choco pin add -n=firefox | |
#cinst GoogleChrome --cacheLocation="c:\temp" | |
#choco pin add -n=GoogleChrome | |
cinst 7zip --cacheLocation="c:\temp" | |
cinst azure-cli --cacheLocation="c:\temp" | |
cinst becyicongrabber --cacheLocation="c:\temp" | |
if ((get-wmiobject Win32_ComputerSystem).manufacturer -like "*Dell*") { | |
cinst dellcommandupdate-uwp --cacheLocation="c:\temp" | |
} | |
cinst FiraCode --cacheLocation="c:\temp" # font | |
cinst git --cacheLocation="c:\temp" | |
if ((get-wmiobject Win32_ComputerSystem).manufacturer -like "*Lenovo*") { | |
cinst lenovo-thinkvantage-system-update --cacheLocation="c:\temp" | |
} | |
cinst paint.net --cacheLocation="c:\temp" | |
cinst mousewithoutborders --cacheLocation="c:\temp" | |
choco install microsoft-edge --cacheLocation="c:\temp" | |
cinst msbuild-structured-log-viewer --cacheLocation="c:\temp" | |
cinst nodejs --cacheLocation="c:\temp" | |
cinst nuget.commandline --cacheLocation="c:\temp" | |
# cinst NugetPackageExplorer --cacheLocation="c:\temp" # Use Store version | |
choco install office365business --cacheLocation="c:\temp" | |
cinst PDFXchangeEditor --cacheLocation="c:\temp" | |
cinst pingplotter --cacheLocation="c:\temp" | |
cinst powershell-core --cacheLocation="c:\temp" | |
cinst procmon --cacheLocation="c:\temp" | |
cinst tailblazer --ignore-checksums --cacheLocation="c:\temp" | |
cinst tortoisegit --cacheLocation="c:\temp" | |
# cinst tortoisesvn --cacheLocation="c:\temp" | |
cinst vscode --cacheLocation="c:\temp" | |
choco pin add -n=visualstudiocode | |
cinst vswhere --cacheLocation="c:\temp" | |
cinst windirstat --cacheLocation="c:\temp" | |
cinst x-lite --cacheLocation="c:\temp" | |
cinst yarn --cacheLocation="c:\temp" | |
cinst zoomit --cacheLocation="c:\temp" | |
#cinst sql-server-management-studio --cacheLocation="c:\temp" | |
cinst azure-data-studio --cacheLocation="c:\temp" | |
# Visual Studio 2019 | |
choco install visualstudio2019enterprise --cacheLocation="c:\temp" | |
choco install visualstudio2019-workload-visualstudioextension --cacheLocation="c:\temp" | |
choco install visualstudio2019-workload-manageddesktop --cacheLocation="c:\temp" | |
choco install visualstudio2019-workload-netweb --cacheLocation="c:\temp" # ASP.NET and web development | |
choco install visualstudio2019-workload-netcoretools --cacheLocation="c:\temp" # .NET Core cross-platform development | |
choco install visualstudio2019-workload-node --cacheLocation="c:\temp" #Node.js development | |
cinst resharper-ultimate-all --cacheLocation="c:\temp" --params "'/NoCpp /NoTeamCityAddin'" | |
# cinst ozcode-vs2017 --cacheLocation="c:\temp" | |
choco install docker-desktop --cacheLocation="c:\temp" | |
$docker = "C:\Program Files\Docker\Docker\Resources\bin\docker.exe" | |
# Assume by default Linux containers | |
#if (-not(& $docker info | Select-String -SimpleMatch linux)) { | |
# & 'c:\Program Files\docker\docker\dockercli.exe' -SwitchDaemon | Out-Null # Handle 'The operation has timed out | |
# Start-Sleep -Seconds 5 | |
#} | |
# Docker for Linux is not working here. Not sure why. | |
# & docker version | |
# & $docker pull microsoft/dotnet | |
# & $docker pull microsoft/mssql-server-linu# & $docker pull microsoft/aspnetcore | |
# Switch to Windows | |
#& 'c:\Program Files\docker\docker\dockercli.exe' -SwitchDaemon | |
#& $docker pull microsoft/nanoserver | |
# & $docker pull microsoft/mssql-server-windows-developer | |
# & $docker pull microsoft/windowsservercore | |
# https://github.com/matt9ucci/DockerCompletion | |
Write-Host "DockerCompletion" | |
Install-Module DockerCompletion -Force | |
Install-Module posh-git -AllowPrerelease -Force | |
# Enable Developer Mode - not required now for WSL | |
#$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" | |
#if (-not(Test-Path -Path $RegistryKeyPath)) { | |
# New-Item -Path $RegistryKeyPath -ItemType Directory -Force | |
# | |
# # Add registry value to enable Developer Mode | |
# New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 | |
# | |
# # Assume if we had to create that then we need to reboot. | |
# Invoke-Reboot | |
#} | |
# Enable Linux subsystem | |
cinst Microsoft-Windows-Subsystem-Linux -source windowsFeatures | |
# C:\windows\system32\inetsrv\appcmd.exe unlock config -section:windowsAuthentication | |
# C:\windows\system32\inetsrv\appcmd.exe unlock config -section:anonymousAuthentication | |
# Note: There are ususally VS Solution-specific config file in .vs\config\applicationhost.config too | |
# & "C:\Program Files\IIS Express\appcmd.exe" unlock config -section:windowsAuthentication | |
# & "C:\Program Files\IIS Express\appcmd.exe" unlock config -section:anonymousAuthentication | |
#PowerShell help | |
Update-Help -ErrorAction SilentlyContinue | |
# Install after other packages, so integration will work | |
cinst beyondcompare --cacheLocation="c:\temp" | |
cinst beyondcompare-integration --cacheLocation="c:\temp" | |
Install-WindowsUpdate -AcceptEula -GetUpdatesFromMS | |
Enable-UAC |
This file contains hidden or 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
# Run with START http://boxstarter.org/package/url?https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/raw/demo01.ps1 | |
Update-ExecutionPolicy RemoteSigned | |
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableExpandToOpenFolder | |
Enable-RemoteDesktop | |
# Windows features | |
cinst TelnetClient -source windowsfeatures | |
# Reboot? | |
choco install powershell #KB2999226 | |
# Chocolatey packages | |
#cinst beyondcompare | |
cinst zoomit |
This file contains hidden or 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
# Second demo script | |
<# | |
$cred=Get-Credential flcdrg | |
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/raw/demo02.ps1 -Credential $cred | |
#> | |
New-Item -Path "$env:userprofile\AppData\Local\ChocoCache" -ItemType directory -Force | Out-Null | |
$common = "--cacheLocation=`"$env:userprofile\AppData\Local\ChocoCache`"" | |
choco install notepadplusplus $common |
This file contains hidden or 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
# 1. Install Chocolatey | |
<# | |
Set-ExecutionPolicy RemoteSigned | |
# Create empty profile (so profile-integration scripts have something to append to) | |
if (-not (Test-Path $PROFILE)) { | |
$directory = [IO.Path]::GetDirectoryName($PROFILE) | |
if (-not (Test-Path $directory)) { | |
New-Item -ItemType Directory $directory | Out-Null | |
} | |
"# Profile" > $PROFILE | |
} | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco feature enable -n=allowGlobalConfirmation | |
choco install boxstarter | |
#> | |
# 2. Run with this: | |
<# | |
$cred=Get-Credential flcdrg | |
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/raw/simple-dev.ps1 -Credential $cred | |
#> | |
# https://github.com/mwrock/boxstarter/issues/241#issuecomment-336028348 | |
New-Item -Path "$env:userprofile\AppData\Local\ChocoCache" -ItemType directory -Force | Out-Null | |
$common = "--cacheLocation=`"$env:userprofile\AppData\Local\ChocoCache`"" | |
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableExpandToOpenFolder | |
# No SMB1 - https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/ | |
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol | |
Enable-RemoteDesktop #-DoNotRequireUserLevelAuthentication # Disable RULA For RDP to AzureAD connected PCs | |
# Windows features | |
Enable-WindowsOptionalFeature -Online -FeatureName NetFx3, TelnetClient,Microsoft-Hyper-V-All | |
#choco install IIS-WebServerRole IIS-NetFxExtensibility45 IIS-HttpCompressionDynamic IIS-WindowsAuthentication IIS-ASPNET45 IIS-IIS6ManagementCompatibility -source windowsfeatures $common | |
#choco install Containers -source windowsfeatures $common | |
# Remove Embedded Apps | |
# Alarms | |
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage | |
# Autodesk | |
Get-AppxPackage *Autodesk* | Remove-AppxPackage | |
# Bing Weather, News, Sports, and Finance (Money): | |
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage | |
# BubbleWitch | |
Get-AppxPackage *BubbleWitch* | Remove-AppxPackage | |
# Candy Crush | |
Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage | |
# Comms Phone | |
Get-AppxPackage Microsoft.CommsPhone | Remove-AppxPackage | |
# Dell | |
Get-AppxPackage *Dell* | Remove-AppxPackage | |
# Dropbox | |
Get-AppxPackage *Dropbox* | Remove-AppxPackage | |
Get-AppxPackage *Facebook* | Remove-AppxPackage | |
# Feedback Hub | |
Get-AppxPackage Microsoft.WindowsFeedbackHub | Remove-AppxPackage | |
# Get Started | |
Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage | |
# Keeper | |
Get-AppxPackage *Keeper* | Remove-AppxPackage | |
# Mail & Calendar | |
Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage | |
# Maps | |
#Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage | |
# March of Empires | |
Get-AppxPackage *MarchofEmpires* | Remove-AppxPackage | |
# McAfee Security | |
Get-AppxPackage *McAfee* | Remove-AppxPackage | |
# Uninstall McAfee Security App | |
$mcafee = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "McAfee Security" } | select UninstallString | |
if ($mcafee) { | |
$mcafee = $mcafee.UninstallString -Replace "C:\Program Files\McAfee\MSC\mcuihost.exe","" | |
Write "Uninstalling McAfee..." | |
start-process "C:\Program Files\McAfee\MSC\mcuihost.exe" -arg "$mcafee" -Wait | |
} | |
# Messaging | |
#Get-AppxPackage Microsoft.Messaging | Remove-AppxPackage | |
# Minecraft | |
#Get-AppxPackage *Minecraft* | Remove-AppxPackage | |
# Netflix | |
#Get-AppxPackage *Netflix* | Remove-AppxPackage | |
# Office Hub | |
Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage | |
# One Connect | |
Get-AppxPackage Microsoft.OneConnect | Remove-AppxPackage | |
# OneNote | |
#Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage | |
# People | |
Get-AppxPackage Microsoft.People | Remove-AppxPackage | |
# Phone | |
Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage | |
# Photos | |
#Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage | |
# Plex | |
Get-AppxPackage *Plex* | Remove-AppxPackage | |
# Skype (Metro version) | |
Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage | |
# Sound Recorder | |
#Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage | |
# Solitaire | |
Get-AppxPackage *Solitaire* | Remove-AppxPackage | |
# Sticky Notes | |
Get-AppxPackage Microsoft.MicrosoftStickyNotes | Remove-AppxPackage | |
# Sway | |
Get-AppxPackage Microsoft.Office.Sway | Remove-AppxPackage | |
Get-AppxPackage *Twitter* | Remove-AppxPackage | |
# Xbox | |
#Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage | |
#Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage | |
# Zune Music, Movies & TV | |
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage | |
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage | |
#--- Windows Settings --- | |
# Some from: @NickCraver's gist https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9 | |
# Privacy: Let apps use my advertising ID: Disable | |
If (-Not (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo")) { | |
New-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo | Out-Null | |
} | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
# WiFi Sense: HotSpot Sharing: Disable | |
# If (-Not (Test-Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting")) { | |
# New-Item -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting | Out-Null | |
# } | |
# 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 | |
# Start Menu: Disable Bing Search Results | |
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0 | |
# To Restore (Enabled): | |
# Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 1 | |
# Disable Telemetry (requires a reboot to take effect) | |
# Note this may break Insider builds for your organization | |
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 | |
choco install powershell-core $common | |
choco install microsoft-windows-terminal $common | |
#cinst GoogleChrome $common | |
#choco pin add -n=GoogleChrome $common | |
#cinst firefox $common | |
#choco pin add -n=firefox $common | |
choco install chocolateygui --source https://www.myget.org/F/chocolateygui/ --pre | |
cinst FiraCode $common # font | |
cinst git $common | |
#cinst keepass $common | |
#cinst keepass-plugin-favicon $common | |
#cinst microsoft-teams.install $common | |
#choco pin add -n="microsoft-teams.install" $common | |
#cinst notepadplusplus $common | |
cinst NugetPackageExplorer $common | |
#cinst PDFXchangeEditor $common | |
#cinst python2 $common | |
#cinst skype $common | |
cinst tailblazer $common --ignore-checksums | |
cinst windirstat $common | |
cinst zoomit $common | |
cinst 7zip $common | |
cinst openshot $common | |
cinst potplayer $common | |
cinst franz $common | |
cinst vscode $common | |
cinst drawpile $common | |
cinst krita $common | |
cinst zoom $common | |
choco install chocolateygui --source https://www.myget.org/F/chocolateygui/ --pre | |
cinst anydesk.install $common | |
cinst tor-browser $common | |
cinst deskpins $common | |
cinst captura $common | |
cinst ditto $common | |
#cinst picpick.portable $common # windows now has a built in screenshot tool | |
cinst multicommander $common | |
cinst duplicatefilefinder $common | |
cinst phraseexpress $common | |
cinst hostsman $common | |
cinst microsoft-edge-insider $common | |
choco install jdownloader $common | |
choco install webtorrent-desktop $common | |
choco install qbittorrent $common | |
#choco install choco-upgrade-all-at --params "'/DAILY:yes /TIME:04:00 /ABORTTIME:08:00'" | |
cinst choco-upgrade-all-at $common --params "'/WEEKLY:yes /DAY:SAT /TIME:03:00' /ABORTTIME:06:00'" | |
Write-BoxstarterMessage "NuGet package provider" | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force | |
Write-BoxstarterMessage "Enable Developer Mode" | |
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" | |
if (-not(Test-Path -Path $RegistryKeyPath)) { | |
New-Item -Path $RegistryKeyPath -ItemType Directory -Force | |
# Add registry value to enable Developer Mode | |
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 | |
# Assume if we had to create that then we need to reboot. | |
$Boxstarter.RebootOk = $true | |
Invoke-Reboot | |
} | |
#PowerShell help | |
Update-Help -ErrorAction SilentlyContinue | |
Install-WindowsUpdate -AcceptEula -GetUpdatesFromMS | |
Enable-UAC | |
# Troublesome packages | |
# cinst paint.net $common |
This file contains hidden or 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
# https://github.com/mwrock/boxstarter/issues/241#issuecomment-336028348 | |
New-Item -Path "$env:userprofile\AppData\Local\ChocoCache" -ItemType directory -Force | Out-Null | |
$common = "--cacheLocation=`"$env:userprofile\AppData\Local\ChocoCache`"" | |
choco install bginfo-startup -pre -packageParameters '/RunImmediately' $common | |
choco install NetFx3 -source windowsfeatures | |
choco install dotnetcore-runtime $common | |
choco install dotnetcore-sdk --version=2.1.302 $common | |
choco install dotnetcore-sdk --version=2.1.403 $common | |
choco install git $common | |
choco install yarn $common | |
# .NET Framework | |
choco install dotnet4.5 $common | |
choco install dotnet4.6 $common | |
choco install dotnet4.6.1 $common | |
choco install dotnet4.6.2 $common | |
choco install dotnet4.7 $common | |
choco install dotnet4.7.1 $common | |
choco install dotnet4.7.2 $common | |
choco install dotnetcore-sdk $common | |
choco install netfx-4.5.1-devpack $common | |
choco install netfx-4.5.2-devpack $common | |
choco install netfx-4.6.1-devpack $common | |
choco install netfx-4.7-devpack $common | |
choco install netfx-4.7.1-devpack $common | |
choco install netfx-4.7.2-devpack $common | |
# Visual Studio | |
choco install visualstudio2017buildtools --params "'--add Microsoft.Net.Component.4.5.TargetingPack'" $common | |
choco pin add -n=visualstudio2017buildtools $common | |
choco install visualstudio2017-workload-manageddesktop $common | |
choco pin add -n="visualstudio2017-workload-manageddesktop" $common | |
choco install visualstudio2017-workload-netcoretools $common | |
choco pin add -n="visualstudio2017-workload-netcoretools" $common | |
choco install visualstudio2017-workload-netweb $common | |
choco pin add -n="visualstudio2017-workload-netweb" $common | |
choco install visualstudio2017-workload-node $common | |
choco pin add -n="visualstudio2017-workload-node" $common | |
# Stop MSBuild processes from hanging around | |
[Environment]::SetEnvironmentVariable("MSBUILDDISABLENODEREUSE", "1", "Machine") |
This file contains hidden or 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
New-Item -Path "c:\temp" -ItemType directory -Force | Out-Null | |
cinst audacity --cacheLocation="c:\temp" | |
cinst audacity-lame --cacheLocation="c:\temp" # also gets audacity too | |
cinst itunes --cacheLocation="c:\temp" | |
cinst javaruntime --cacheLocation="c:\temp" | |
cinst dropbox --cacheLocation="c:\temp" | |
choco pin add -n=dropbox | |
choco install rss-builder --cacheLocation="c:\temp" | |
cinst svn --cacheLocation="c:\temp" | |
cinst ubiquiti-unifi-controller --cacheLocation="c:\temp" | |
cinst keepass --cacheLocation="c:\temp" |
This file contains hidden or 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
choco pin add -n=GoogleChrome | |
choco pin add -n=azure-data-studio | |
choco pin add -n=docker-desktop | |
choco pin add -n=visualstudio2019enterprise | |
choco pin add -n=firefox | |
choco pin add -n=Office365Business | |
choco pin add -n=vscode | |
choco pin add -n="vscode.install" | |
choco pin add -n="dotnetcore-sdk" | |
choco pin add -n="microsoft-edge" | |
choco pin add -n="paint.net" |
This file contains hidden or 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
# Is x86 sticky? | |
cinst notepadplusplus --x86 | |
cinst microsoft-teams |
This file contains hidden or 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
# 1. Install Chocolatey | |
<# | |
Set-ExecutionPolicy RemoteSigned | |
# Create empty profile (so profile-integration scripts have something to append to) | |
if (-not (Test-Path $PROFILE)) { | |
$directory = [IO.Path]::GetDirectoryName($PROFILE) | |
if (-not (Test-Path $directory)) { | |
New-Item -ItemType Directory $directory | Out-Null | |
} | |
"# Profile" > $PROFILE | |
} | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco feature enable -n=allowGlobalConfirmation | |
choco install boxstarter | |
#> | |
# 2. Run with this: | |
<# | |
$cred=Get-Credential flcdrg | |
Install-BoxstarterPackage -PackageName https://gist.githubusercontent.com/flcdrg/87802af4c92527eb8a30/raw/simple-dev.ps1 -Credential $cred | |
#> | |
# https://github.com/mwrock/boxstarter/issues/241#issuecomment-336028348 | |
New-Item -Path "$env:userprofile\AppData\Local\ChocoCache" -ItemType directory -Force | Out-Null | |
$common = "--cacheLocation=`"$env:userprofile\AppData\Local\ChocoCache`"" | |
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableExpandToOpenFolder | |
# No SMB1 - https://blogs.technet.microsoft.com/filecab/2016/09/16/stop-using-smb1/ | |
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol | |
Enable-RemoteDesktop -DoNotRequireUserLevelAuthentication # Disable RULA For RDP to AzureAD connected PCs | |
# Windows features | |
Enable-WindowsOptionalFeature -Online -FeatureName NetFx3, TelnetClient,Microsoft-Hyper-V-All | |
choco install IIS-WebServerRole IIS-NetFxExtensibility45 IIS-HttpCompressionDynamic IIS-WindowsAuthentication IIS-ASPNET45 IIS-IIS6ManagementCompatibility -source windowsfeatures $common | |
choco install Containers -source windowsfeatures $common | |
# SQL Server - do this early to avoid issues with newer versions of VC++ 2015 redist | |
# Because dependencies call Install-WindowsUpdate, this will force a full Windows Update check. | |
choco install sql-server-2017 $common | |
choco install sql-server-2017-cumulative-update --version 14.0.3029.16 $common | |
choco install sql-server-management-studio $common | |
choco install powershell $common | |
cinst GoogleChrome $common | |
choco pin add -n=GoogleChrome $common | |
cinst firefox $common | |
choco pin add -n=firefox $common | |
cinst FiraCode $common # font | |
cinst git $common | |
cinst keepass $common | |
cinst keepass-plugin-favicon $common | |
cinst microsoft-teams.install $common | |
choco pin add -n="microsoft-teams.install" $common | |
cinst nodejs $common | |
cinst notepadplusplus $common | |
cinst NugetPackageExplorer $common | |
cinst PDFXchangeEditor $common | |
cinst python2 $common | |
cinst skype $common | |
cinst tailblazer $common --ignore-checksums | |
cinst tortoisegit $common | |
cinst tortoisesvn $common | |
cinst visualstudiocode $common | |
choco pin add -n=visualstudiocode $common | |
cinst windirstat $common | |
cinst zoomit $common | |
cinst yarn $common | |
cinst 7zip $common | |
# Visual Studio 2017 | |
choco install dotnet4.5 $common | |
choco install dotnet4.6 $common | |
choco install dotnet4.6.1 $common | |
choco install dotnet4.6.2 $common | |
choco install dotnet4.7 $common | |
choco install dotnet4.7.1 $common | |
choco install dotnet4.7.2 $common | |
choco install dotnetcore-sdk $common | |
choco install netfx-4.5.1-devpack $common | |
choco install netfx-4.5.2-devpack $common | |
choco install netfx-4.6.1-devpack $common | |
choco install netfx-4.7-devpack $common | |
choco install netfx-4.7.1-devpack $common | |
choco install netfx-4.7.2-devpack $common | |
choco install visualstudio2017professional $common | |
choco pin add -n="visualstudio2017professional" $common | |
choco install visualstudio2017-workload-manageddesktop $common | |
choco pin add -n="visualstudio2017-workload-manageddesktop" $common | |
choco install visualstudio2017-workload-netcoretools $common | |
choco pin add -n="visualstudio2017-workload-netcoretools" $common | |
choco install visualstudio2017-workload-netweb $common | |
choco pin add -n="visualstudio2017-workload-netweb" $common | |
choco install visualstudio2017-workload-node $common | |
choco pin add -n="visualstudio2017-workload-node" $common | |
Write-BoxstarterMessage "NuGet package provider" | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force | |
Write-BoxstarterMessage "Enable Developer Mode" | |
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" | |
if (-not(Test-Path -Path $RegistryKeyPath)) { | |
New-Item -Path $RegistryKeyPath -ItemType Directory -Force | |
# Add registry value to enable Developer Mode | |
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 | |
# Assume if we had to create that then we need to reboot. | |
$Boxstarter.RebootOk = $true | |
Invoke-Reboot | |
} | |
# Enable Linux subsystem (requires developer mode enabled) | |
choco install Microsoft-Windows-Subsystem-Linux -source windowsFeatures $common | |
C:\windows\system32\inetsrv\appcmd.exe unlock config -section:windowsAuthentication | |
C:\windows\system32\inetsrv\appcmd.exe unlock config -section:anonymousAuthentication | |
# Note: There are ususally VS Solution-specific config file in .vs\config\applicationhost.config too | |
& "C:\Program Files\IIS Express\appcmd.exe" unlock config -section:windowsAuthentication | |
& "C:\Program Files\IIS Express\appcmd.exe" unlock config -section:anonymousAuthentication | |
#PowerShell help | |
Update-Help -ErrorAction SilentlyContinue | |
# Install after other packages | |
cinst beyondcompare $common | |
cinst beyondcompare-integration $common | |
Install-WindowsUpdate -AcceptEula -GetUpdatesFromMS | |
Enable-UAC | |
# Troublesome packages | |
# cinst paint.net $common |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment