Jump to content

Recommended Posts

Posted

Firstly i am sure this will have been discussed on another thread, i did search but could not find it. if someone knows of a relevant thread please just post link.

 

i want to delete all local profiles other than administrator and all users from my XP workstations in a 2003 domain when a user logs off. any ideas

 

Thanks

Posted
from what i know, and i may well be wrong, i think delprof will delete all profiles and not leave certain ones. i also need it to run unattended at log off
Posted

Doesn't the user profile hive cleanup (or whatever it's called) do this?

 

Basically, you just need to install it on the local machine, ensure that you have left whichever profiles you want loaded onto the machine, and when a user logs off, it deletes their own profile. This only works assuming you have roaming profiles set up though iirc...

 

hth

Posted
that script you uploaded is supurb, thank you. one question. i have run it with exclusions on administrator and all users but now my users cant log in with an error of cant find profile. is this because i have deleted default user?
Posted

You will have to recreate the default user if it's gone (probably best way is just copy any local profile folder and rename it default user i'd have thought).

 

I find this works best as a computer startup script, that way the little darlings dont forcibly switch the PC off whilst it runs shutdown scripts

  • 6 months later...
Posted

Use delprof. It comes as an msi that can be deployed via group policy. Then create a script and set it to run on startup to run delprof and the desired switches. I'm pretty sure you can have delprof delete local and/or roaming profiles depending on the switches used. So if you didnt want your local profiles removed then you can set it to remove roaming profiles only.

 

James

Posted
Use delprof. It comes as an msi that can be deployed via group policy. Then create a script and set it to run on startup to run delprof and the desired switches. I'm pretty sure you can have delprof delete local and/or roaming profiles depending on the switches used. So if you didnt want your local profiles removed then you can set it to remove roaming profiles only.

 

James

 

Yeah, and Mattx has got it on his very handy Admin's Admin Toolbar.

Posted
You don't even need to deploy delprof, you can run it from a network share. I always used to bung it in \\domain.tld\netlogon and run it as a shutdown script.
  • 5 months later...
Posted

delprof isnt working for me. Have it set to run as a machine startup script from a world readable share. The policy is definately being applied. But the profiles arent being deleted.

 

am I doing something wrong?

Posted

If if you run delprof /? from a command prompt, it shows you all the options available. I seem to recall there is an option whereby you can specify yes or no to deleting each profile in turn.

 

As a word of caution, be careful using delprof on laptops where users have local profiles cached. It will delete everything, including their documents which isn't redirected unlike on a domain ;)

  • Thanks 1
Posted
I want to run it when a PC is powered on, not when a user logs on. And because I have about 500 computers with 100 pupils profiles on each that I am trying to delete now they are away for the summer.
Posted
I want to run it when a PC is powered on, not when a user logs on. And because I have about 500 computers with 100 pupils profiles on each that I am trying to delete now they are away for the summer.

 

Deleting local profiles using Delprof can take time - [ depending on how large the profiles are to start with ] and you will be surprised as to how large local profiles can be.

Not advisable running on startup.

If you need to remove all the profiles over the summer the best way would be to make a .txt file with the names of your PCs in and then run delprof from a PC that has admin rights on over the network. [ Make sure all the PCs are turned on !! ]

Create a txt file called computers.txt - make sure each computer name is on a new line then:

 

For /f %a in (computers.txt) Do 
Delprof.exe /I /Q /C:\\%a /D:90 

Delprof will then delete all the profiles that haven't been used in 90 days that are in the txt file.

  • Thanks 1
Posted

I did that..our machines all have a scheduled task as part of the image, and a file containing the DEL command to wipe the accounts in the CSV on the first day of each month.

 

I just update the list each new year with Netsupport replace, and job done. Removal at every logoff will slow the machine. Once a month at 4pm does nicely with our profiles now I've beaten Macromedia out of them..bloody space hog that it is.

 

Any machines I run across that are full, I log into as local admin and run a script to add the scheduled task and relevant files, then execute it in the background. Then I log off and leave it to it.

 

Seems spot on so far..I should check the suites now really, as it's day 3 of a new month!

Posted

If you shut your computers down every day, running delprof at startup shouldn't be a problem. Run delprof over the summer hols so that all your machines are clear and then set delprof to run at startup. You should only have a days worth of profiles on the local machine.

 

I was thinking of setting this up for next year, as every now and then I get people unable to logon because their profile has been corrupted on the client. Although I managed to narrow the reason down to people turning the power switch off at the wall rather than shutting the machine down:rolleyes:

 

But like other people here, I just have some batch scripts that run delprof for rooms regularly instead.

Posted

We will shortly be doing this also.

Running a delete profile script at PC shutdown (as our PCs get a reboot or 2 a day) - it won't delete Administrator, LocalService, NetworkService, Default User - but anything else is fair game to it.

 

The good thing is it won't run on LFT's (as these have local cached roaming profiles) - but anything else (except Servers) is fair game for it.

 

I'm almost looking forward to it in some kind of perverse way. :)

 

Az

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



×
×
  • Create New...