Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Script to delete a specific profile on all workstations

Reply
 
Old 08-12-2008   #1 (permalink)
Luuke


 
 

Script to delete a specific profile on all workstations

Hello,

Does anyone know how I can delete a specific user profile on all the
XP workstations I have in my domain ? I use delprof, but the problem
is, it deletes all the profiles, and I would like only one to be
deleted.

I did not find a way to pass the username as a parameter to delprof.

I can write a script that deletes the folder in \Documents and
Settings, but this will not clean the computer registry.

Any idea ?

Thanks a lot !

Regards,

Luuke

My System SpecsSystem Spec
Old 08-12-2008   #2 (permalink)
Al Dunbar


 
 

Re: Script to delete a specific profile on all workstations


"Luuke" <moinier@xxxxxx-internet.fr> wrote in message
news:d5dac097-3824-4ddf-aad8-3ac25760f821@xxxxxx
Quote:

> Hello,
>
> Does anyone know how I can delete a specific user profile on all the
> XP workstations I have in my domain ? I use delprof, but the problem
> is, it deletes all the profiles, and I would like only one to be
> deleted.
>
> I did not find a way to pass the username as a parameter to delprof.
>
> I can write a script that deletes the folder in \Documents and
> Settings, but this will not clean the computer registry.
>
> Any idea ?
Sorry, no idea. I tried looking for just this functionality some time back,
but found only delprof. Someone else here (Joe Kaplan? Marty List?) provided
my with some code that would also make the registry changes, however, I had
a few problems with it and opted for delprof.

Delprof can be used to delete one specific profile on one specific machine.
Unfortunately, that can only be done by having it prompt you for each one
until you find the right one - surely a recipe for disaster.

You can certainly limit the machines you need to process by searching all of
them for the expected folder name in "documents and settings", but if there
are more than about 3 hits, it will be a real pain.

Of course, whether or not the pain is worth it depends on the reason for
this task, and the frequency with which it needs to be done.

If you simply need to ensure that all files created on various desktops by
someone leaving the company (or for some other reason) need to be deleted,
then just delete the folders. If the same account logs in, a new and
functional "profile" will be created (try it). If a new account by the same
name as the now deleted account logs in, it will get its own completely new
profile. If no account of the same name ever logs in again, then there are a
few registry keys that will never be used - surely this is common! ;-)

If, on the other hand, you just want to avoid excessive buildup of profiles
as users come and go, you might try doing what I do. I run delprof
periodically and get it to delete all profiles that have been inactive for
some reasonably long time, say 90 days. In fact, I am contemplating running
this on each system in a scheduled task.

/Al


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
script to parse specific gpo settings VB Script
Can one start a script after connecting to a specific wireless network? Vista installation & setup
Script to delete folder with specific name and files VB Script
how to logon via outlook to exchange with a specific profile name inbackground VB Script
Script to delete specific Computer Accounts Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46