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.