﻿{"id":437,"date":"2013-05-02T10:15:26","date_gmt":"2013-05-02T13:15:26","guid":{"rendered":"http:\/\/binsfeld.com.br\/wp\/?p=437"},"modified":"2013-05-02T10:15:26","modified_gmt":"2013-05-02T13:15:26","slug":"desabilitar-contas-de-computador-antigas","status":"publish","type":"post","link":"http:\/\/binsfeld.com.br\/wp\/?p=437","title":{"rendered":"Desabilitar Contas de Computador Antigas"},"content":{"rendered":"<pre>Dsquery is a command-line tool that is built into Windows Server 2008. \r\nIt is available if you have the Active Directory Domain Services (AD DS) server role installed. \r\nTo use dsquery, you must run the dsquery command from an elevated command prompt. \r\nTo open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.\r\n\r\nTo find inactive computer accounts (number is inactivity in weeks):\r\ndsquery computer -inactive 2\r\n\r\nTo find computers with stale passwords (number is stale in days)\r\ndsquery computer -stalepwd 45\r\n\r\nThere is also a combination to disable \/ delete the accounts:\r\ncombined with dsmod\/dsrm\r\n\r\ndsquery computer -inactive 4 | dsmod computer -disabled yes\r\ndsquery computer -stalepwd 45 | dsrm computer\r\n\r\nYou can get additional info on both of these tools with dsquery computer \/? ,dsmod computer \/?, and dsrm computer \/?<\/pre>\n<p>Cr\u00e9ditos:\u00a0<a href=\"http:\/\/community.spiceworks.com\/scripts\/show\/339-find-and-or-cleanup-old-computer-accounts-in-ad\">http:\/\/community.spiceworks.com\/scripts\/show\/339-find-and-or-cleanup-old-computer-accounts-in-ad<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Dsquery is a command-line tool that is built into Windows Server 2008. It is available if you have the Active Directory Domain Services (AD DS) server role installed. To use<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-437","post","type-post","status-publish","format-standard","hentry","category-windows-server"],"_links":{"self":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/437"}],"collection":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=437"}],"version-history":[{"count":1,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/437\/revisions"}],"predecessor-version":[{"id":438,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/437\/revisions\/438"}],"wp:attachment":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=437"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}