- May
- 13,402
- 190
From the command line ...
In a BTM ...
How do I get the multi-line version to work in a BTM?
Code:
v:\> do line in /p `wmic /Node:"zz" path win32_groupuser where (groupcomponent="win32_group.name=\"administrators\",domain=\"zz\"")` ( echo %line )
GroupComponent PartComponent
win32_group.domain="zz",name="administrators" \\ZZ\root\cimv2:Win32_UserAccount.Domain="zz",Name="Administrator"
win32_group.domain="zz",name="administrators" \\ZZ\root\cimv2:Win32_UserAccount.Domain="zz",Name="vefatica"
win32_group.domain="zz",name="administrators" \\ZZ\root\cimv2:Win32_SystemAccount.Domain="ZZ",Name="NETWORK SERVICE"
win32_group.domain="zz",name="administrators" \\ZZ\root\cimv2:Win32_SystemAccount.Domain="ZZ",Name="LOCAL SERVICE"
In a BTM ...
Code:
v:\> type wmictest.btm
do line in /p `wmic /Node:"zz" path win32_groupuser where (groupcomponent="win32_group.name=\"administrators\",domain=\"zz\"")`
echo %line
enddo
v:\> wmictest.btm
Invalid WHERE Syntax.
ECHO is OFF
TCC: V:\wmictest.btm [3] Unknown command "enddo"
How do I get the multi-line version to work in a BTM?