Script to Delete local roaming profiles

By Harvey ·

I have a windows 2003 server with xp workstations. We use Roaming profiles that copy themselves to the local machine. I want to reconfigure the way profiles work in AD and create a new default user. In order for this to work i need to wipe all local profiles on the machines which is a big job ( 150 workstations ) but exclude profiles such as "all users" "administrator" "default user"..... Does anyone no of a script that i can run that will delete all profiles in documents and settings except the ones i need?

Please help :-)

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

I second that

I hear you on this one.
If anyone has even a hint or a link on how to create or automate this task please advise.

Collapse -


by Jacky Howe In reply to I second that

Available on the Resource CD

Collapse -

Re: Delprof

Delprof is a good utility, but we are looking for a script that will launch batches like ones we can create with delprof.
Something like a VBscript would really help.
I've just recently started getting into it, but with all the commands and knowing what links to what, its all to overwhelming for the non-programmer type.
Specifically it would be great if someone could direct or simply put the code needed to run multiple instances of....
delprof /q /r /i /c:\\<UNCcomputername>\

Collapse -

I hear you

by Jacky Howe In reply to Re: Delprof

I am not a scripter. I can work out what they do but i can never find one to do exactly what i want. I had a play with delprof. I can copy it to the pC's through a batch file but i cant work out how to run it. When it starts a new cmd process i end up back on the server. I think i used to copy it to the pc's and used an admin account to logon to each pc and it picked up from a script. A long winded and time consuming process. Lets know how you get on.

Collapse -


by Jacky Howe In reply to Re: Delprof
Collapse -


by Jacky Howe In reply to Script to Delete local r ...
Collapse -

it actually did (work)

surprisingly, yet very simply, it did work.
I don't know how I overlooked this setting.
Thanks for the tip.
The only question I have now, is with this setting enabled, will the system log the user on with the default local user profile in the event that the roaming profile times out? (due to slow link)

Collapse -

This works

by Jacky Howe In reply to it actually did (work)

GPO Computer Configuration, Administrative Templates, System, User Profiles

Log users off when roaming profile fails.

Logs a user off automatically when the system cannot load the user's roaming user profile.

This setting is used when the system cannot find the roaming user profile or the profile contains errors which prevent it from loading correctly.

If you disable this setting or do not configure it, when the roaming profile fails, the system loads a local copy of the roaming user profile, if one is available. Otherwise, the system loads the default user profile (stored in %Systemroot%\Documents and Settings\Default User).

Also, see the "Delete cached copies of roaming profiles" setting.

Collapse -

I have almost one...

by Fred123456 In reply to Script to Delete local r ...

I just wrote a script that pings every PC in AD, checking for availablity and then copies a shortcut to the all users folder. Shouldn't be to hard to convert to deleting profiles.

Let me know if you want it as is or if you want to wait for me to re-write it. Its on the server at work so either way your waiting about 14 hours.

Collapse -

I'll try it

if you don't mind, I'd like to try it once modified.
Also, if you could include a little description about the action lines of code and what is triggering what, that would be great.
"why don't I pay your rent tooo..." he asks me. ha ha

Related Discussions

Related Forums