Note: The commands in the first and second of the following have been modified and validated with the actual production environment.
(a) Filter the disabled computer accounts in the ad, and then move to the Discomputer organizational unit uniformly
search-adaccount-accountdisabled-computersonly | Move-adobject-targetpath "Ou=discomputer,ou=it
, dc=contoso,dc=com "
(b) Use the following command to query the computer accounts that are disabled under an OU
Search-adaccount-accountdisabled-searchbase "Ou=it,dc=contoso,dc=com"
-computersonly
(iii) Other AD PowerShell computer, account, Group Management Common Command Reference
Http://social.technet.microsoft.com/wiki/contents/articles/5819.ad-powershell-for-active-directory-administrators.aspx
This article from "Zeng Hung Xin Technical column" blog, declined to reprint!
How to filter the disabled computer accounts in the ad and move to the specified OU