EDP-Change-Server/Set-ELP-Host.bat

17 lines
461 B
Batchfile

@echo off
setlocal
REM Set the path to the PowerShell script
set SCRIPT_PATH=Set-ELP-Host.ps1
REM Check if an IP was passed as a parameter to the batch file
if "%~1"=="" (
REM No parameter passed: run script in interactive mode
powershell.exe -ExecutionPolicy Bypass -File "%SCRIPT_PATH%"
) else (
REM Parameter passed: run script with DirektIP argument
powershell.exe -ExecutionPolicy Bypass -File "%SCRIPT_PATH%" -DirektIP "%~1"
)
endlocal