Jump to content

Recommended Posts

Posted

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.


Posted
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.

Posted (edited)

Thanks GSM

Really 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 by MAVERICKS CHOICE
Posted (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 the

folders 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 Computer
strComputer = "."
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
Next

I also have this HTA posted here that deletes Local User Accounts I could maybe modify

it to suit your needs a little better,The Thread

The HTA App

Hope This Helps

Gsm :hello:

Edited by gunsmokingman
Posted

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).

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...