-
-
Save gpuido/3a08f0ea872bf2abf43daeb175d267b3 to your computer and use it in GitHub Desktop.
Boxstarter Script - Full - Windows 10
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
# Set TLS support | |
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" | |
# Import Choco Install-* | |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force | |
# Set up choco cache location to work around Boxstarter Issue 241 | |
$chocoCache = (Join-Path ([Environment]::GetEnvironmentVariable("LocalAppData")) "Temp\ChocoCache") | |
New-Item -Path $chocoCache -ItemType directory -Force | |
# Configure Windows Explorer Options | |
Set-WindowsExplorerOptions -EnableShowFileExtensions -EnableShowHiddenFilesFoldersDrives -EnableShowFullPathInTitleBar | |
# Trust PSGallery | |
Get-PackageProvider -Name NuGet -ForceBootstrap | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
# Install PowerShell Azure Modules | |
Write-BoxstarterMessage "Installing Azure PowerShell modules" | |
Install-Module -Name AzureRM -Scope AllUsers -AllowClobber | |
Install-Module -Name Azure -Scope AllUsers -AllowClobber | |
# Install oh-my-posh | |
Write-BoxstarterMessage "Installing posh-git and oh-my-posh" | |
Install-Module -Name posh-git -Scope AllUsers | |
Install-Module -Name oh-my-posh -Scope AllUsers | |
# Install posh-docker docker | |
Write-BoxstarterMessage "Installing posh-docker" | |
Install-Module -Name posh-docker -Scope AllUsers | |
# Install Source Code Pro and Patched | |
Write-BoxstarterMessage "Installing Source Code Pro and SourceCodePro+Powerline+Awesome+Regular" | |
& C:\_PostBuildContent\install-sourcecodepro-patched.ps1 | |
# Install Visual Studio 2017 | |
Write-BoxstarterMessage "Installing Visual Studio 2017" | |
& C:\_PostBuildContent\install-vs2017.ps1 | |
# Install Open Command Line VSIX | |
Write-BoxstarterMessage "Installing Open Command Line VSIX" | |
& C:\_PostBuildContent\install-vsix.ps1 -Name OpenCommandLine -Url http://vsixgallery.com/extensions/f4ab1e64-5d35-4f06-bad9-bf414f4b3bbb/Open%20Command%20Line%20v2.1.vsix | |
# Install Clean Solution VSIX | |
Write-BoxstarterMessage "Installing Clean Solution VSIX" | |
& C:\_PostBuildContent\install-vsix.ps1 -Name CleanSolution -Url http://vsixgallery.com/extensions/55640f47-34bc-436b-8820-e7f64fbb31fc/Clean%20Solution%20v1.4.27.vsix | |
# Install License Header Manager VSIX | |
Write-BoxstarterMessage "Installing License Header Manager VSIX" | |
& C:\_PostBuildContent\install-vsix.ps1 -Name LicenseHeaderManager -Url https://github.com/rubicon-oss/LicenseHeaderManager/releases/download/2.0.3/LicenseHeaderManager.vsix | |
# Install VS Color Themes VSIX | |
Write-BoxstarterMessage "Installing VS Color Themese VSIX" | |
& C:\_PostBuildContent\install-vsix.ps1 -Name VSColorThemes -Url https://github.com/Microsoft/VS-ColorThemes/releases/download/1.0.3/VSColorThemes.vsix | |
# Install Azure CLI | |
cinst azure-cli --cacheLocation $chocoCache | |
# Install Sql Server Management Studio | |
cinst sql-server-management-studio --cacheLocation $chocoCache | |
# Install Visual Studio Code | |
cinst visualstudiocode --cacheLocation $chocoCache | |
# Install Microsoft Azure Storage Explorer | |
cinst microsoftazurestorageexplorer --cacheLocation $chocoCache | |
# Install Git | |
cinst git -params '"/GitAndUnixToolsOnPath"' --cacheLocation $chocoCache | |
# Install Git Credential Manager | |
cinst git-credential-manager-for-windows --cacheLocation $chocoCache | |
# Install ConEmu | |
cinst conemu --cacheLocation $chocoCache | |
# Install Postman | |
cinst postman --cacheLocation $chocoCache | |
# Install LINQPad | |
cinst linqpad --cacheLocation $chocoCache | |
# Install Node.js | |
cinst nodejs --cacheLocation $chocoCache | |
# Install Notepad++ | |
cinst notepadplusplus --cacheLocation $chocoCache | |
# Install NuGet Command Line | |
cinst nuget.commandline --cacheLocation $chocoCache | |
# Install NuGet Package Explorer | |
cinst nugetpackageexplorer --cacheLocation $chocoCache | |
Install-ChocolateyShortcut -ShortcutFilePath (Join-Path ([Environment]::GetEnvironmentVariable("AppData")) "Microsoft\Windows\Start Menu\Programs\Nuget Package Explorer.lnk") -TargetPath "C:\ProgramData\chocolatey\bin\NugetPackageExplorer.exe" | |
# Install Service Bus Explorer | |
cinst servicebusexplorer --cacheLocation $chocoCache | |
Install-ChocolateyShortcut -ShortcutFilePath (Join-Path ([Environment]::GetEnvironmentVariable("AppData")) "Microsoft\Windows\Start Menu\Programs\Service Bus Explorer.lnk") -TargetPath "C:\ProgramData\chocolatey\bin\ServiceBusExplorer.exe" | |
# Install Azure IoT Hub Device Explorer | |
Write-BoxstarterMessage "Azure IoT Hub Device Explorer" | |
$packageName = 'Azure IoT Hub Device Explorer' | |
$fileType = 'msi' | |
$version = '2018-3-13' | |
$silentArgs = '/quiet' | |
$url="https://github.com/Azure/azure-iot-sdk-csharp/releases/download/$version/SetupDeviceExplorer.msi" | |
$checksum='1c1aff3e44ca351a2e0470369519f08e44fa64eafb889946eea66313d50061c9' | |
$checksumType='sha256' | |
Install-ChocolateyPackage -packageName $packageName -fileType $fileType -url64bit $url -checksum64 $checksum -checksumType64 $checksumType -silentArgs $silentArgs | |
Install-ChocolateyShortcut -ShortcutFilePath (Join-Path ([Environment]::GetEnvironmentVariable("AppData")) "Microsoft\Windows\Start Menu\Programs\Device Explorer.lnk") -TargetPath "C:\Program Files (x86)\Microsoft\DeviceExplorer\DeviceExplorer.exe" | |
# Install Azure Functions Core Tools | |
#Write-BoxstarterMessage "Installing Azure Functions Core Tools" | |
#npm i -g azure-functions-core-tools | |
# Install Google Chrome | |
cinst googlechrome --cacheLocation $chocoCache | |
# Install Docker for Windows | |
cinst docker-for-windows --cacheLocation $chocoCache | |
# Enable Hyper-V | |
cinst Microsoft-Hyper-V-All -source windowsFeatures --cacheLocation $chocoCache | |
# Enable Containers | |
cinst Containers -source windowsFeatures --cacheLocation $chocoCache | |
# Enable Linux Subsystem | |
cinst Microsoft-Windows-Subsystem-Linux -source windowsFeatures --cacheLocation $chocoCache | |
# Create root folder structure | |
Write-BoxstarterMessage "Creating root folder structure" | |
New-Item -Path "C:\_Src" -Type Directory -Force | |
New-Item -Path "C:\_Src\Prod" -Type Directory -Force | |
New-Item -Path "C:\_Src\Prod\Mesh" -Type Directory -Force | |
New-Item -Path "C:\_Src\Sdbx" -Type Directory -Force | |
# Deploy post build files | |
Write-BoxstarterMessage "Deploying post build files" | |
Copy-Item "C:\_PostBuildContent\.gitconfig" -Destination $env:UserProfile | |
Copy-Item "C:\_PostBuildContent\ConEmu.xml" -Destination $env:AppData | |
Copy-Item "C:\_PostBuildContent\Microsoft.PowerShell_profile.ps1" -Destination (Join-Path $env:UserProfile "Documents\WindowsPowerShell") | |
Rename-Item -Path (Join-Path (Split-Path -Path (Get-Module -ListAvailable oh-my-posh).path -Parent) "defaults.ps1") -NewName "defaults.ps1.bak" | |
Copy-Item "C:\_PostBuildContent\defaults.ps1" -Destination (Split-Path -Path (Get-Module -ListAvailable oh-my-posh).path -Parent) | |
# Setup configuration and dotfile tracking | |
Write-BoxstarterMessage "Setting up configuration and dotfile tracking" | |
New-Item -Path (Join-Path $env:UserProfile ".myconf") -Type Directory -Force | |
git init --bare $env:UserProfile/.myconf | |
echo '*' >> $env:UserProfile/.myconf/info/exclude | |
# Configure my .gitconfig | |
Write-BoxstarterMessage "Customizing gitconfig" | |
& C:\_PostBuildContent\configure-my-gitconfig.ps1 | |
# Customize taskbar layout | |
Write-BoxstarterMessage "Customizing taskbar with layout modification" | |
Import-StartLayout -LayoutPath "C:\_PostBuildContent\LayoutModification.xml" -MountPath "C:\" | |
# Move Themed Wallpaper | |
Write-BoxstarterMessage "Moving themed wallpaper" | |
Move-Item -Path "C:\_PostBuildContent\Themes\Azure Theme\" -Destination (New-Item "$env:UserProfile\Pictures\Themes" -Type container -Force) | |
# Remove Desktop Shortcuts | |
Write-BoxstarterMessage "Removing desktop shortcuts" | |
Get-ChildItem -Path "C:\Users\*\Desktop\*" -Recurse -Include *.lnk | Remove-Item -Force | |
# Clone One Flow Repo | |
Write-BoxstarterMessage "Cloning One Flow repo" | |
Set-Location -Path C:\_Src\Prod\Mesh | |
git clone https://meshsystems.visualstudio.com/DefaultCollection/Mesh%20Systems/_git/Mesh.DevAutomation.OneFlow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment