Reset a user profile
When a profile is reset, the user’s folders and files are saved and copied to the new profile. However, most user profile data is missing (for example, the registry is reset and application settings might be deleted).
Starting with Profile Management 2106, the reset function is available for the Citrix Management profile container–based user profile solution.
How reset profiles are processed
Any Citrix user profile or Microsoft roaming profile can be reset. After the user logs off and you select the reset command (either in Director or using the PowerShell SDK), Director first identifies the user profile in use and issues an appropriate reset command. Director receives the information through Profile Management, including information about the profile size, type, and logon timings.
This diagram illustrates the process following the user logon, when a user profile is reset.
The reset command issued by Director specifies the profile type. The Profile Management service then attempts to reset a profile of that type and looks for the appropriate network share (user store). If the user is processed by Profile Management, but receives a roaming profile command, it is rejected (or the opposite way).
- If a local profile is present, it is deleted.
- The network profile is renamed.
The next action depends on whether the profile being reset is a Citrix user profile or a Microsoft roaming profile.
For Citrix user profiles, the new profile is created using the Profile Management import rules. The folders are copied back to the network profile, and the user can log on normally. If a roaming profile is used for the reset, any registry settings in the roaming profile are preserved in the reset profile. You can configure Profile Management so that a template profile overrides the roaming profile, if necessary.
For Microsoft roaming profiles, Windows creates a profile, and when the user logs on, the folders are copied back to the user device. When the user logs off again, the new profile is copied to the network store.
To reset a user profile in Director
If you are using the Citrix Virtual Desktops (Desktop VDA), do the following:
- From Director, search for the user whose profile you want to reset, and then select this user’s session.
- Click Reset Profile.
- Instruct the user to log off from all sessions.
- Instruct the user to log back on. The folders and files that were saved from the user’s profile are copied to the new profile.
If you are using Citrix Virtual Desktops (Server VDA), you need to be logged on to perform the profile reset. The user then needs to log off, and log back on to complete the profile reset.
If the user has profiles on multiple platforms (such as Windows 8 and Windows 7), instruct the user to log back on first to the same desktop or app that the user reported as a problem. This logon action ensures that the correct profile is reset. If the profile is a Citrix user profile, the profile is already reset by the time the user’s desktop appears. If the profile is a Microsoft roaming profile, the folder restoration might still be in progress for a brief time. The user must stay logged on until the restoration is complete.
If the profile is not successfully reset (for example, the user cannot successfully log back on to the machine or some of the files are missing), you must manually restore the original profile.
Note the following:
- If the user store is enabled as the user profile solution, the new profile contains the following personal folders from the original user profile:
If the Citrix Management profile container is enabled as the entire user profile solution, the new profile doesn’t contain the preceding personal folders.
- In Windows 8 and later, cookies are not copied to the new profile when profiles are reset.
To manually restore a profile after a failed reset
- Instruct the user to log off from all sessions.
- Delete the local profile if one exists.
- Locate the archived folder on the network share that contains the date and time appended to the folder name, the folder with a .upm_datestamp extension.
- Delete the current profile name. That is, the one without the upm_datestamp extension.
- Rename the archived folder using the original profile name. That is, remove the date and time extension. You have returned the profile to its original, pre-reset state.
To reset a profile using PowerShell SDK
You can reset a profile using the Broker PowerShell SDK.
Creates a command queued for delivery to a specific user, session, or machine. For more information about this cmdlet, see https://citrix.github.io/delivery-controller-sdk/Broker/New-BrokerMachineCommand/.
See the following examples for details about how to use the PowerShell cmdlets to reset a profile:
Reset a Profile Management profile
- Suppose you want to reset the profile for user1. Use the New-BrokerMachineCommand PowerShell command. For example:
New-BrokerMachineCommand -Category UserProfileManager -CommandName "ResetUpmProfile" -DesktopGroups 1 -CommandData $byteArray -SendTrigger logon -user domain1\user1
CommandData $byteArraymust be in the following format:
<SID>[,<backup path>]. If you do not provide the backup path, Profile Management generates a backup folder named by current date and time.
Reset a Windows roaming profile
- Suppose you want to reset the roaming profile for user1. Use the New-BrokerMachineCommand PowerShell command. For example:
New-BrokerMachineCommand -Category UserProfileManager -CommandName "ResetRoamingProfile" -DesktopGroups 1 -CommandData $byteArray -SendTrigger logon -user domain1\user1