Mr_M_Cox Posted July 12, 2007 Posted July 12, 2007 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
Domino Posted July 12, 2007 Posted July 12, 2007 have a search fpr Delprof, it'll run from the network and do it
Mr_M_Cox Posted July 12, 2007 Author Posted July 12, 2007 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
Geoff Posted July 12, 2007 Posted July 12, 2007 It'll leave All Users, Default User and Administrator alone.
lovelldr Posted July 12, 2007 Posted July 12, 2007 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
webman Posted July 12, 2007 Posted July 12, 2007 Bossman made a vbscript to delete all but some profiles from local machines, and assigned it via GPO as a shutdown script. Attached here, might be handy...profiles-clean.zip 1
Mr_M_Cox Posted July 12, 2007 Author Posted July 12, 2007 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?
Oops_my_bad Posted July 12, 2007 Posted July 12, 2007 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
JamesC Posted January 19, 2008 Posted January 19, 2008 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
tech_guy Posted January 19, 2008 Posted January 19, 2008 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.
Norphy Posted January 19, 2008 Posted January 19, 2008 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.
RabbieBurns Posted July 2, 2008 Posted July 2, 2008 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?
Michael Posted July 2, 2008 Posted July 2, 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 1
RabbieBurns Posted July 2, 2008 Posted July 2, 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.
mattx Posted July 2, 2008 Posted July 2, 2008 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 ?
RabbieBurns Posted July 2, 2008 Posted July 2, 2008 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.
mattx Posted July 2, 2008 Posted July 2, 2008 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. 1
RabbieBurns Posted July 2, 2008 Posted July 2, 2008 Nice one cheers. Can you recomomend an easy way to get a list of computers from active directory please?
somabc Posted July 2, 2008 Posted July 2, 2008 Go to AD Users & Computers, right click on the domain on the left and choose export list, can export as csv, txt etc
Sirbendy Posted July 3, 2008 Posted July 3, 2008 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!
pallen Posted July 3, 2008 Posted July 3, 2008 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.
azrael78 Posted July 3, 2008 Posted July 3, 2008 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
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