Windows Subsytem for Linux and VMware Workstation player do not play nicely together.
This script uses bcedit to toggle the hypervisorlaunchtype
between auto
and off
.
It will show what the current setting is and ask if you would like to switch and restart the computer.
Type | You can use |
---|---|
Auto | WSL |
Off | VMware Workstation/VirtualBox |
You can execute the script like normal, or you can save the module into your powershell path.
View the directories in your PowerShell module path: $env:PSMODULEPATH -split ';'
If you save the module to your path you can simply open powershell and run
Import Home-Hacks
and then the function should be imported with the module.
"In PowerShell 3.0, PowerShell is able to implicitly import a module when one of the functions or cmdlets in the module is called by a user."
$PSVersionTable
-
Script execution policy must be set per your requirements.
Get-ExecutionPolicy
Set-ExecutionPolicy <Bypass|RemoteSigned>
-
It must be run in an elevated session.
-
Virtualisation must be enabled in BIOS.
In PowerShell as Admin run:
Switch-HypervisorLaunchType
Follow the prompts.