@echo off
title Enable SSH - Siraya
color 0E

net session >nul 2>&1
if %errorlevel% neq 0 (
  echo Requesting administrator privileges...
  powershell -NoProfile -ExecutionPolicy Bypass -Command "Start-Process -FilePath '%~f0' -Verb RunAs"
  exit /b
)

echo.
echo  Enabling OpenSSH Server on this PC...
echo.

set "PS1=%TEMP%\SirayaEnableSsh\enable-ssh.ps1"
mkdir "%TEMP%\SirayaEnableSsh" 2>nul
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -UseBasicParsing -Uri 'https://pos.siraya.food/downloads/printer/tools/enable-ssh.ps1' -OutFile '%PS1%'"
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%PS1%"
pause
