Questions

Script to Delete local roaming profiles

+
0 Votes
Locked

Script to Delete local roaming profiles

Harvey
Hi

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 :-)
  • +
    0 Votes

    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.

    +
    0 Votes
    Jacky Howe

    Available on the Resource CD

    +
    0 Votes

    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>\

    +
    0 Votes
    Jacky Howe

    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.

    +
    0 Votes
    Jacky Howe

    Have a look at this so simple.

    http://support.microsoft.com/?kbid=274152

    +
    0 Votes

    Did

    Jacky Howe

    it work?

    +
    0 Votes

    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)

    +
    0 Votes
    Jacky Howe

    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.

    +
    0 Votes
    Fred123456

    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.

    +
    0 Votes

    LED 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

  • +
    0 Votes

    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.

    +
    0 Votes
    Jacky Howe

    Available on the Resource CD

    +
    0 Votes

    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>\

    +
    0 Votes
    Jacky Howe

    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.

    +
    0 Votes
    Jacky Howe

    Have a look at this so simple.

    http://support.microsoft.com/?kbid=274152

    +
    0 Votes

    Did

    Jacky Howe

    it work?

    +
    0 Votes

    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)

    +
    0 Votes
    Jacky Howe

    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.

    +
    0 Votes
    Fred123456

    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.

    +
    0 Votes

    LED 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