>
> "gbrown135" <gbrown135[ at ]discussions.microsoft.com> wrote in message
> news:4ECA1AC7-7716-43DE-8DC3-F4DBF7415BF7[ at ]microsoft.com...
> > Is there any script that would allow to prompt for the netbios name of a
> > user
> > and then read Active directory and then go to the Servers of the profiles
> > and
> > completely remove the user's Home drive, Profile and Terminal Services
> > Profile. I have had a look but there is nothing at all I can find.
> >
> > Any help would be appreciated
>
> By netbios name, do you perhaps mean the sAMAccountName attribute in active
> directory? If so, that can be converted to the distinguished name using
> nametranslate:
>
>
http://www.rlmueller.net/NameTranslateFAQ.htm>
> Once you have that, you would bind to the user object, and get the home
> folder, profile and terminal services profile attributes. I forget details
> such as exact names of attributes, so I'd use csvde or ldifde to extract all
> attributes and see what they are called.
>
> The home folder should be in a sharename or UNC form. If a UNC, you could
> use the file system object delete folder method:
>
>
http://ns7.webmasters.com/caspdoc/html/vbscript_filesystemobject_object_deletefolder_method.htm>
http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_qlcc.mspx?mfr=true>
> If the home folder is a sharename, you will need to query the server to
> determine the path to the folder that is shared, unshare it, then delete it.
>
> Profile and TS profile would likely be handled in a similar manner.
>
> /Al
>
>
>
>
>
>