我收到消息“错误:“|” 当我运行以下代码时,此时批处理脚本出乎意料:
@set CheckAccount=FOR /F "tokens=3" %A IN ('net user UserName /domain^|Findstr /ic: "active"') do SET Active=%A
%CheckAccount%
| was unexpected at this time.
Run Code Online (Sandbox Code Playgroud)
即使我更改"active"为active. 如果CheckAccount没有收到该错误消息,我似乎无法回声。