MAVERICKS CHOICE Posted April 10, 2007 Posted April 10, 2007 Just wandering if anyone could help me out with a cleanup script.I work in an org that has several machines for training purposes & these need to be cleaned up following these sessions of any addittional info etc. So basically we are left with a clean desktop/start menu/My documents etc etc. Only require the few programs that are originally installed.I do not want to reimage or format setup or reinstall os only on a need basis.
gunsmokingman Posted April 11, 2007 Posted April 11, 2007 Just wandering if anyone could help me out with a cleanup script.I work in an org that has several machines for training purposes & these need to be cleaned up following these sessions of any addittional info etc. So basically we are left with a clean desktop/start menu/My documents etc etc. Only require the few programs that are originally installed.I do not want to reimage or format setup or reinstall os only on a need basis.Post a list of what you want to be left and I will see what I can do for you with a vbs script.
MAVERICKS CHOICE Posted April 11, 2007 Author Posted April 11, 2007 (edited) Thanks GSMReally only require program files & admin acc to remain all else to go.EDIT:btw GSM I did reply to your mail the other day but not sure if you received it? Edited April 11, 2007 by MAVERICKS CHOICE
gunsmokingman Posted April 11, 2007 Posted April 11, 2007 (edited) I did get your message I forgot to reply sorry for that.Here try this script and see what it does, in theroy it should remove all accounts that are not in the Administrators Groups, not sure about thefolders on this. So Give it a try and see what happens.Dim objGroup,objUser,strComputer'/-> Place A Network Computer Name Here or Its IP Address, This Is Set For The Local ComputerstrComputer = "." Set objGroup = GetObject("WinNT://" & strComputer & "/Administrators") For Each objUser In objGroup.Members If objUser.Name <> "Administrator" AND objUser.Name <> "Domain Admins" Then objGroup.Remove(objUser.AdsPath) End If NextI also have this HTA posted here that deletes Local User Accounts I could maybe modifyit to suit your needs a little better,The ThreadThe HTA AppHope This Helps Gsm Edited April 11, 2007 by gunsmokingman
cluberti Posted April 11, 2007 Posted April 11, 2007 Also, using an ntuser.man profile (rather than ntuser.dat) will lock out profile-specific changes as well (won't keep documents and files off of the disk, but should keep changes from sticking to the other things).
MAVERICKS CHOICE Posted April 11, 2007 Author Posted April 11, 2007 Taken on board & testing.btw GSM sent mail.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now