Citrix DaaS

Remove broker user from the cache

There are cases when administrators are unable to remove a broker user from the cache or sometimes when running Get-BrokerUser, the user displays the incorrect SID from AD.

This happens when the user is deleted from AD and recreated but the broker cache still has the previous user SID.

To resolve this, do the following:

  1. Remove the users from Active Directory.
  2. Run Get-BrokerUser for each removed account. Accounts that are not referenced anywhere, do not return any results. For users that are referenced, you get a value after you run Get-BrokerUser. Now, you must find out what resources the user is assigned to and manually remove the users from those resources.

For example:

  • Find if the user is assigned to an application: Get-BrokerApplication
  • Find if the user is assigned to an application group: Get-BrokerApplicationGroup
  • Find if the user is assigned to an access policy: Get-BrokerAccessPolicyRule
  • Find if the user is assigned to an application entitlement policy: Get-BrokerAppEntitlementPolicyRule
  • Find if the user is assigned to a desktop entitlement policy: Get-BrokerEntitlementPolicyRule
  • Find if the user is assigned to a desktop group session linger: Get-BrokerSessionLinger
  • Find if the user is running any sessions on a VDA: Get-BrokerSession = Find if the user is assigned to a resource in the merged group: Get-BrokerMergedResource
  • Find if the user is assigned to a group of resources: Get-BrokerMergeGroup
  • Find if a command is queued for a user: Get-BrokerMachineCommand
  • Find if the user is assigned to a private desktop: Get-BrokerMachine
  • Find if the user is assigned to a zone preference: Get-BrokerUserZonePreference
  1. Manually remove the users from the resources.
  2. Run Get-BrokerUser command to confirm the user has been removed from all resources.
  3. Once the user has been removed from all resources, run the following to remove the user from the cache.

    Update-BrokerNameCache -Users -Purge -UnusedFor 0
Remove broker user from the cache