Add execution policy as well as -File parameter

This commit is contained in:
Philip Henning 2023-05-30 13:59:13 +02:00
parent 60e16cc1ab
commit b510d6958f

View file

@ -35,9 +35,9 @@ Set-NetIPInterface -ifAlias "vEthernet (WSL)" -Forwarding Enabled
EOF EOF
powershell.exe "${WINHOME}\enablewslhypervforwarding.ps1" powershell.exe -ExecutionPolicy Bypass -File "${WINHOME}\enablewslhypervforwarding.ps1"
sleep 3 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 rm ${WINHOMEWSL}/enablewslhypervforwarding.ps1