Archive

Archive for the ‘Active Directory’ Category

dsrm for multiple pc’s

July 7, 2008 Leave a comment

On Active Directory Windows Server 2003, you might want to delete some workstations that has been idle for more then 90 days for example. You have the list of the workstations but you do not know how to do this……( ask google then you might get a bunch of website that give you no suitable answers ).

Here’s the thing that you should do:

  1. make a list of the workstations ( with Full Qualified Domain Name = FQDN ) that you would like to delete in text file using notepad ( save it as list.txt ).  CN=TKARUND,OU=workstations,OU=IT,DC=corporate,DC=com
    CN=AKHROJI1,OU=workstations,OU=IT,DC=corporate,DC=com
    CN=MBAYUARG,OU=workstations,OU=IT,DC=corporate,DC=com
    CN=CTILBURY,OU=workstations,OU=IT,DC=corporate,DC=com
    CN=IJRND-VC6,OU=workstations,OU=IT,DC=corporate,DC=com
  2. open notepad and type the following command.                               
    For /F %%i In (list.txt) Do dsrm %%i -noprompt                                                                                      
    then save it as delete.bat
  3. both list.txt and delete.bat must be in the same folder
  4. run delete.bat by double click it
Categories: Active Directory