For /F with wmic unwanted output
问题 First post here, so apologies if I don't do this quite right. I'm trying to output the OS version on a remote Windows PC, but I keep getting unwanted data. Executing this batch file: @echo off set /p hostname=PC hostname? echo. FOR /F "skip=1 tokens=*" %%A in ('wmic /node:%hostname% OS get caption') DO echo %%A echo. pause Returns this result: Microsoft Windows 7 Professional Echo is off. I was able to remove the Caption output using skip=1 but I don't understand where the echo command is