joe90bass (5th July 2008)
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
joe90bass (5th July 2008)
cheers, I have the /Q and /I flags set already. It works fine if i run it manally, its just not running on startup.
Why do you want it running on startup ?
Are you trying to set it to run everytime a PC / User logs on ?
If so - why ?
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.
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:
Delprof will then delete all the profiles that haven't been used in 90 days that are in the txt file.Code:For /f %a in (computers.txt) Do Delprof.exe /I /Q /C:\\%a /D:90
RabbieBurns (2nd July 2008)
Nice one cheers.
Can you recomomend an easy way to get a list of computers from active directory please?
Go to AD Users & Computers, right click on the domain on the left and choose export list, can export as csv, txt etc
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!
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
But like other people here, I just have some batch scripts that run delprof for rooms regularly instead.
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.
Thinking about this for a school that's primarily laptop based but I'm aware that if there's a problem with the wireless or the server goes down then for staff in particular, the system could wipe work done offline.
Anyone got any thoughts on this and how best to counter the problem?
We have run delprof at shutdown for a while now (if it misses once or twice it'll catch them next time). But we have found that there is still an issue with some profiles which cause it to error out no matter what switches I use it stops when it gets to one of these. Java appears to save a file to which the administrator doesn't have permissions. When we go in manually we have to take ownership, then grant ourselves permissions, then delete the profile. Pain.
You could use XCACLS.VBS http://support.microsoft.com/kb/825751 with the relevant switches to grant the administrator full rights to everything in the documents and settings folder before you run Delprof. It works really well that script, and is dead handy for modifying folder and file rights on local machines at machine startup. Saved me hours of work when you build a machine image, then realise some horrible piece of software needs write access to an obscure folder somewhere to work properly!
One doesn't even have to deploy some script or utility to delete profiles.
By design, windows deletes profiles of users who are member of the domain or local Guests group, immediatly after logging of. Even if these users are also member of users, Power users or even (domain)admin's.
And it will leave the default profiles alone.
I run a psexec batch file to delete profiles in the suite, generally once a month, I use the 'delete except' vbs script - found on this site
I leave the pupil set of laptops alone in case the wireless goes down so that users can use cached profiles to log on, and don't let delprof anywhere near the staff laptops so i don't delete anyone's work!
There are currently 1 users browsing this thread. (0 members and 1 guests)