Question

Locked

Not able to delete stale computer

By rgnambiar ·
Hi,

I am not able to delete the stale computer from my domain by using the below dsquery command.

dsquery computer inactive 468 | dsrm noprompt

Please help me out in deleting the stale computer

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

9 Years?

by glen.harris In reply to Not able to delete stale ...

Hi,
I'm not currently near a domain to try this but think the command should be:
dsquery computer -inactive 468 | dsrm -noprompt
where 468 represents 468 weeks of inactivity.

Collapse -

Reponse To Answer

by rgnambiar In reply to 9 Years?

Thanks for the reply. I did try that command, but i am getting an error stating that the dsrm command is not recognised. Yes i am looking out to delete the stale computers for 9 years.

Collapse -

You need to download RSAT

by glen.harris In reply to Not able to delete stale ...

(remote server administration tools) Go to microsoft dot com and type 7887 in the search box (Win 7 Version). Alternatively, remote desktop onto one of the domain controllers and run the command from there.

Collapse -

Reponse To Answer

by rgnambiar In reply to You need to download RSAT

i am using windows 2008 r2 enterprise, i think you are suggesting for win7

Collapse -

From technet

by glen.harris In reply to Not able to delete stale ...

Dsrm 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) or Active Directory Lightweight Directory Services (AD LDS) server role installed. To use dsrm, you must run the dsrm command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

Not from technet:
To add the server role go to Server Manager, click roles in the left pane, add roles in the right pane, click next then install.

I would have thought that you'd already have the AD role installed on the server if it is a DC. AD can be dangerous if you don't know what you are doing. Unless this is a test domain of some sort that you are experimenting with be very careful.

Back to Desktop Forum
6 total posts (Page 1 of 1)  

Hardware Forums