Deleting Users

There are times when you need to delete user accounts, and with ADSI you can very easily delete large numbers of users with the single click of a mouse. Some reasons for deleting user accounts follow:

  • To clean up a computer lab environment, that is, to return machines to a known state.

  • To clean up accounts at the end of a school year. Many schools delete all student-related accounts and files at the end of each year. Scripting makes it easy to both create and delete the accounts.

  • To clean up temporary accounts created for special projects. If the creation of accounts is scripted, their deletion can also be scripted, ensuring no temporary accounts are left lingering in the directory.

Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.