From b510d6958f633a3b2a1dbf42492a4974169d1cf1 Mon Sep 17 00:00:00 2001 From: shokinn Date: Tue, 30 May 2023 13:59:13 +0200 Subject: [PATCH] Add execution policy as well as -File parameter --- dotfiles/bin/enablewslhypervforwarding | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/bin/enablewslhypervforwarding b/dotfiles/bin/enablewslhypervforwarding index b642f5c..d1050bb 100755 --- a/dotfiles/bin/enablewslhypervforwarding +++ b/dotfiles/bin/enablewslhypervforwarding @@ -35,9 +35,9 @@ Set-NetIPInterface -ifAlias "vEthernet (WSL)" -Forwarding Enabled EOF -powershell.exe "${WINHOME}\enablewslhypervforwarding.ps1" +powershell.exe -ExecutionPolicy Bypass -File "${WINHOME}\enablewslhypervforwarding.ps1" sleep 3 -powershell.exe "Get-NetIPInterface | select ifIndex,InterfaceAlias,AddressFamily,ConnectionState,Forwarding | Sort-Object -Property IfIndex | Format-Table" +powershell.exe -ExecutionPolicy Bypass "Get-NetIPInterface | select ifIndex,InterfaceAlias,AddressFamily,ConnectionState,Forwarding | Sort-Object -Property IfIndex | Format-Table" rm ${WINHOMEWSL}/enablewslhypervforwarding.ps1