From 0f07186aa175de5bbe921caa1f12cb279377d6b1 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 1 Oct 2022 12:47:23 +0100 Subject: [PATCH] Remove network workarounds Since discovering that OpenHardwareMonitor data can be access via the `Get-WmiObject` powershell command there is no longer any need to read sensor data from a host port, thus removing the need to unblock WSL2 VM from accessing the Windows host. --- profile.ps1 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/profile.ps1 b/profile.ps1 index e37f213..30aaf56 100644 --- a/profile.ps1 +++ b/profile.ps1 @@ -39,9 +39,3 @@ Write-Host -NoNewLine "$([char]0x1b)[6 q" # Remove these aliases to PowerShell builtins which clobber the actaul exes. Remove-Item alias:curl Remove-Item alias:wget - -# 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 - -# 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