Update powershell scripts and add port forwarding wsl scripts

This commit is contained in:
Matheus Albino
2023-11-06 03:16:47 -03:00
parent abd9414b9f
commit c1eb16632e
4 changed files with 46 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
$a = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-File `"/home/cloud/repos/personal-devboot/scripts/pshell/Bridge-WslPorts.ps1`" -WindowStyle Hidden -ExecutionPolicy Bypass"
$t = New-ScheduledTaskTrigger -AtLogon
$s = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$p = New-ScheduledTaskPrincipal -GroupId "BUILTIN\Administrators" -RunLevel Highest
Register-ScheduledTask -TaskName "WSL2PortsBridge" -Action $a -Trigger $t -Settings $s -Principal $p