"The given key was not present in the dictionary" error when adding machine to machine catalog

"The given key was not present in the dictionary" error when adding machine to machine catalog

book

Article ID: CTX585038

calendar_today

Updated On:

Description

"The given key was not present in the dictionary" error occurs when adding a machine to the machine catalog using the same name with that of a deleted VM.
----------------------------------------------------------------------------------------------
StudioErrorId : ExceptionThrown
Reason : KeyNotFoundException
Exception : System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
Message : The given key was not present in the dictionary.
Error Source : CitrixMachineCreationService
Sdk Error Message : An exception occurred. The associated message was The given key was not present in the dictionary.
Sdk Error ID : Citrix.XDPowerShell.Status.ExceptionThrown,Citrix.MachineCreation.Sdk.Task.Commands.GetProvTaskCommand
ErrorCategory : NotSpecifie
----------------------------------------------------------------------------------------------
 

Resolution

The missing numbers can be re-numbered by using the following method:
  • Get-AcctIdentityPool  to get the identity pool name
  • To change the "start count" to the number you want in this example the start count will change to X
New-AcctAdAccount -IdentityPoolName '%IdentityPoolName%' -Count 1 -StartCount X

Problem Cause

This is a by-designed behavior caused by the internal operating specifications of the Citrix product.
The Citrix product system maintains historical information on previously used computer accounts in its internal site database, causing such behavior of the naming scheme.

Additional Information

https://support.citrix.com/article/CTX217233/reset-the-start-count-of-mcs-catalog-after-the-catalog-has-already-been-created