@echo off

@REM EWR1GTF18A
@REM EWR1GTU18B

setlocal EnableDelayedExpansion

set COMPUTERNAME=%1
echo %COMPUTERNAME%

set ThreeBgrs[1]=EWR11
set ThreeBgrs[2]=EWR21
set ThreeBgrs[3]=EWR31

set FourBgrs[1]=EWR21
set FourBgrs[2]=EWR22

@REM Check if COMPUTERNAME is in 3 BGR list
for /l %%i in (1,1,3) do (
    if /i "%COMPUTERNAME%" equ "!ThreeBgrs[%%i]!" set AdditionalBgr=/UBGR3
)

@REM Check if COMPUTERNAME is in 4 BGR list
for /l %%i in (1,1,2) do (
    if /i "%COMPUTERNAME%" equ "!FourBgrs[%%i]!" set AdditionalBgr=/UBGR3 /UBGR4
)

echo %AdditionalBgr%
