Solved

Delete profiles

Posted on 2010-08-25
16
767 Views
Last Modified: 2012-05-10
Is there an easy way to delete profiles from computers after a certain amount of inactivity? I'm hoping to be able to achieve this with a group policy or some other remote way so that we do not have to visit each machine.

Thanks in advance!
0
Comment
Question by:PC-Solutions
  • 6
  • 5
  • 2
  • +2
16 Comments
 
LVL 5

Expert Comment

by:BAYCCS
ID: 33524415
There is no way to delete profiles on a local machine using a GPO.
0
 
LVL 3

Expert Comment

by:clw3388
ID: 33524468
sure there is, assuming they are using roaming profiles..

http://support.microsoft.com/kb/274152
0
 
LVL 3

Expert Comment

by:clw3388
ID: 33524475
1. Click Start, type GPEDIT.MSC and press ENTER

2. Expand Computer Configuration | Administrative Templates | System

3. Click User Profiles

4. Double-click Delete user profiles older than a specified number of days on system restart

5. Select Enabled, Specify the number of days and click OK.
0
 
LVL 5

Expert Comment

by:BAYCCS
ID: 33524554
clw3388 - Would that not be more defining a local policy instead of an AD Group Policy?
0
 
LVL 3

Expert Comment

by:robertodeacruz
ID: 33524662
This tip is for Windows Vista. Confirm that it serves there in Windows 2008, please.

1. In an GPO, expand Computer Configuration | Administrative Templates | System
2. Click User Profiles
3. Double-click Delete user profiles older than a specified number of days on system restart
4. Select Enabled, Specify the number of days and click OK.
0
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
ID: 33524794
Another thing you can do is create a VBscript to accomplish this. You can have it run at startup and publish this witha  GPO.
Take a look here for an example.
http://www.vistax64.com/vb-script/212981-delete-files-older-than-x-days-folder-its-subfolders.html

Once you have got the VBScript tested and working do the following to use GPO to deploy.
- Open GPMC.msc (on DC)
-  Create a new GPO, give it a name, right click to edit the GPO
- Expand Computer Configuration>Windows Settings>
- Click Scripts (Startup/Shutdown)
- Click Startup script (right hand pane)
- Find your VBS file and apply it to the GPO
- Set your scope where you want the gpo to apply to (what computers)
*make sure you test this with one computer first before launching to multiple ones.

Hope this helps~!
0
 

Author Comment

by:PC-Solutions
ID: 33524876
Thanks for all the input guys! I have tried the startup script in a gpo, then assigning it to computers but it never runs. I can run things when it's assigned o specific users, but things wont launch when the scope is defined as computers. Any thoughts?
0
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 33524902
When you are on the machine in question, look in the event viewer and also use rsop.msc (from cmd) as this will help describe why the GPO failed to run on the specified machine.
0
Shouldn't all users have the same email signature?

You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

 

Author Comment

by:PC-Solutions
ID: 33535243
When i run rsop.msc it just opens up the poilcy on the computer, but it doesn't show the login script in the logon/logoff. Could this be due to the fact that I have many different gpos, with some going to the user and some going to the workstation?

Thanks for you r input!
0
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 33535450
First - when you open rsop.msc right click on "Computer Configuration" or "User Configuration" and click Properties. Once you have done this you will be able to see what GPO's are applied to your machine. You then use the Error Information Tab to see if there has been any policies that have not been applied (due to error or pending).

Second - if you are on the General Tab and do not see the policy in the object window then you have not setup the "Scope" properly on the GPO. Check that you have set the proper scope and try re-applying the GPO to the machine.
0
 

Author Comment

by:PC-Solutions
ID: 33544418
Okay, I'm going with option 2 on this one. I don't even get a choice for logon/logoff scripts under computer configuration. This is how I setup the policy.

Open GPO manager
Created a new GPO
Went to computer config, logon/logoff scripts
setup a script based on a unc path
closed the policy
under 'security filter' (with the proper gpo selected) i removed "authenticated users" and replace it with a comuter name, I added the computer name by searching the AD and selecting it.
under security filters it now lists the machine that i am testing this on, but it is followed by a $ (ie test$)

Any more help is SO appreciated.
0
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 33544604
Is the GPO even being applied to the machine or is it just failing? Like I said perviously, you can use rsop.msc to view this information. If you GPO is listed when you launch rsop.msc then it is making it to the computer. Check the Error tab to see what went wrong if it has failed.
0
 

Author Comment

by:PC-Solutions
ID: 33544640
Okay, under rsop.msc, i right click on "computer configuration" and choose "error information" and all of the components say "success"

??
0
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 33544738
Ok, backup to the General tap. In there are all of the GPO's that are being applied to your machine. If you do not see your GPO (you have created for this startup script) in this window, then the GPO is not making it to the computer. You will need to take a look at the Scope and Security Filtering to make sure that you are pointing to the proper "OU" and "Group" that you want the to be applied to.

Make sure that if you set your scope to say "Testing OU" and you set your Security Filtering to "Boardroom PC's" then that computer MUST be in the Testing OU and be part of the Boardroom PC's group. If this is not true for either of them the policy will not apply.
0
 

Author Comment

by:PC-Solutions
ID: 33546051
Wow, I feel like a moron! :)

Okay, to start, i went to the computer config (in rsop) right clicked and it IS showing the test policy right below the default domain policy. So this means that the policy is reaching the computer right?
 
Thanks for all of your help, we are migrating from netware and having a fun ride...
0
 

Author Comment

by:PC-Solutions
ID: 33546183
Okay, so I've summed up that it must have something to do with having a logon script attached to a user and one to a computer. As soon as I moved the test script into the startup script location, it started working.

Is there a way to set it so it will run login scripts for different gpos, one being attached to the user and one being attached to the computer?
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now