winexe在带有管道和引号的窗口上执行命令

时间:2017-01-20 11:50:59

标签: bash winexe dsquery

1- dsquery user -disabled | dsget user -display -email -dept -title
2- dsquery computer  -limit 1000 | sort
3- dsquery user "dc=YOURDOMAINNAME" -inactive 2 | dsget user -display -email -dept -title'

在Linux上使用WINEXE,我试图在远程Windows 2008上执行上述命令,但是收到错误。

winexe -U DOMAIN/ADMIN%"PASSWORD" //10.0.0.1 "dsquery user -disabled | dsget user -display -email -dept -title"

ERROR
dsquery failed:'dsget' is an unknown parameter.
type dsquery /? for help.root@linux:/temp#

 winexe -U DOMAIN/ADMIN%"PASSWORD" //10.0.0.1 "dsquery user "dc=MYDOMAIN" -inactive 2 | dsget user -display -email -dept -title'"

dsquery failed:'|' is an unknown parameter.

0 个答案:

没有答案