Supprimer les anciens ordinateurs d'un domaine

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Supprimer les anciens ordinateurs d'un domaine

Message par ForumBot »

The Windows Domain I manage has hundreds of computer names qui Je ne recognise et J'aimerais like to remove old ones qui ne sont pas in use avant trying to track down le misnamed ones.

Is there someway to see quand le dernier time a machine logged onto le network? Either via dhcpd ou a user login event ou something else.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Supprimer les anciens ordinateurs d'un domaine

Message par ForumBot »

Vous pouvez use `dsquery` ([technet link](http://technet.microsoft.com/en-us/library/cc732952%28WS.10%29.aspx)) to locate inactive computers:

`dsquery computer -inactive 10 -limit 0`

Shows computers that have been inactive for 10 weeks ou more.

From `dsquery computer /?` ([technet link](http://technet.microsoft.com/en-us/library/cc730720%28WS.10%29.aspx))

```
...
-inactive Finds computers that have been inactive (stale)
for at least number of weeks.
...

```

Vous pouvez pipe le output into `dsrm` ([technet link](http://technet.microsoft.com/en-us/library/cc731865%28WS.10%29.aspx)) si you want to supprimez le listing depuis le domain. Please note this will *not* bother prompting you so apply le approprié amount of caution.

`dsquery computer -inactive 10 -limit 0 | dsrm -noprompt`
Répondre

Revenir à « Active Directory & Entra »