Re: Deleting AD User and Home Directory?



Hello,

You can do this with DSRAZOR for Windows. DSRAZOR's "Smart Delete" feature
will mark a users mailbox for deletion in Exchange, locate the home
directory for the user based on the "homeDirectory" attribute and delete it,
and delete the user account in Active Directory.

With DSRAZOR you would run a query to generate a list of all of the users
that you would like to delete. Perhaps a query for all users that are
disabled and have not logged on for 60 days. Select all of the users and
press the button. DSRAZOR will delete the mailbox, home directory, and user
account for each user. No scripting required.

If you would like a free, personalized, one-on-one demonstration of how we
can help you with this project, check out our website and sign up for an
evaluation.
www.visualclick.com/?source=020607smartdelete

--
Ken Aldrich
DSRAZOR for Windows
Visual Click Software, Inc.
www.visualclick.com

"Al Dunbar [MS-MVP]" <alan-no-drub-spam@xxxxxxxxxxx> wrote in message
news:urWJ581RHHA.412@xxxxxxxxxxxxxxxxxxxxxxx
Sorry I don't have a working solution to give you. But what I would do
would
be to write a script that would first examine the "home directory"
attribute
to determine where it is located.

If it is a general UNC like \\server\homefolders$\username, just delete
that
folder. If a share like \\server\username$, it would have to be resolved
to
the underlying UNC like \\server\homefolders$\username. In addition to
deleting that, the share itself should be deleted.

Of course, depending on your organization, it might be that the account
administrator who will be doing the account deletions may not have
administrator privileges on the server containing the home folder in
question. This could be the case in an organization where account
management
is centralized while server management is distributed.

Another issue you may need to deal with is that simply deleting the
account
may not delete the user's email folders in the exchange server, if that is
your environment.


/Al


"Z_Crawford" <ZCrawford@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0C24BA5F-DE14-49AB-A501-99106F71E253@xxxxxxxxxxxxxxxx
I wanted to ask if anyone knew of a way to delete a network account from
Active Directory and delete their home directory at the same time. I am
not
sure if it is also possible to feed in from a text or csv file as well. I
need to have something that could read a large group of them from a file
and
delete them as well as the actual folder defined in the "homeDirectory"
attribute of that account. Any help would be appreciated!

Thank You,
Zach




.