Remote Desktop Disconnected: The authentication certificate received from the remote computer is expired or invalid.

Upon connect to a remote machine I can across the following error. Since deploying Server 2008 I have seen this issue a few times so I thought I would blog it.

When connecting to a remote machine some clients (usually clients with a new version of the Remote Desktop client on their machine) the following error is received:

Remote Desktop cannot connect to the remote computer because the authentication certificate from the remote computer is expired or invalid. In some cases, this error might also be caused by a large time discrepancy between the client and server computers.

The first thing to check is the remote machines certificate. So from a client that can connect or directly on the console do the following:

  1. Start > Run > mmc.exe
  2. File > Add/Remove Snap-in…
  3. Certificates > Add > Computer Account > Local Computer > Finish
  4. Remote Desktop > Certificates rdpcert.png
  5. Check the certificate expiration date. If the date has past or the certificate is invalid simple right click and delete the certificate
  6. From a client that was failing to connect try and connect again. Upon the reconnection attempt the remote machine with auto generate a new certificate

Should you still have problems ensure the client settings for remote desktop connection are set to “Warn Me” or “Connect and don’t warn me” under Advanced and Server Authentication. Also check for clock drift (both time and date) between the client and remote computer, anything more than a few minutes can cause problems.

Happy troubleshooting! 🙂

The AppSense User Virtualization service will start then immediately stops

The AppSense User Virtualization service will start then immediately stops with the error message from windows reading as follows:

“The AppSense User Virtualization Service on the Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.”

All other AppSense services remain running but as a result no AppSense Environment policies are being applied.

The application event log only shows the following message:
Source: AppSense EmCoreService
Event ID:8001
Description: AppSense Environment Manager: Service stopped

After sometime with AppSense technical support the issue was caused by a missing registry key. The key HKLM\Software\Microsoft\Windows NT\CurrentVersion\AeDebug must be present for the AppSense User Virtualisation service to start. As it happens the previously upgraded AppSense Policy Configuration was deleting that key to disable Dr. Watson debugging as per the Microsoft KB article KB188296. To resolve the issue I simply removed the action and started the service.

List all VMs with a memory limit set in vCenter using Powershell

This script lists all VMs with a memory limit set in Resource Manger in a given VMWare cluster.

Connect-VIServer myserver.fqdn.com 
Get-Cluster $Cluster | Get-VM | Get-VMResourceConfiguration | where {$_.MemLimitMB -ne "-1"}

If you want to clear all memory limits and set them to unlimited use the following code

Connect-VIServer myserver.fqdn.com 
Get-Cluster MyCluster | Get-VM | Get-VMResourceConfiguration | where {$_.MemLimitMB -ne "-1"} | Set-VMResourceConfiguration -MemLimitMB $null

The same can also be done for the CPU management using CpuLimitMhz attribute.

Citrix The Independent Management Architecture service terminated with service-specific error 2147483659

In Citrix Presenstation Server version 4 and 4.5 you may receive the following error messages in the event log.

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Date: 01/08/2011
Time: 15:53:15
User: N/A
Computer: SERVER1
Description:
The Independent Management Architecture service terminated with service-specific error 2147483659 (0x8000000B).

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Event Type: Error
Event Source: IMAService
Event Category: None
Event ID: 3601
Date: 01/08/2011
Time: 15:53:15
User: N/A
Computer: SERVER1
Description:
Failed to load initial plugins with error IMA_RESULT_TIMEOUT

Event Type: Error
Event Source: IMAService
Event Category: None
Event ID: 3609
Date: 01/08/2011
Time: 15:53:15
User: N/A
Computer: SERVER1
Description:
Failed to load plugin ImaRuntimeSS.dll with error IMA_RESULT_TIMEOUT

Event Type: Error
Event Source: IMAService
Event Category: None
Event ID: 3609
Date: 01/08/2011
Time: 15:53:15
User: N/A
Computer: SERVER1
Description:
Failed to load plugin ImaPsSs.dll with error IMA_RESULT_TIMEOUT

Event Type: Error
Event Source: IMAService
Event Category: None
Event ID: 3615
Date: 01/08/2011
Time: 15:53:15
User: N/A
Computer: SERVER1
Description:
The server running MetaFrame Presentation Server failed to connect to the Data Store. Error – IMA_RESULT_TIMEOUT An unknown failure occurred while connecting to the database.

After initial investigation it wasn’t create if the IMA configuration was connecting to the datastore correctly so I followed CTX105257 to check the location of the DSN was correct. After looking through the config for some reason this server wasn’t connecting directly SQL instance but instead was indirectly connecting to another Presentation server which was down and hense the IMA service couldn’t find the datastore. I reconfigure the datastore to be the SQL instance and started the service which ultimately fixed this issue.