mirror of
https://github.com/shokinn/.files.git
synced 2025-01-18 21:22:25 +00:00
fix execution policy
This commit is contained in:
parent
c97f4c5562
commit
7f47a510c8
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# {{@@ header() @@}}
|
# This dotfile is managed using dotdrop
|
||||||
#
|
#
|
||||||
|
|
||||||
WINHOME="$(echo "$(cmd.exe /C "echo %USERPROFILE%")" | tr -d '\r')"
|
WINHOME="$(echo "$(cmd.exe /C "echo %USERPROFILE%")" | tr -d '\r')"
|
||||||
|
@ -23,6 +23,7 @@ if (!
|
||||||
-FilePath 'powershell' \`
|
-FilePath 'powershell' \`
|
||||||
-ArgumentList (
|
-ArgumentList (
|
||||||
#flatten to single array
|
#flatten to single array
|
||||||
|
'-ExecutionPolicy', 'Bypass', \`
|
||||||
'-File', \$MyInvocation.MyCommand.Source, \$args \`
|
'-File', \$MyInvocation.MyCommand.Source, \$args \`
|
||||||
| %{ \$_ }
|
| %{ \$_ }
|
||||||
) \`
|
) \`
|
||||||
|
@ -35,7 +36,7 @@ Set-NetIPInterface -ifAlias "vEthernet (WSL)" -Forwarding Enabled
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
powershell.exe -ExecutionPolicy Bypass -File "${WINHOME}\enablewslhypervforwarding.ps1"
|
powershell.exe -ExecutionPolicy Bypass -File "${WINHOME}\\enablewslhypervforwarding.ps1"
|
||||||
sleep 3
|
sleep 3
|
||||||
powershell.exe -ExecutionPolicy Bypass "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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue