从AD中删除计算机对象 [英] Deleting computer objects from AD
问题描述
您好
我们正在尝试使用标准语法编写已停用15周的计算机对象的脚本,但失败了。
dsquery computer -inactive x | dsrm
因为有超过100个对象(默认值)当我们执行查询以查看返回的内容时,系统会提示我们使用-limit命令。当我们用这个运行查询时,我们看到
结果,但是当-limit开关被合并删除时它不起作用
dsquery computer -inactive 15 - 限制0> C:\\\
otactive.txt  这会正确显示信息
dsquery computer -inactive 20 -limit 0 | DSRM   这失败
那么我们如何编写删除100多个对象的脚本?
谢谢
尝试使用-limit和3000作为值,看看它是否有效。
Hi
We are trying to script the removing of computer objects that have been inactive for 15 weeks using the standard syntax and it fails.
dsquery computer -inactive x | dsrm
Because there are over 100 objects (the default) when we do the query to see what is returned we are prompted to use the -limit command. When we run the query with this we see the results, but when the -limit switch is incorporated for deletion it doesnt work
dsquery computer -inactive 15 -limit 0 > c:\notactive.txt this shows the information correctly
dsquery computer -inactive 20 -limit 0 | dsrm this fails
So how do we script for the removal of over 100 objects?
thanks
Try using the -limit with 3000 as a value and see if it works.
这篇关于从AD中删除计算机对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!