Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We're using roaming profiles on our terminal servers (running Win2k8). Occasionally, it is necessary to delete some of them, for example because of corruption or to test something. They store only preferred settings (e.g. displayed views in applications), no user data. Of course, we can only delete profiles while the affected user is logged off. We'd like to be able to delete a profile at any time, though.

Is it possible to configure that a profile is not updated on the profile server when a user logs out, but deleted instead? This should only happen once, so when he logs in again, a new profile would be created. Alternatively, it would be fine as well if the server profile would be deleted immediately and the update process be prevented once.

Or to put it differently: How can we ensure a specific user will receive a new, clean profile when he logs himself in the next time only?

share|improve this question
    
Can I ask the most important question: Why? .. Why do you want to delete the profile whilst the user is logged in? –  Tom O'Connor Jun 10 '13 at 9:54
    
@TomO'Connor he basically wants to schedule the deletion so he would not need to wait for the user's logoff to run the necessary commands. –  the-wabbit Jun 10 '13 at 9:58
    
And if the user's logged in, whilst you delete their profile, doesn't all hell break loose? –  Tom O'Connor Jun 10 '13 at 10:32
    
syneticon-dj is right. If the user is not logged in, delete the profile. If he is logged in, delete it as soon as it's safe to do so (= when he logs off). –  mastbinns Jun 10 '13 at 10:34

2 Answers 2

up vote 2 down vote accepted

While there is a "Prevent Roaming Profile Changes From Propagating to the server" GPO setting from "Computer Configuration\Administrative Templates\System\User Profiles" which changes the "ReadOnlyProfile" value in the HKLM\Software\Policies\Microsoft\Windows\System regkey, it is a per-machine configuration setting valid for all users logging on to your terminal servers, and thus probably undesirable. Also, I am not sure if it would affect profiles from already logged-on users.

I believe the only method to achieve what you want would be through scripting.

  1. parse a file for the list of user profiles to delete
  2. iterate through this list
    1. check if user is logged on
    2. if not, delete her roaming profile and the local copy
  3. wait for a while before proceeding
  4. go to 1.

This looks simple enough even to be scripted as a CMD batch, but obviously using PowerShell would produce more elegant and resilient code.

share|improve this answer
    
Thanks, I'll look into this. –  mastbinns Jun 10 '13 at 14:11

Create a new GPO Object, and link it to the OU of the users (or computers).

Computer Configuration => Policies => Administrative Templates => System/User Profiles => Delete cached copies of roaming profiles == Enabled

This worked for me in the past.

share|improve this answer
    
the OP is looking for a mechanism to force a one-time profile reset while the user is logged on. The GPO setting to delete local profile copies only would delete the local copy after updating the profile on the server store, so it would not be of much use for this case. –  the-wabbit Jun 10 '13 at 9:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.