我在下面收到此错误
在线:1字符:4 + FOR / F“令牌= 1,2,3,4,5 delims =,” %% a IN(。\ computerlist.txt)执行。\ P ... +〜 关键字“ for”后缺少开头“(”。 + CategoryInfo:ParserError:(:) [],ParentContainsErrorRecordException + FullyQualifiedErrorId:缺少OpenParenthesisAfterKeyword
在运行此循环时
FOR /F "tokens=1,2,3,4,5 delims=," %%a IN (.\computerlist.txt) do .\PsExec.exe \\%%a -u %%b -p %%c net user %%d %%e /add /description "local user or whatever text"
我有computerlist.txt文件,该文件由5个字段组成,用逗号分隔,例如计算机名,用户名,密码,新用户,新密码
FOR /F "tokens=1,2,3,4,5 delims=," %%a IN (.\computerlist.txt) do .\PsExec.exe \\%%a -u %%b -p %%c net user %%d %%e /add /description "local user or whatever text"