Are Mandatory User Profiles Deleted at Logoff - or Cached?

This article is part of Helge’s Profile Toolkit, a set of posts explaining the knowledge and tools required to tame Windows user profiles.

A popular misconception about mandatory user profiles is that they are deleted at logoff. I freely admit that I thought so, too, until I made some tests that proved I was wrong.

Locally Cached Mandatory Profiles

First, if you want to read up on the subject, see my earlier article Mandatory Profiles – The Good, the Bad and the Ugly.

Now let us dig into the subject of this post.

Mandatory profiles are similar to roaming profiles in that a master copy lives on a file server that gets copied down to the local machine at logon. Thus a locally cached version of the mandatory profile is created that is used and changed during the user session. This local copy of the mandatory profile is created once for each user, just as with a roaming profile. And at logoff, it stays where it is, unchanged. Windows does not delete mandatory profiles at logoff. (There was a bug in Windows XP that caused mandatory profiles to be deleted. It has been fixed in service pack 3.)

But wait, are mandatory profiles not reset at each logon? Yes they are. But that does not happen through deletion of the locally cached version during logoff, but by replacing the local copy with the network copy during logon. In other words, everything the user changed during his or her last session is lost - that is what mandatory profiles are all about.

So what is that local cache used for, if it is reset at logon? It has one use only: allow logons when the network is not available. Only in that case the state of an earlier session is available in a later session.

How to Delete Mandatory Profiles

You probably do not want cached profiles to litter your systems. The group policy setting “Delete cached copies of roaming profiles” affects not only roaming, but also mandatory profiles. The setting is located here: Computer Configuration -> System -> User Profiles. If enabled, Windows deletes cached copies of roaming and mandatory profiles at logoff.

Unfortunately this group policy setting does not seem to have any effect on Server 2008 SP1. I simply could not get that version to delete cached mandatory profiles at logoff although cached roaming profiles were deleted as expected. There might be a bug in Windows Server 2008 SP1 breaking the deletion of cached mandatory profiles. After updating the machine to SP2 the problem was gone. On all other versions of Windows I tested (see below) mandatory profiles were deleted correctly if “Delete cached copies of roaming profiles” was enabled.

Applies to

The information in this article applies to Windows in general. However, I have tested on these versions:

  • XP (x86) SP3
  • Server 2003 x64 SP2
  • Server 2008 x64 SP1
  • Server 2008 x64 SP2
  • Windows 7 RTM
  • Server 2008 R2 RTM

Comments

Related Posts

Can I Use the Same User Profile on 32-bit and 64-bit Windows?

This article is part of Helge’s Profile Toolkit, a set of posts explaining the knowledge and tools required to tame Windows user profiles. More and more people are upgrading to a 64-bit version of Windows. Many of them would probably like to keep their existing configuration. The question is: can you use the 32-bit profile on Windows x64? Is there even such a thing as a 32-bit or a 64-bit user profile? Or are profiles independent of the system’s bitness?
User Profiles

Mandatory Profiles - The Good, the Bad and the Ugly

This article is part of Helge’s Profile Toolkit, a set of posts explaining the knowledge and tools required to tame Windows user profiles. A mandatory profile is a special type of roaming profile. As with a roaming profile, a mandatory profile is copied from its network location to the local machine during logon. But during logoff, changes are not copied back. Instead, the local copy of the mandatory profile is reset to its initial state at the next logon. In essence, mandatory profiles are read-only roaming profiles. This has advantages, but also severe drawbacks.
User Profiles

Latest Posts

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage

Fast & Silent 5 Watt PC: Minimizing Idle Power Usage
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In the first post, I showed how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In this second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding

Fast & Silent 5 Watt PC: Lenovo ThinkCentre M90t Modding
This micro-series explains how to turn the Lenovo ThinkCentre M90t Gen 6 into a smart workstation that consumes only 5 Watts when idle but reaches top Cinebench scores while staying almost imperceptibly silent. In this first post, I’m showing how to silence the machine by replacing and adding to Lenovo’s CPU cooler. In a second post, I’m listing the exact configuration that achieves the lofty goal of combining minimal idle power consumption with top Cinebench scores.
Hardware