If you need to build a Windows 10 test environment with Powershell 7, Windows Terminal, WSL2, Visual Studio Code and Visual Studio 2019 then you’re in the right place. In the steps below I will walk you through building a test environment on your existing PC/laptop using Hyper-V.
Prerequisites
- Windows 10 build 2004 or newer
- Hyper-V feature installed
Open Hyper-V and Create Windows 10 dev Virtual Machine
This will take a while. Good time for a break.
You need to enable nested virtualization in order to launch Ubuntu. Shutdown the VM and run this powershell command from the physical Windows 10 device (not from the VM)
Set-VMProcessor -VMName "Windows 10 dev environment" -ExposeVirtualizationExtensions $true
You now have a Windows 10 dev environment with WSL2, Powershell 7, Windows Terminal, Visual Studio Code and Visual Studio 2019. I hope this article was helpful. If you see something that you would like to add please post your comments below.
References:
https://docs.microsoft.com/en-us/windows/wsl/install-win10
https://docs.microsoft.com/en-us/powershell/scripting/install/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7
https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/nested-virtualization