Compare commits

...

1 Commits

View File

@ -41,3 +41,6 @@ Remove-Item alias:wget
# Allow the VM running WSL2 to access Windows host, setting is not persistent over reboots # Allow the VM running WSL2 to access Windows host, setting is not persistent over reboots
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow > $null New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow > $null
# Allow the VM running WSL2 to access Hyper-V virtual machines, setting is not persistent over reboots
Get-NetIPInterface | where {$_.InterfaceAlias -eq 'vEthernet (WSL)' -or $_.InterfaceAlias -eq 'vEthernet (Default Switch)'} | Set-NetIPInterface -Forwarding Enabled