Announcement

Collapse
No announcement yet.

Script to Remove User Profiles

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script to Remove User Profiles

    Hi, I currently have about 250 client computers. These computers are used in a school district and this year we made some changes to our Active Directory structure, etc. I was hoping to find a script that:

    Code:
    1. Removes folders that begin with "cl" from "C:\Documents and Settings\"
    2. Remove the User Profiles from:
         - My Computer -> Properties -> Advanced -> User Profiles
    I know that in order to remove the user profiles it is done one by one.

    Other Misc Info:
    Mostly Windows XP SP2, some Windows 2000 SP4

    Thanks in advance.
    Brad

  • #2
    First one would be dealt with by:

    Code:
    del "c:\documents and settings\"c1*.* /f /s
    You could do this in a stratup script or from one workstation export your computer names from AD and do:

    Code:
    del "\\computername\c$\documents and settings\"c1*.* /f /s
    The second point will be solved by part one as once the folder is deleted from c:\documents and settings it disappears from Mt Computer -> Properties -> Advanced -> User profiles

    Good luck
    Server 2000 MCP
    Development: ASP, ASP.Net, PHP, VB, VB.Net, MySQL, MSSQL - Check out my blog http://tonyyeb.blogspot.com

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment

    Working...
    X