You are not logged in.
Hello everyone,
I have been using this for a while and its been a great reference.
I was just wondering what would the correct syntax to use for below:
FOR %a in ('wmic NODE:%name% computersystem get username || echo failed') DO echo %a
I have no problems using a single pipe and caret ^| in the statement above, but when I insert two I get:
|| was unexpected at this time.
Any help would be much appreciated.
Cheers
Steve
Offline
Not sure what you've tried, but this should do it...
FOR /f %a in ('wmic NODE:%name% computersystem get username ^|^| echo failed') DO echo %a
cmd | *sh | ruby | chef
Offline
It works! Thank you very much. I owe you a pint
Offline