How to change the next instance number for a XenDesktop Machine Catalog

Purpose of this post

Using the MCS provisioning method of XenDesktop, can happens that you have to delete some instances from a Machine Catalog (for example, to free up some space on the store or because you have less resources available). Later you need to create new instances in the same Machine Catalog. Unfortunately XenDesktop did not let you choose the number for the next instance it will create. So you will finish to have “holes” in the numeric part of your instances name. Let’s see how to avoid this.

The easy way: use XDAS

XDAS Main FormI’ve developed an application called “XenDesktop Advanced Settings” (XDAS). Just download and run it following this guide, it’s free. As you will see, there is an intuitive GUI, so you just need to select the Machine Catalog you want to change and set number you want for the next instance XenDesktop will create. XDAS have other features you could find useful if you are a Citrix administrator.

The Powershell way

If you want to use Powershell, below are the steps to follow. I kept it simple.

DISCLAIMER: Do it at your own risk. I’m not responsible for any damage. Make a backup before proceed.

  1. From any of your Delivery Controllers open Powershell console.
  2. Run the following command to load the Citrix Modules:
    Add-PSSnapin Citrix.*
  1. Run the following command get the IdentityPool Uid which you will use in the next point. You can retrieve <MachineCatalogName> from Citrix Studio:
    (Get-ProvScheme -ProvisioningSchemeName "<MachineCatalogName>").IdentityPoolUid
  1. Run the following commands to set the next instance number:
    Set-AcctIdentityPool -IdentityPoolUid "<See point 3>" -StartCount "<Insert next instance number>"

That’s all.

Leave a Reply

Your email address will not be published. Required fields are marked *