@echo off cd /d "%~dp0" net session >nul 2>&1 if %errorlevel% neq 0 ( powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "Start-Process cmd.exe -ArgumentList '/k \"\"%~f0\"\"' -Verb RunAs" exit /b ) powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0fix-iis.ps1" echo. pause