REM 1) Check if we are running elevated (admin) net session >nul 2>&1 if %errorlevel% neq 0 ( echo Requesting elevation... powershell -NoProfile -ExecutionPolicy Bypass ^ -Command "Start-Process -FilePath '%~f0' -Verb RunAs" goto :EOF ) "C:\Program Files\PowerShell\7\pwsh.exe" -NoProfile -ExecutionPolicy Bypass -File "C:\Program Files\Sysinternals\sfld_autologon.ps1"