├── scripts
├── HyperV.ps1
├── Browsers.ps1
├── Docker.ps1
├── GetMLIDEAndTooling.ps1
├── GetUwpSamplesOffGithub.ps1
├── SystemConfiguration.ps1
├── CommonDevTools.ps1
├── PythonMLTools.ps1
├── FileExplorerSettings.ps1
├── WSL.ps1
├── WindowsTemplateStudio.ps1
└── RemoveDefaultApps.ps1
├── .github
└── ISSUE_TEMPLATE
│ ├── ReportIssue.md
│ ├── FeatureRequest.md
│ ├── ChocolateyIssueFeature.md
│ ├── BoxstarterIssueFeature.md
│ └── SecurityDisclosure.md
├── dev_ml_windows.ps1
├── LICENSE
├── dev_web.ps1
├── dev_ml_wsl.ps1
├── demos
├── README.md
└── chocolateyfest2018.ps1
├── devops_azure.ps1
├── dev_web_nodejs.ps1
├── dev_app_desktop_.NET.ps1
├── dev_app_desktop_cplusplus.ps1
├── dev_app_desktop_uwp.ps1
├── dev_app.ps1
├── dev_virtualmachine_createScript.ps1
├── SECURITY.md
├── CONTRIBUTING.md
├── ORGANIZATION.md
├── .gitignore
└── README.md
/scripts/HyperV.ps1:
--------------------------------------------------------------------------------
1 | choco install -y Microsoft-Hyper-V-All --source="'windowsFeatures'"
2 |
--------------------------------------------------------------------------------
/scripts/Browsers.ps1:
--------------------------------------------------------------------------------
1 | #--- Browsers ---
2 | choco install -y googlechrome
3 | choco install -y firefox
4 |
--------------------------------------------------------------------------------
/scripts/Docker.ps1:
--------------------------------------------------------------------------------
1 | Enable-WindowsOptionalFeature -Online -FeatureName containers -All
2 | RefreshEnv
3 | choco install -y docker-for-windows
4 | choco install -y vscode-docker
5 |
--------------------------------------------------------------------------------
/scripts/GetMLIDEAndTooling.ps1:
--------------------------------------------------------------------------------
1 | # Using vscode as a default IDE
2 | choco install -y vscode
3 | choco install -y git --package-parameters="'/GitAndUnixToolsOnPath /WindowsTerminal'"
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/ReportIssue.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Report Issue with Dev Setup Scripts
3 | about: Did you find unexpected behavior?
4 | ---
5 |
6 |
7 |
--------------------------------------------------------------------------------
/scripts/GetUwpSamplesOffGithub.ps1:
--------------------------------------------------------------------------------
1 | Update-SessionEnvironment
2 | cd $env:USERPROFILE\desktop
3 | mkdir UwpSamples
4 | cd UwpSamples
5 | git clone https://github.com/Microsoft/Windows-universal-samples/
--------------------------------------------------------------------------------
/scripts/SystemConfiguration.ps1:
--------------------------------------------------------------------------------
1 |
2 |
3 | #--- Enable developer mode on the system ---
4 | Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/FeatureRequest.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Enhancement / Feature Request
3 | about: How can we make this work better for you? Is there additional functionality you would love us to consider?
4 | ---
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/ChocolateyIssueFeature.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Issue / Feature for Chocolatey
3 | about: Finding an issue with Chocolatey itself? Functionality you want to see added to it.
4 | ---
5 |
6 | Please go to https://github.com/chocolatey/choco/issues and create your issue there. Thank you!
7 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/BoxstarterIssueFeature.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Issue / Feature for Boxstarter
3 | about: Finding an issue with Boxstarter itself? Functionality you want to see added to it.
4 | ---
5 |
6 | Please go to https://github.com/chocolatey/boxstarter/issues and create your issue there. Thank you!
7 |
--------------------------------------------------------------------------------
/scripts/CommonDevTools.ps1:
--------------------------------------------------------------------------------
1 |
2 | # tools we expect devs across many scenarios will want
3 | choco install -y vscode
4 | choco install -y git --package-parameters="'/GitAndUnixToolsOnPath /WindowsTerminal'"
5 | choco install -y python
6 | choco install -y 7zip.install
7 | choco install -y sysinternals
8 |
--------------------------------------------------------------------------------
/scripts/PythonMLTools.ps1:
--------------------------------------------------------------------------------
1 | # Install python
2 | choco install -y python --version=3.5.4
3 |
4 | # Refresh path
5 | refreshenv
6 |
7 | # Update pip
8 | python -m pip install --upgrade pip
9 |
10 | # Install ML related python packages through pip
11 | pip install numpy
12 | pip install scipy
13 | pip install pandas
14 | pip install matplotlib
15 | pip install tensorflow
16 | pip install keras
17 |
18 | # Get Visual Studio C++ Redistributables
19 | choco install -y vcredist2015
20 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/SecurityDisclosure.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Security Disclosure / Report
3 | about: Found a security issue?
4 | ---
5 |
6 | STOP RIGHT HERE. Security reports should never start out in the open. Please follow up directly with the team if you have a contact. If not you can always start with the information at https://chocolatey.org/security to see instructions on how to provide the disclosure - the Chocolatey Team can route it to the proper folks if it is not for Chocolatey or Boxstarter. Thank you!
7 |
--------------------------------------------------------------------------------
/scripts/FileExplorerSettings.ps1:
--------------------------------------------------------------------------------
1 | #--- Configuring Windows properties ---
2 | #--- Windows Features ---
3 | # Show hidden files, Show protected OS files, Show file extensions
4 | Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
5 |
6 | #--- File Explorer Settings ---
7 | # will expand explorer to the actual folder you're in
8 | Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
9 | #adds things back in your left pane like recycle bin
10 | Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
11 | #opens PC to This PC, not quick access
12 | Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
13 | #taskbar where window is open for multi-monitor
14 | Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2
15 |
16 |
--------------------------------------------------------------------------------
/scripts/WSL.ps1:
--------------------------------------------------------------------------------
1 | choco install -y Microsoft-Windows-Subsystem-Linux --source="'windowsfeatures'"
2 |
3 | #--- Ubuntu ---
4 | # TODO: Move this to choco install once --root is included in that package
5 | Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing
6 | Add-AppxPackage -Path ~/Ubuntu.appx
7 | # run the distro once and have it install locally with root user, unset password
8 |
9 | RefreshEnv
10 | Ubuntu1804 install --root
11 | Ubuntu1804 run apt update
12 | Ubuntu1804 run apt upgrade -y
13 |
14 | <#
15 | NOTE: Other distros can be scripted the same way for example:
16 |
17 | #--- SLES ---
18 | # Install SLES Store app
19 | Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing
20 | Add-AppxPackage -Path ~/SLES.appx
21 | # Launch SLES
22 | sles-12.exe
23 |
24 | # --- openSUSE ---
25 | Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/openSUSE.appx -UseBasicParsing
26 | Add-AppxPackage -Path ~/openSUSE.appx
27 | # Launch openSUSE
28 | opensuse-42.exe
29 | #>
30 |
31 |
--------------------------------------------------------------------------------
/dev_ml_windows.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common dev settings for machine learning using only Windows native tools
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "GetMLIDEAndTooling.ps1";
29 | executeScript "PythonMLTools.ps1";
30 |
31 | Enable-UAC
32 | Enable-MicrosoftUpdate
33 | Install-WindowsUpdate -acceptEula
34 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Microsoft Corporation. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE
22 |
--------------------------------------------------------------------------------
/dev_web.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common settings for web dev
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "FileExplorerSettings.ps1";
26 | executeScript "SystemConfiguration.ps1";
27 | executeScript "CommonDevTools.ps1";
28 | executeScript "RemoveDefaultApps.ps1";
29 | executeScript "HyperV.ps1";
30 | executeScript "Docker.ps1";
31 | executeScript "WSL.ps1";
32 | executeScript "Browsers.ps1";
33 |
34 | #--- Tools ---
35 | code --install-extension msjsdiag.debugger-for-chrome
36 | code --install-extension msjsdiag.debugger-for-edge
37 |
38 | #--- Microsoft WebDriver ---
39 | choco install -y microsoftwebdriver
40 |
41 | Enable-UAC
42 | Enable-MicrosoftUpdate
43 | Install-WindowsUpdate -acceptEula
44 |
--------------------------------------------------------------------------------
/dev_ml_wsl.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common dev settings for machine learning using Windows and Linux native tools
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "CommonDevTools.ps1";
29 | executeScript "HyperV.ps1";
30 | executeScript "WSL.ps1";
31 |
32 | write-host "Installing tools inside the WSL distro..."
33 | Ubuntu1804 run apt install python2.7 python-pip -y
34 | Ubuntu1804 run apt install python-numpy python-scipy -y
35 | Ubuntu1804 run pip install pandas
36 |
37 | write-host "Finished installing tools inside the WSL distro"
38 |
39 | Enable-UAC
40 | Enable-MicrosoftUpdate
41 | Install-WindowsUpdate -acceptEula
42 |
--------------------------------------------------------------------------------
/demos/README.md:
--------------------------------------------------------------------------------
1 | # How to run the scripts
2 | Before you begin, please read the [Legal](#Legal) section.
3 |
4 | To run a recipe script, click a link in the table below from your target machine. This will download the Boxstarter one-click application, and prompt you for Boxstarter to run with Administrator privileges (which it needs to do its job). Clicking yes in this dialog will cause the recipe to begin. You can then leave the job unattended and come back when it's finished.
5 |
6 | ## Customize the scripts
7 | These scripts should cover a lot of what you need but will not likely match your personal preferences exactly. In this case please fork the project and change the scripts however you desire. We really appreciate PR's back to this project if you have recommended changes.
8 |
9 | *Note: The one-click links use the following format. When working out of a different Fork or Branch you'll want to update the links as follows:*
10 |
11 | `http://boxstarter.org/package/url?https://raw.githubusercontent.com/GITHUB_DOMAIN/windows-dev-box-setup-scripts/YOUR_BRANCH/demos/RECIPE_NAME.ps1
12 | `
13 |
14 | |Click link to run |Description |
15 | |---------|---------|
16 | |ChocolateyFest 2018 | DevOps tools and some examples of personalization |
17 | | | Add to this list by submitting a PR with your example configuration! |
18 |
19 | # Contributing
20 | Do you want to contribute? We would love your help. Here are our contribution guidelines.
21 |
--------------------------------------------------------------------------------
/scripts/WindowsTemplateStudio.ps1:
--------------------------------------------------------------------------------
1 | # installing Windows Template Studio VSIX
2 | Write-Host "Installing Windows Template Studio" -ForegroundColor "Yellow"
3 |
4 | $requestUri = "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery";
5 | $requestBody = '{"flags":"262","filters":[{"criteria":[{"filterType":"10","value":"windows template studio"}],"sortBy":"0","sortOrder":"2","pageSize":"25","pageNumber":"1"}]}';
6 | $requestHeaders = New-Object "System.Collections.Generic.Dictionary[[String],[String]]";
7 | $requestHeaders.Add('Accept','application/json; api-version=3.2-preview.1');
8 | $requestHeaders.Add('Content-Type','application/json; charset=utf-8');
9 |
10 | $results = Invoke-WebRequest -Uri $requestUri -Method POST -Headers $requestHeaders -Body $requestBody -UseBasicParsing;
11 |
12 | $jsonResults = $results.Content | ConvertFrom-Json;
13 | $wtsResults = $jsonResults.results[0].extensions | where {$_.extensionName -eq "WindowsTemplateStudio"} ;
14 | $wtsFileUrl = $wtsResults.versions[0].files | where {$_.assetType -eq "Microsoft.Templates.2017.vsix"};
15 |
16 | $wtsVsix = [System.IO.Path]::GetFileName($wtsFileUrl.source);
17 | $wtsFullPath = [System.IO.Path]::Combine((Resolve-Path $env:USERPROFILE).path, $wtsVsix);
18 |
19 | Invoke-WebRequest -Uri $wtsFileUrl.source -OutFile $wtsFullPath;
20 |
21 | $vsixInstallerFile = Get-Childitem -Include vsixinstaller.exe -Recurse -Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\";
22 | $wtsArgList = "/quiet `"$wtsFullPath`"";
23 |
24 | $vsixInstallerResult = Start-Process -FilePath $vsixInstallerFile.FullName -ArgumentList $wtsArgList -Wait -PassThru;
25 |
26 | Remove-Item $wtsFullPath
--------------------------------------------------------------------------------
/devops_azure.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common settings for azure devops
4 |
5 | Disable-UAC
6 | $ConfirmPreference = "None" #ensure installing powershell modules don't prompt on needed dependencies
7 |
8 | # Get the base URI path from the ScriptToCall value
9 | $bstrappackage = "-bootstrapPackage"
10 | $helperUri = $Boxstarter['ScriptToCall']
11 | $strpos = $helperUri.IndexOf($bstrappackage)
12 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
13 | $helperUri = $helperUri.TrimStart("'", " ")
14 | $helperUri = $helperUri.TrimEnd("'", " ")
15 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
16 | $helperUri += "/scripts"
17 | write-host "helper script base URI is $helperUri"
18 |
19 | function executeScript {
20 | Param ([string]$script)
21 | write-host "executing $helperUri/$script ..."
22 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
23 | }
24 |
25 | #--- Setting up Windows ---
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "SystemConfiguration.ps1";
28 | executeScript "RemoveDefaultApps.ps1";
29 | executeScript "CommonDevTools.ps1";
30 | executeScript "Browsers.ps1";
31 |
32 | executeScript "HyperV.ps1";
33 | RefreshEnv
34 | executeScript "WSL.ps1";
35 | RefreshEnv
36 | executeScript "Docker.ps1";
37 |
38 | choco install -y powershell-core
39 | choco install -y azure-cli
40 | Install-Module -Force Az
41 | choco install -y microsoftazurestorageexplorer
42 | choco install -y terraform
43 |
44 | # Install tools in WSL instance
45 | write-host "Installing tools inside the WSL distro..."
46 | Ubuntu1804 run apt install ansible -y
47 |
48 | Enable-UAC
49 | Enable-MicrosoftUpdate
50 | Install-WindowsUpdate -acceptEula
51 |
--------------------------------------------------------------------------------
/dev_web_nodejs.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common settings for web development with NodeJS
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "CommonDevTools.ps1";
29 | executeScript "WSL.ps1";
30 | executeScript "Browsers.ps1";
31 |
32 | #--- Tools ---
33 | code --install-extension msjsdiag.debugger-for-chrome
34 | code --install-extension msjsdiag.debugger-for-edge
35 |
36 | #--- Tools ---
37 | choco install -y nodejs-lts # Node.js LTS, Recommended for most users
38 | # choco install -y nodejs # Node.js Current, Latest features
39 | choco install -y visualstudio2017buildtools
40 | choco install -y visualstudio2017-workload-vctools
41 | choco install -y python2 # Node.js requires Python 2 to build native modules
42 |
43 | Enable-UAC
44 | Enable-MicrosoftUpdate
45 | Install-WindowsUpdate -acceptEula
46 |
--------------------------------------------------------------------------------
/dev_app_desktop_.NET.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common dev settings for desktop app development
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "CommonDevTools.ps1";
29 |
30 | #--- Tools ---
31 | #--- Installing VS and VS Code with Git
32 | # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
33 | # https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
34 | # https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
35 | # visualstudio2017community
36 | # visualstudio2017professional
37 | # visualstudio2017enterprise
38 |
39 | choco install -y visualstudio2017community --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
40 | Update-SessionEnvironment #refreshing env due to Git install
41 |
42 | #--- UWP Workload and installing Windows Template Studio ---
43 | choco install -y visualstudio2017-workload-azure
44 | choco install -y visualstudio2017-workload-manageddesktop
45 |
46 | #--- reenabling critial items ---
47 | Enable-UAC
48 | Enable-MicrosoftUpdate
49 | Install-WindowsUpdate -acceptEula
50 |
--------------------------------------------------------------------------------
/dev_app_desktop_cplusplus.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common dev settings for desktop app development
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "CommonDevTools.ps1";
29 |
30 | #--- Tools ---
31 | #--- Installing VS and VS Code with Git
32 | # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
33 | # https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
34 | # https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
35 | # visualstudio2017community
36 | # visualstudio2017professional
37 | # visualstudio2017enterprise
38 |
39 | choco install -y visualstudio2017community --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
40 | Update-SessionEnvironment #refreshing env due to Git install
41 |
42 | #--- UWP Workload and installing Windows Template Studio ---
43 | choco install -y visualstudio2017-workload-azure
44 | choco install -y visualstudio2017-workload-nativedesktop
45 |
46 | #--- reenabling critial items ---
47 | Enable-UAC
48 | Enable-MicrosoftUpdate
49 | Install-WindowsUpdate -acceptEula
50 |
--------------------------------------------------------------------------------
/dev_app_desktop_uwp.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common dev settings for desktop app development
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "CommonDevTools.ps1";
29 |
30 | #--- Tools ---
31 | #--- Installing VS and VS Code with Git
32 | # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
33 | # https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
34 | # https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
35 | # visualstudio2017community
36 | # visualstudio2017professional
37 | # visualstudio2017enterprise
38 |
39 | choco install -y visualstudio2017community --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
40 | Update-SessionEnvironment #refreshing env due to Git install
41 |
42 | #--- UWP Workload and installing Windows Template Studio ---
43 | choco install -y visualstudio2017-workload-azure
44 | choco install -y visualstudio2017-workload-universal
45 | executeScript "WindowsTemplateStudio.ps1";
46 | executeScript "GetUwpSamplesOffGithub.ps1";
47 |
48 | #--- reenabling critial items ---
49 | Enable-UAC
50 | Enable-MicrosoftUpdate
51 | Install-WindowsUpdate -acceptEula
52 |
--------------------------------------------------------------------------------
/dev_app.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common dev settings for desktop app development
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "CommonDevTools.ps1";
29 |
30 | #--- Tools ---
31 | #--- Installing VS and VS Code with Git
32 | # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
33 | # https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
34 | # https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
35 | # visualstudio2017community
36 | # visualstudio2017professional
37 | # visualstudio2017enterprise
38 |
39 | choco install -y visualstudio2017community --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
40 | Update-SessionEnvironment #refreshing env due to Git install
41 |
42 | #--- UWP Workload and installing Windows Template Studio ---
43 | choco install -y visualstudio2017-workload-azure
44 | choco install -y visualstudio2017-workload-universal
45 | choco install -y visualstudio2017-workload-manageddesktop
46 | choco install -y visualstudio2017-workload-nativedesktop
47 |
48 | executeScript "WindowsTemplateStudio.ps1";
49 | executeScript "GetUwpSamplesOffGithub.ps1";
50 |
51 | #--- reenabling critial items ---
52 | Enable-UAC
53 | Enable-MicrosoftUpdate
54 | Install-WindowsUpdate -acceptEula
55 |
--------------------------------------------------------------------------------
/scripts/RemoveDefaultApps.ps1:
--------------------------------------------------------------------------------
1 | #--- Uninstall unnecessary applications that come with Windows out of the box ---
2 | Write-Host "Uninstall some applications that come with Windows out of the box" -ForegroundColor "Yellow"
3 |
4 | #Referenced to build script
5 | # https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update
6 | # https://github.com/jayharris/dotfiles-windows/blob/master/windows.ps1#L157
7 | # https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
8 | # https://gist.github.com/alirobe/7f3b34ad89a159e6daa1
9 | # https://github.com/W4RH4WK/Debloat-Windows-10/blob/master/scripts/remove-default-apps.ps1
10 |
11 | function removeApp {
12 | Param ([string]$appName)
13 | Write-Output "Trying to remove $appName"
14 | Get-AppxPackage $appName -AllUsers | Remove-AppxPackage
15 | Get-AppXProvisionedPackage -Online | Where DisplayName -like $appName | Remove-AppxProvisionedPackage -Online
16 | }
17 |
18 | $applicationList = @(
19 | "Microsoft.BingFinance"
20 | "Microsoft.3DBuilder"
21 | "Microsoft.BingNews"
22 | "Microsoft.BingSports"
23 | "Microsoft.BingWeather"
24 | "Microsoft.CommsPhone"
25 | "Microsoft.Getstarted"
26 | "Microsoft.WindowsMaps"
27 | "*MarchofEmpires*"
28 | "Microsoft.GetHelp"
29 | "Microsoft.Messaging"
30 | "*Minecraft*"
31 | "Microsoft.MicrosoftOfficeHub"
32 | "Microsoft.OneConnect"
33 | "Microsoft.WindowsPhone"
34 | "Microsoft.WindowsSoundRecorder"
35 | "*Solitaire*"
36 | "Microsoft.MicrosoftStickyNotes"
37 | "Microsoft.Office.Sway"
38 | "Microsoft.XboxApp"
39 | "Microsoft.XboxIdentityProvider"
40 | "Microsoft.XboxGameOverlay"
41 | "Microsoft.XboxGamingOverlay"
42 | "Microsoft.ZuneMusic"
43 | "Microsoft.ZuneVideo"
44 | "Microsoft.NetworkSpeedTest"
45 | "Microsoft.FreshPaint"
46 | "Microsoft.Print3D"
47 | "Microsoft.People*"
48 | "Microsoft.Microsoft3DViewer"
49 | "Microsoft.MixedReality.Portal*"
50 | "*Skype*"
51 | "*Autodesk*"
52 | "*BubbleWitch*"
53 | "king.com*"
54 | "G5*"
55 | "*Dell*"
56 | "*Facebook*"
57 | "*Keeper*"
58 | "*Netflix*"
59 | "*Twitter*"
60 | "*Plex*"
61 | "*.Duolingo-LearnLanguagesforFree"
62 | "*.EclipseManager"
63 | "ActiproSoftwareLLC.562882FEEB491" # Code Writer
64 | "*.AdobePhotoshopExpress"
65 | );
66 |
67 | foreach ($app in $applicationList) {
68 | removeApp $app
69 | }
70 |
--------------------------------------------------------------------------------
/dev_virtualmachine_createScript.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # Common dev settings for desktop app development
4 |
5 | Disable-UAC
6 |
7 | # Get the base URI path from the ScriptToCall value
8 | $bstrappackage = "-bootstrapPackage"
9 | $helperUri = $Boxstarter['ScriptToCall']
10 | $strpos = $helperUri.IndexOf($bstrappackage)
11 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12 | $helperUri = $helperUri.TrimStart("'", " ")
13 | $helperUri = $helperUri.TrimEnd("'", " ")
14 | $helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15 | $helperUri += "/scripts"
16 | write-host "helper script base URI is $helperUri"
17 |
18 | function executeScript {
19 | Param ([string]$script)
20 | write-host "executing $helperUri/$script ..."
21 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22 | }
23 |
24 | #--- Setting up Windows ---
25 | executeScript "SystemConfiguration.ps1";
26 | executeScript "FileExplorerSettings.ps1";
27 | executeScript "RemoveDefaultApps.ps1";
28 | executeScript "CommonDevTools.ps1";
29 |
30 | #--- Tools ---
31 | #--- Installing VS and VS Code with Git
32 | # See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
33 | # https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
34 | # https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
35 | # visualstudio2017community
36 | # visualstudio2017professional
37 | # visualstudio2017enterprise
38 |
39 | choco install -y visualstudio2017community --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
40 | Update-SessionEnvironment #refreshing env due to Git install
41 |
42 | #--- UWP Workload and installing Windows Template Studio ---
43 | choco install -y visualstudio2017-workload-azure
44 | choco install -y visualstudio2017-workload-universal
45 | choco install -y visualstudio2017-workload-manageddesktop
46 | choco install -y visualstudio2017-workload-nativedesktop
47 |
48 | executeScript "WindowsTemplateStudio.ps1";
49 | executeScript "GetUwpSamplesOffGithub.ps1";
50 |
51 | executeScript "WSL.ps1";
52 |
53 | #--- reenabling critial items ---
54 | Enable-UAC
55 | Enable-MicrosoftUpdate
56 | Install-WindowsUpdate -acceptEula
57 |
--------------------------------------------------------------------------------
/demos/chocolateyfest2018.ps1:
--------------------------------------------------------------------------------
1 | # Description: Boxstarter Script
2 | # Author: Microsoft
3 | # chocolatey fest demo
4 |
5 | Disable-UAC
6 | $ConfirmPreference = "None" #ensure installing powershell modules don't prompt on needed dependencies
7 |
8 | # Get the base URI path from the ScriptToCall value
9 | $bstrappackage = "-bootstrapPackage"
10 | $helperUri = $Boxstarter['ScriptToCall']
11 | $strpos = $helperUri.IndexOf($bstrappackage)
12 | $helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
13 | $helperUri = $helperUri.TrimStart("'", " ")
14 | $helperUri = $helperUri.TrimEnd("'", " ")
15 | $strpos = $helperUri.LastIndexOf("/demos/")
16 | $helperUri = $helperUri.Substring(0, $strpos)
17 | $helperUri += "/scripts"
18 | write-host "helper script base URI is $helperUri"
19 |
20 | function executeScript {
21 | Param ([string]$script)
22 | write-host "executing $helperUri/$script ..."
23 | iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
24 | }
25 |
26 | #--- Setting up Windows ---
27 | executeScript "FileExplorerSettings.ps1";
28 | executeScript "SystemConfiguration.ps1";
29 | executeScript "RemoveDefaultApps.ps1";
30 | executeScript "CommonDevTools.ps1";
31 | executeScript "Browsers.ps1";
32 |
33 | executeScript "HyperV.ps1";
34 | RefreshEnv
35 | executeScript "WSL.ps1";
36 | RefreshEnv
37 | executeScript "Docker.ps1";
38 |
39 | choco install -y powershell-core
40 | choco install -y azure-cli
41 | Install-Module -Force Az
42 | Install-Module -Force posh-git
43 | choco install -y microsoftazurestorageexplorer
44 | choco install -y terraform
45 |
46 | # Install tools in WSL instance
47 | write-host "Installing tools inside the WSL distro..."
48 | Ubuntu1804 run apt install ansible -y
49 | Ubuntu1804 run apt install nodejs -y
50 |
51 | # personalize
52 | choco install -y microsoft-teams
53 | choco install -y office365business
54 |
55 | # checkout recent projects
56 | mkdir C:\github
57 | cd C:\github
58 | git.exe clone https://github.com/microsoft/windows-dev-box-setup-scripts
59 | git.exe clone https://github.com/microsoft/winappdriver
60 | git.exe clone https://github.com/microsoft/wsl
61 | git.exe clone https://github.com/PowerShell/PowerShell
62 |
63 | # set desktop wallpaper
64 | Invoke-WebRequest -Uri 'http://chocolateyfest.com/wp-content/uploads/2018/05/img-bg-front-page-header-NO_logo-opt.jpg' -Method Get -ContentType image/jpeg -OutFile 'C:\github\chocofest.jpg'
65 | Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value 'C:\github\chocofest.jpg'
66 | rundll32.exe user32.dll, UpdatePerUserSystemParameters
67 | RefreshEnv
68 |
69 | Enable-UAC
70 | Enable-MicrosoftUpdate
71 | Install-WindowsUpdate -acceptEula
72 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | ## Security
4 |
5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6 |
7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
8 |
9 | ## Reporting Security Issues
10 |
11 | **Please do not report security vulnerabilities through public GitHub issues.**
12 |
13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
14 |
15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
16 |
17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
18 |
19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20 |
21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22 | * Full paths of source file(s) related to the manifestation of the issue
23 | * The location of the affected source code (tag/branch/commit or direct URL)
24 | * Any special configuration required to reproduce the issue
25 | * Step-by-step instructions to reproduce the issue
26 | * Proof-of-concept or exploit code (if possible)
27 | * Impact of the issue, including how an attacker might exploit the issue
28 |
29 | This information will help us triage your report more quickly.
30 |
31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
32 |
33 | ## Preferred Languages
34 |
35 | We prefer all communications to be in English.
36 |
37 | ## Policy
38 |
39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
40 |
41 |
42 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing to Windows Dev Box Setup Scripts
2 |
3 | The goal for **Windows Dev Box Setup Scripts** is to help developers get their dev box up and going quickly.
4 |
5 | ## Before you begin
6 |
7 | We're grateful for any and all contributions. Before you submit a PR we ask that you consider the following points.
8 |
9 | * Please create or comment on an existing issue to let us know you're interested in working on something before you start the work. Not only does this avoid multiple people unexpectedly working on the same thing at the same time but it also enables the community to discuss the particulars with you. It's less work for everyone, in the long run, to establish this up front.
10 | * When adding to a setup script, the addition should be useful to the majority of developers working with the dev stack the script is intended for.
11 |
12 |
13 | ## A good pull request
14 |
15 | Every contribution has to come with:
16 |
17 | * Before making the change, **please open an issue** or comment on an existing issue, and start discussing with the community to see if the idea/feature is interesting enough.
18 |
19 | * For both new scripts and script changes please test the entire script on Windows 10.
20 |
21 | The core team will test the change to validate it before merging it.
22 |
23 |
24 | ## Repository Structure
25 |
26 | Recipe scripts are named with **dev_[MAJOR_AREA]_[MINORAREA]**.
27 | The Minor Area is optional.
28 |
29 | Examples
30 | - dev_web_nodejs
31 | - dev_app_android
32 | - dev_ml
33 |
34 | Examples of Major Areas
35 | - web
36 | - app
37 | - ml (machine learning)
38 | - iot
39 |
40 | The recipe scripts are intended to be short. Most of script logic should live in helper scripts which live in the **scripts** folder. You can add to existing helper scripts or make new helper scripts.
41 |
42 | If you make a new recipe script that includes additional manual steps please create a new folder which includes your new script and a Readme with these instructions.
43 |
44 | ## Testing a script change
45 | Testing script changes is best done on a clean machine. One way to do this without modifying your primary environment is via a Virtual Machine.
46 |
47 | Here's an example of how to set up a test workflow
48 | 1. [Install Hyper-V Manager](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)
49 | 1. Create a new VM using [Quick Create](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine)
50 | 1. Save a [checkpoint](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/checkpoints) as your 'clean' restore point
51 |
52 | When you've made script changes to your fork you can run the updated script in this clean VM. In this VM open a browser window and paste the 1-click link which will run your modified recipe script.
53 |
54 | `http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/GITHUB_DOMAIN/windows-dev-box-setup-scripts/YOUR_BRANCH/dev_web_nodejs.ps
55 | `
56 |
57 | When you've finished testing, in Hyper-V Manager reset this VM to the clean checkpoint so it's ready the next time you test a script.
58 |
59 |
60 |
61 | Thank you!
--------------------------------------------------------------------------------
/ORGANIZATION.md:
--------------------------------------------------------------------------------
1 | ## Using Chocolatey and Boxstarter in an organization
2 | Does your organization have strong policies against using the internet? Are you deploying software in air-gapped networks? No problem, the Chocolatey client is [an offline solution that has zero call home](https://chocolatey.org/security#chocolatey-client), and the best part is you [can create packages and host them internally for free]((https://chocolatey.org/docs/how-to-setup-offline-installation)) (see [What is Chocolatey?](https://chocolatey.org/docs/getting-started#what-is-chocolatey) and [Set Up Chocolatey for Organizational/Internal Use](https://chocolatey.org/docs/how-to-setup-offline-installation)). Yes, you read that right, there's no charge for this! It is important to point out that Chocolatey itself installs with the [Community Package Repository](https://chocolatey.org/packages) already set as a default source repository to allow ease of installs for the greater community, but it is a simple adjustment to remove that and add your own internal sources.
3 |
4 | As an organization, you may not be keen to reach out to the internet. That's fine, with just a few modifications, you can still take advantage of these scripts:
5 |
6 | 1. Ensure you have the Chocolatey nupkg itself on your internal package repository. This is done in the first few sections of the [organizational deployment guide](https://chocolatey.org/docs/how-to-setup-offline-installation).
7 | 1. You may need to also grab the [Boxstarter packages](https://chocolatey.org/packages?q=id%3Aboxstarter) and put them on your internal repository (on each package page in the left menu you will find a download link that will download the nupkg file). The packages may also need to be [internalized](https://chocolatey.org/docs/how-to-recompile-packages) before being put on your internal repository to remove any runtime internet access.
8 | 1. Review the script you want to use. Take note of the package names. You will need to either [internalize those packages](https://chocolatey.org/docs/how-to-recompile-packages) or create your own packages with embedded binaries or pointed to internal resources.
9 | 1. In the script prior to any calls to Chocolatey, you need to add the following code:
10 | ~~~powershell
11 | # Ensure the community repository is removed
12 | choco source remove --name="'chocolatey'"
13 |
14 | # Sources - Add your internal repositories (add other options like auth/allow self service as needed - https://chocolatey.org/docs/commands-source):
15 | choco source add --name="'internal_server'" --source="'http://somewhere.internal/chocolatey'" --priority="'1'" --bypass-proxy --user bob --password something
16 | choco source add --name="'internal_file_share'" --source="'\\fileshare\chocolatey'" --priority="'2'" --bypass-proxy
17 | #TODO: Add other sources here
18 | ~~~
19 | 1. Alternatively, you could add the following to the end of all of the package installation/upgrade calls:
20 | ~~~powershell
21 | --source="'location_name[; location_uri]'"
22 | ~~~
23 | 1. Unfortunately, you may not be able to take advantage of Boxstarter's one-click installer links that are available in the "How to run the scripts" section above. You can still use [an alternative means of running those scripts](http://www.boxstarter.org/InstallingPackages) that still works quite well! Please see the note below for additional addendums.
24 |
25 | **NOTE:** At this time, you may find that Boxstarter's one-click installer is hosted externally. It may use the community repository to get those [Boxstarter packages](https://chocolatey.org/packages?q=id%3Aboxstarter) deployed. You may need to set up the one-click installer or [use an alternative means of running your scripts](http://www.boxstarter.org/InstallingPackages) to ensure Boxstarter is using internal locations as well. We'll provide more details on how to do this later (and possibly fixes to Boxstarter itself to allow this)!
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.suo
8 | *.user
9 | *.userosscache
10 | *.sln.docstates
11 |
12 | # User-specific files (MonoDevelop/Xamarin Studio)
13 | *.userprefs
14 |
15 | # Build results
16 | [Dd]ebug/
17 | [Dd]ebugPublic/
18 | [Rr]elease/
19 | [Rr]eleases/
20 | x64/
21 | x86/
22 | bld/
23 | [Bb]in/
24 | [Oo]bj/
25 | [Ll]og/
26 |
27 | # Visual Studio 2015 cache/options directory
28 | .vs/
29 | # Uncomment if you have tasks that create the project's static files in wwwroot
30 | #wwwroot/
31 |
32 | # MSTest test Results
33 | [Tt]est[Rr]esult*/
34 | [Bb]uild[Ll]og.*
35 |
36 | # NUNIT
37 | *.VisualState.xml
38 | TestResult.xml
39 |
40 | # Build Results of an ATL Project
41 | [Dd]ebugPS/
42 | [Rr]eleasePS/
43 | dlldata.c
44 |
45 | # .NET Core
46 | project.lock.json
47 | project.fragment.lock.json
48 | artifacts/
49 | **/Properties/launchSettings.json
50 |
51 | *_i.c
52 | *_p.c
53 | *_i.h
54 | *.ilk
55 | *.meta
56 | *.obj
57 | *.pch
58 | *.pdb
59 | *.pgc
60 | *.pgd
61 | *.rsp
62 | *.sbr
63 | *.tlb
64 | *.tli
65 | *.tlh
66 | *.tmp
67 | *.tmp_proj
68 | *.log
69 | *.vspscc
70 | *.vssscc
71 | .builds
72 | *.pidb
73 | *.svclog
74 | *.scc
75 |
76 | # Chutzpah Test files
77 | _Chutzpah*
78 |
79 | # Visual C++ cache files
80 | ipch/
81 | *.aps
82 | *.ncb
83 | *.opendb
84 | *.opensdf
85 | *.sdf
86 | *.cachefile
87 | *.VC.db
88 | *.VC.VC.opendb
89 |
90 | # Visual Studio profiler
91 | *.psess
92 | *.vsp
93 | *.vspx
94 | *.sap
95 |
96 | # TFS 2012 Local Workspace
97 | $tf/
98 |
99 | # Guidance Automation Toolkit
100 | *.gpState
101 |
102 | # ReSharper is a .NET coding add-in
103 | _ReSharper*/
104 | *.[Rr]e[Ss]harper
105 | *.DotSettings.user
106 |
107 | # JustCode is a .NET coding add-in
108 | .JustCode
109 |
110 | # TeamCity is a build add-in
111 | _TeamCity*
112 |
113 | # DotCover is a Code Coverage Tool
114 | *.dotCover
115 |
116 | # Visual Studio code coverage results
117 | *.coverage
118 | *.coveragexml
119 |
120 | # NCrunch
121 | _NCrunch_*
122 | .*crunch*.local.xml
123 | nCrunchTemp_*
124 |
125 | # MightyMoose
126 | *.mm.*
127 | AutoTest.Net/
128 |
129 | # Web workbench (sass)
130 | .sass-cache/
131 |
132 | # Installshield output folder
133 | [Ee]xpress/
134 |
135 | # DocProject is a documentation generator add-in
136 | DocProject/buildhelp/
137 | DocProject/Help/*.HxT
138 | DocProject/Help/*.HxC
139 | DocProject/Help/*.hhc
140 | DocProject/Help/*.hhk
141 | DocProject/Help/*.hhp
142 | DocProject/Help/Html2
143 | DocProject/Help/html
144 |
145 | # Click-Once directory
146 | publish/
147 |
148 | # Publish Web Output
149 | *.[Pp]ublish.xml
150 | *.azurePubxml
151 | # TODO: Comment the next line if you want to checkin your web deploy settings
152 | # but database connection strings (with potential passwords) will be unencrypted
153 | *.pubxml
154 | *.publishproj
155 |
156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
157 | # checkin your Azure Web App publish settings, but sensitive information contained
158 | # in these scripts will be unencrypted
159 | PublishScripts/
160 |
161 | # NuGet Packages
162 | *.nupkg
163 | # The packages folder can be ignored because of Package Restore
164 | **/packages/*
165 | # except build/, which is used as an MSBuild target.
166 | !**/packages/build/
167 | # Uncomment if necessary however generally it will be regenerated when needed
168 | #!**/packages/repositories.config
169 | # NuGet v3's project.json files produces more ignorable files
170 | *.nuget.props
171 | *.nuget.targets
172 |
173 | # Microsoft Azure Build Output
174 | csx/
175 | *.build.csdef
176 |
177 | # Microsoft Azure Emulator
178 | ecf/
179 | rcf/
180 |
181 | # Windows Store app package directories and files
182 | AppPackages/
183 | BundleArtifacts/
184 | Package.StoreAssociation.xml
185 | _pkginfo.txt
186 |
187 | # Visual Studio cache files
188 | # files ending in .cache can be ignored
189 | *.[Cc]ache
190 | # but keep track of directories ending in .cache
191 | !*.[Cc]ache/
192 |
193 | # Others
194 | ClientBin/
195 | ~$*
196 | *~
197 | *.dbmdl
198 | *.dbproj.schemaview
199 | *.jfm
200 | *.pfx
201 | *.publishsettings
202 | orleans.codegen.cs
203 |
204 | # Since there are multiple workflows, uncomment next line to ignore bower_components
205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
206 | #bower_components/
207 |
208 | # RIA/Silverlight projects
209 | Generated_Code/
210 |
211 | # Backup & report files from converting an old project file
212 | # to a newer Visual Studio version. Backup files are not needed,
213 | # because we have git ;-)
214 | _UpgradeReport_Files/
215 | Backup*/
216 | UpgradeLog*.XML
217 | UpgradeLog*.htm
218 |
219 | # SQL Server files
220 | *.mdf
221 | *.ldf
222 | *.ndf
223 |
224 | # Business Intelligence projects
225 | *.rdl.data
226 | *.bim.layout
227 | *.bim_*.settings
228 |
229 | # Microsoft Fakes
230 | FakesAssemblies/
231 |
232 | # GhostDoc plugin setting file
233 | *.GhostDoc.xml
234 |
235 | # Node.js Tools for Visual Studio
236 | .ntvs_analysis.dat
237 | node_modules/
238 |
239 | # Typescript v1 declaration files
240 | typings/
241 |
242 | # Visual Studio 6 build log
243 | *.plg
244 |
245 | # Visual Studio 6 workspace options file
246 | *.opt
247 |
248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
249 | *.vbw
250 |
251 | # Visual Studio LightSwitch build output
252 | **/*.HTMLClient/GeneratedArtifacts
253 | **/*.DesktopClient/GeneratedArtifacts
254 | **/*.DesktopClient/ModelManifest.xml
255 | **/*.Server/GeneratedArtifacts
256 | **/*.Server/ModelManifest.xml
257 | _Pvt_Extensions
258 |
259 | # Paket dependency manager
260 | .paket/paket.exe
261 | paket-files/
262 |
263 | # FAKE - F# Make
264 | .fake/
265 |
266 | # JetBrains Rider
267 | .idea/
268 | *.sln.iml
269 |
270 | # CodeRush
271 | .cr/
272 |
273 | # Python Tools for Visual Studio (PTVS)
274 | __pycache__/
275 | *.pyc
276 |
277 | # Cake - Uncomment if you are using it
278 | # tools/**
279 | # !tools/packages.config
280 |
281 | # Telerik's JustMock configuration file
282 | *.jmconfig
283 |
284 | # BizTalk build output
285 | *.btp.cs
286 | *.btm.cs
287 | *.odx.cs
288 | *.xsd.cs
289 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # About this project
3 | The goal of this project is to provide a central place to share ideas for streamlining dev box setup and provide sample scripts for common dev scenarios. It's likely you will want to take the scripts here and modify them to fit your particular needs. When you make those changes if you think others would benefit please consider submitting a PR. Before you contribute please see the [Contribution Guidelines](CONTRIBUTING.md).
4 |
5 | These scripts leverage two popular open source projects.
6 | - Boxstarter [boxstarter.org](http://boxstarter.org)
7 | - Chocolatey [chocolatey.org](http://chocolatey.org)
8 |
9 | Boxstarter is a wrapper for Chocolatey and includes features like managing reboots for you. We're using the Boxstarter web launcher to start the installation process:
10 | https://boxstarter.org/Learn/WebLauncher
11 |
12 | ## Project structure
13 | The script code is organized in a hierarchy
14 |
15 | **Recipes**
16 | A recipe is the script you run. It calls multiple helper scripts. These currently live in the root of the project (dev_app.ps1, dev_webnodejs.ps1, etc.)
17 |
18 | **Helper Scripts**: A helper script performs setup routines that may be useful by many recipes. Recipes call helper scripts (you don't run helper scripts directly). The helper scripts live in the **scripts** folder
19 |
20 | ## You may want to customize the scripts
21 | These scripts should cover a lot of what you need but will not likely match your personal preferences exactly. In this case please fork the project and change the scripts however you desire. We really appreciate PR's back to this project if you have recommended changes.
22 |
23 | *Note: The one-click links use the following format. When working out of a different Fork or Branch you'll want to update the links as follows:*
24 |
25 | `http://boxstarter.org/package/url?https://raw.githubusercontent.com/GITHUB_DOMAIN/windows-dev-box-setup-scripts/YOUR_BRANCH/RECIPE_NAME.ps1
26 | `
27 |
28 | For more info on testing your changes take a look at the [contribution guidelines](CONTRIBUTING.md).
29 |
30 | ## How to run the scripts
31 | Before you begin, please read the [Legal](#Legal) section.
32 |
33 | To run a recipe script, click a link in the table below from your target machine. This will download the Boxstarter one-click application, and prompt you for Boxstarter to run with Administrator privileges (which it needs to do its job). Clicking yes in this dialog will cause the recipe to begin. You can then leave the job unattended and come back when it's finished.
34 |
35 | |Click link to run |Description |
36 | |---------|---------|
37 | |Full Desktop App | Windows Desktop App Development (Visual Studio, Windows SDK, C++, UWP, .NET (WPF and Winforms)) |
38 | |UWP Desktop App | Windows Desktop App Development (Visual Studio, Windows SDK, UWP) |
39 | |.NET Desktop App | Windows Desktop App Development (Visual Studio, Windows SDK, .NET (WPF and Winforms)) |
40 | |C++ Desktop App | Windows Desktop App Development (Visual Studio, Windows SDK, C++) |
41 | |Web | Web (VS Code, WSL, Multiple Browsers) |
42 | |Web NodeJS | Web Dev with NodeJS (Web + NodeJS LTS)¹ |
43 | |Machine Learning Windows| Machine Learning with only Windows native tools |
44 | |Machine Learning Linux| Machine Learning with Linux tools running on WSL |
45 | |DevOps Azure| Client setup for DevOps with Azure |
46 | | | Xamarin (Visual Studio, Xamarin, Android SDK) |
47 | | | Containers (Docker, Kubernetes, etc...) |
48 | | | Submit a PR with a recommended configuration! |
49 |
50 | **Notes:**
51 | 1. If you are using WSL there's a followup step we recommend after running the setup script. When the script finishes you will only have a root user with a blank password. You should manually create a non-root user via `$ sudo adduser [USERNAME] sudo`
52 | with a non-blank password. Use this user going forward. For more info on WSL please refer to the [documentation](https://docs.microsoft.com/en-us/windows/wsl/about).
53 | 2. If you're a Node.js contributor working on Node.js core, please see the [Node.js Bootstrapping Guide](https://github.com/nodejs/node/tree/master/tools/bootstrap) or [click here to run](http://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter).
54 |
55 | ## Known issues
56 | - The Boxstarter ClickOnce installer does not work when using Chrome. This issue is being tracked [here](https://github.com/chocolatey/boxstarter/issues/345). Please use Edge to run the ClickOnce installer.
57 | - Reboot is not always logging you back in to resume the script. This is being tracked [here](https://github.com/chocolatey/boxstarter/issues/318). The workaround is to login manually and the script will continue running.
58 | - There have been reports of Windows 1803 not successfully launching Boxstarter via the web launcher. See this issue for details: https://github.com/chocolatey/boxstarter/issues/301
59 |
60 | ## Working with Chocolatey in an organization?
61 | As an organization, you may not be keen to reach out to the internet. That's fine as with just a few modifications you can still take advantage of these scripts. Visit the [organizational use page](ORGANIZATION.md) to learn how.
62 |
63 | ## Working in education?
64 | In a classroom setting it's a great idea to give your students a recipe script so they can all get setup quickly and reliably. You can modify your recipe script to include downloading course materials and sample projects. To do this, start by forking this project and follow the instructions [here](#you-may-want-to-customize-the-scripts).
65 |
66 | ## Don't have administrative access?
67 | Are you in an environment where you don't have any administrative access on your machine? No problem, you can still take advantage of Chocolatey and manage "portable" software. You can also use a VM where you may have administrative access (see next section).
68 |
69 | Unfortunately some of Boxstarter's functionality does require administrative privileges to run, and it will prompt to elevate to administrator if not already elevated.
70 |
71 | So while you won't be able to use Boxstarter, take a look at Chocolatey's documentation on [Non-Administrative Install](https://chocolatey.org/install#non-administrative-install). There you will find resources and an example PowerShell script that gives you a quick setup of Chocolatey and installation of a few packages. While not full on Boxstarter, you are still going to get a pretty rapid setup!
72 |
73 | **NOTE:**
74 | It's important to point out the open source edition of the Chocolatey client will not allow you to magically install software that requires administrative access, so you will need to find packages that are portable or create those and push them to the community repository or your internal sources.
75 |
76 | ## Setting up a VM
77 | Windows 10 VM setup instructions
78 | 1. Use Hyper-V's [Quick Create](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/quick-create-virtual-machine) to set up a VM
79 | 2. Once signed in to your VM, visit this project in a web browser and click one of the script links in the Readme
80 |
81 | # Legal
82 | Please read before using scripts.
83 |
84 | #### Using our scripts downloads third party software
85 | When you use our sample scripts, these will direct to Chocolately to install the packages.
86 | By using Chocolatey to install a package, you are accepting the license for the application, executable(s), or other artifacts delivered to your machine as a result of a Chocolatey install. This acceptance occurs whether you know the license terms or not. Read and understand the license terms of any package you plan to install prior to installation through Chocolatey. If you do not want to accept the license of a package you are installing, you need to uninstall the package and any artifacts that end up on your machine as a result of the install.
87 |
88 | #### Our samples are provided AS-IS without any warranties of any kind
89 | Chocolately has implemented security safeguards in their process to help protect the community from malicious or pirated software, but any use of our scripts is at your own risk. Please read the Chocolately's legal terms of use and the Boxstarter project license as well as how the community repository for Chocolatey.org is maintained.
90 |
91 | Our project is subject to the MIT License and we make no warranties, express or implied of any kind. In no event is Microsoft or contributing copyright holders be liable for any claim, damages or other liability arising from out of or in connection with the use of the project software or the use of other dealings in the project software.
92 |
93 | # Contributing
94 | Do you want to contribute? We would love your help. Here are our contribution guidelines.
95 |
--------------------------------------------------------------------------------