项目作者: rajasoun
项目描述 :
Win10X Setup for HyperV, WSL, Docker and Applications
高级语言: PowerShell
项目地址: git://github.com/rajasoun/win10x-onboard.git
win10x-onboard
Windows Laptop setup for Developer with Docker Desktop & Applications.
The primary purpose is to have a standard way of configuring a development environment that is simple, fast and completely automated.
Following Applications & Tools are setup/teardown from the automation script
Containerization - [Docker Desktop]
Containerization - Docker Desktop
- Check Windows Version for Compatibility
- Check HyperV is Enabled
- Enable Virtualization in BIOS - If Required
- Enable WSL2 & Update Kernel
Applications and Tools
1. Package Manager -scoop
- Git Bash
- GitHub CLI
- Code Editor (IDE) - Visual Studio Code
- concfg
- PowerSession
1. Visual Studio Code Extensions
- ms-vscode-remote.remote-containers - Developing inside a Container
- golang.go
1. References:
- Docker Desktop for Windows Troubleshooting Guide
Automation
Automation script does following Prerequisites Checks, Setup and Tests.
Open Powershell as current user.
TIP: Search for Powershell
in Windows Start Menu and open it.
1. Prerequisites Checks
1. Windows Version
Check Windows 10 and Above
sh
Get-ComputerInfo | select WindowsProductName, WindowsVersion
The output should contain one of the following
Windoes 10 Pro
Windows 10 Enterprise and Education Edition
* Windows 11
HyperV is supported only in above versions of Windows by default.
HyperV allows running Virtual Machine on Windows.
2. HyperV is Enabled
1. In Powershell Windows
sh
systeminfo /fo csv | ConvertFrom-Csv | select OS*, System*, Hotfix*,Hyper-V* | Format-List
2. Check the output
- If it says A hypervisor has been detected. Features required for Hyper-V will not be displayed.
This means Hyper-V is already enabled
- Otherwise, check for Virtualization Enabled in Firmware:
.
* If its No
, click here.
2. Setup
1. Workspace & Applications
1.1 Workspace
In Powershell window Run following commands for workspace setup
sh
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope currentuser
iwr -useb https://raw.githubusercontent.com/rajasoun/win10x-onboard/main/e2e.ps1 | iex
cd ~\workspace
git clone https://github.com/rajasoun/win10x-onboard
cd win10x-onboard
Invoke-Pester src\lib\Workspace.Tests.ps1 -Output Detailed
1.2 Applications Setup
In Powershell window Run following commands for Prerequisite Checks
sh
.\e2e.ps1 apps
1.3 Check Applications Setup
In Powershell window Run following commands for Automated Checks
sh
.\e2e.ps1 apps-setup-test
2. HyperV
1. In Powershell window Run following commands following commands to setup HyperV.
Switch to Elevated Previlage
sh
.\e2e.ps1 elevate
In the New Elevated Powershell as Administrator
sh
.\e2e.ps1 hyperv
> FYI: System will restart.
2. After Restarting Windows, search for Turn Windows features on or off
in the Start Menu search bar and open it.

3. In the Window, lookout for Hyper-V
, Virtual Machine Platform
and Windows Hypervisor Platform
. Then check the check boxes before them and click OK
. This will also take some time and then a Restart is necessary.
3. WSL2 & Kernel Update
In Powershell window Run following commands following commands to setup WSL, WSL2 Kernel Update
Switch to Elevated Previlage
sh
.\e2e.ps1 elevate
In the New Elevated Powershell as Administrator
sh
.\e2e.ps1 wsl
> FYI: System will restart.
4. Docker Desktop
Install Docker Desktop For Windows
5. Test Docker Setup
1. Switch to bash shell
sh
.\e2e.ps1 bash-it
nix/assist.sh bash-setup
1. Docker Test: Open Git Bash command prompt and output should contain Hello from Docker
sh
docker run --rm hello-world
1. Check the Speed of the Internet using docker
sh
MSYS_NO_PATHCONV=1 docker run --rm rajasoun/speedtest:0.1.0 "/go/bin/speedtest-go"
2. Switch to Powershell
sh
exit
3. Test
In Powershell Window
1. TDD Scripts
sh
.\e2e.ps1 apps-setup-test
Switch to Elevated Previlage
sh
.\e2e.ps1 elevate
In the New Elevated Powershell as Administrator
sh
.\e2e.ps1 system-setup-test
2. ATDD Scripts
sh
Invoke-Pester e2e.Tests.ps1 -Tag "prerequisite" -Output Detailed
Invoke-Pester e2e.Tests.ps1 -Tag "apps" -Output Detailed
TDD - Test Driven Development
ATDD - Acceptance Test Driven Development
4. Teardown
4.1 Teardown Applications
To uninstall scoop and all applications installed via scoop
sh
.\e2e.ps1 teardown
4.2 Disable HyperV & WSL
To Disable HyperV & WSL. Restart at End
sh
.\e2e.ps1 elevate
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
4.3 Uninstall Docker Desktop
1. From the Windows Start menu, select Settings > Apps > Apps & features.
1. Select Docker Desktop from the Apps & features list and then select Uninstall.
1. Click Uninstall to confirm your selection.
Enable Virtualization in BIOS
Manual Steps
The process of enabling virtualization can vary a lot depending on the motherboard manufacturer, but it can be summarized in a few steps:
1. Completely Shutdown you Computer and turn it on again.
1. Keep pressing the key to open the BIOS (usually it is Del
, F1
, F2
, F4
, F11
, or F12
). This key depends on the Motherboard manufacturer. You can easily google it out.
1. Once you get into the BIOS, it may look very scary or intimidating, but don’t worry, you will get it right. Mouse may not work in BIOS so you might have to use the Directional or Arrow keys and the Enter key of the Keyboard to navigate.
- Search for the CPU configuration section, it can be called CPU configuration
, processor
, Northbridge
or Chipset
and may be under an advanced
or advanced mode
tab or menu.
- Now you need to look for the virtualization option and enable it, it can have different names such as Hyper-V
, Vanderpool
, SVM
, AMD-V
, Intel Virtualization Technology
or VT-X
.
- Once its enabled, save and reboot your pc.
> If this part did not help you, you can specifically go the Website of the Mother Board Manufacturer of you Computer and ask for help.
Credits:
- Manu Hali
- Rohini Gorige
Last Updated by Rohini Gorige