Reset Windows Rearm count

When working with Machine Creation Services we discovered that the Clients all have the same CMID. A different CMID is needed to activate using KMS services. We searched for a solution and everyone mentioned rearming the machine, but then we received the message that we can’t rearm. We then searched for a solution but everyone was pointing out to set the Skiprearm to 1. When testing this we discovered that the CMID keeps the same after rearming the Windows machine.

We discovered that the “Remaining Windows Rearm Count” was 0. which means that when you set SkipRearm then you don’t rearm the machine. Knowing this we searched how to reset the Rearm count and found an article that explained how we could reset the rearm count.

To do this follow the below instructions:

  1. Create reset.bat on C:\
  2. add the following code:

    reg load HKLM\MY_SYSTEM “%~dp0Windows\System32\config\system”
    reg delete HKLM\MY_SYSTEM\WPA /f
    reg unload HKLM\MY_SYSTEM

  3. Restart your machine to repair mode using the F8 key.
  4. In the System Recovery Options menu, select Command Prompt.
  5. Now type in D:\reset.bat. The C-drive is used as a recovery partition.
  6. If the script is executed successfully, you should get the message “The operation completed successfully”.
  7. Reboot your machine.

Now the rearm count is reset to 5. You can check this using slmgr /dlv.

rearm count

Now set make sure the Skiprearm is set to 0 at the following location: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\SoftwareProtectionPlatform

Now the Image is ready to deploy and the KMS server will receive different CMID’s from the servers.

XenDesktop Security permissions SQL server

 When you install XenDesktop and need to configure the Desktop Delivery Controller to create the Database then this might result in security errors. When the DDC needs to create the Database then set the security as shown below.

First add the Desktop Delivery Controller as security login to the SQL server and give the server Sysadmin permissions.

DDC01 (1)

DDC01 (2)

Continue reading “XenDesktop Security permissions SQL server”

Using VMWare with XenDesktop

When you are using VMWare ESX as Hypervisor you need to configure some setting on the Desktop Delivery Controller and on the VCenter server before you can add the VMWare vCenter host to the XenDesktop environment. First you need to create a user or a role where you can add multiple users in the vCenter environment. In the following steps I explain how to create a Role with all the necessary right.

Create Security Role vCenter

Based on the following Article: Using VMware with XenDesktop provided by Citrix, I create a new role which I will name XenDesktop. Then I added the appropriate settings as described in the following table:


Datastore > Allocate space


Datastore > Browse datastore


Datastore > Low level file operations


Network > Assign network


Resource > Assign virtual machine to resource pool


Added automatically.


Added automatically.


Added automatically.


Tasks > Create task


Virtual machine > Configuration > Add or remove device


Virtual machine > Configuration > Add existing disk


Virtual machine > Configuration > Add new disk


Virtual machine > Configuration > Change CPU Count


Virtual machine > Configuration > Memory


Virtual machine > Configuration > Remove disk


Virtual machine > Configuration > Change resource


Virtual machine > Interaction > Power Off


Virtual machine > Interaction > Power On


Virtual machine > Interaction > Reset


Virtual machine > Interaction > Suspend


Virtual machine > Inventory > Create new


Virtual machine > Inventory > Create from existing


Virtual machine > Inventory > Remove


Virtual machine > Inventory > Register


Virtual machine > Provisioning > Clone virtual machine


Virtual machine > Provisioning > Allow disk access


Virtual machine > Provisioning > Allow virtual machine download


Virtual machine > Provisioning > Allow virtual machine files upload


Virtual machine > Provisioning > Deploy template


Virtual machine > Provisioning > Mark as virtual machine


Virtual machine > State > Create snapshot


Virtual machine > State > Remove snapshot


Virtual machine > State > Revert to snapshot

All the above settings are applied in the “Add New Role” screen as you can see below. Continue reading “Using VMWare with XenDesktop”

XenDesktop: Database could not be contacted

After installing Hotfix Update 4 for XenDesktop 5.6 I noticed errors in my eventviewer that the connection to the database was lost. I discovered the errors because I couldn’t create Desktop Groups, I keep getting the error: “Database could not be contacted“.


 After some searching I found that the database needs to be updated because of a minor version. The hotfix update 4 descriptions mentions the update of the datastore but normally you receive an update button whit in the Desktop Studio, but this one I didn’t receive. Continue reading “XenDesktop: Database could not be contacted”

Citrix Auto Support

When working with Citrix products you want to be sure your configuration is correct, or want to troubleshoot why you have a problem. Citrix developed the Citrix Auto Support formerly known as Citrix Tools as a Services (TaaS). You can can make a health check for XenServer, XenApp, XenDesktop and Netscaler and citrix will add other products later.

When you need to troubleshoot or perform a health check for XenApp or XenDesktop you need the Citrix Scout tool to create the log files. You have to enable WinRM before you can create the CDF trace of remote servers, look at :

When you need to troubleshoot your XenServer environment you need to create a Server Status Report using the XenCenter console.

After you created the reports you need to upload them to the Citrix Auto Support site (, you will need to have a MyCitrix account for this which you can create at the Citrix site.

The upload process is a peace of cake, just login to the Auto Support site


After you loged in you will see your Workspace, here you can see your latest uploads and there results, which you can move to the Archive when you don’t need them anymore. Continue reading “Citrix Auto Support”