I can't quite work out exactly what it is you're trying to do.
Do you want the test1 variable to contain the string "Serial#=123456" instead of "IdentifyingNumber=123456", or are you trying to create a variable named "SerialNumber" that stores the value "123456"?
If it's the former, how about this
Code:
@echo off
setlocal
set node=C1000
for /f "tokens=2 delims==" %%a in ('wmic /node:"%node%" csproduct get IdentifyingNumber /format:list ^| find "="') do set test1=Serial#=%%a
echo %test1%
endlocal
... or if it's the latter
Code:
@echo off
setlocal enabledelayedexpansion
set node=C1000
for /f "tokens=1,2 delims==" %%a in ('wmic /node:"%node%" csproduct get Vendor^,Name^,IdentifyingNumber /format:list ^| find "="') do set !%%a=%%b
echo Name = %Name%
echo SerialNumber = %IdentifyingNumber%
echo Vendor = %Vendor%
endlocal
If you need the variable to be named SerialNumber instead of IdentifyingNumber you could perhaps handle that case specifically
Code:
for /f "tokens=1,2 delims==" %%a in ('wmic /node:"%node%" csproduct get Vendor^,Name^,IdentifyingNumber /format:list ^| find "="') do (
if /i %%a==IdentifyingNumber ( set SerialNumber=%%b ) else ( set !%%a=%%b )
)
Bookmarks