The agent reports "Exception from HRESULT: 0x80005008"


Symptoms

When attempting to create or modify an Active Directory object, you receive the error: "Exception from HRESULT: 0x80005008".



Cause

The error 0x80005008 (ADS_BAD_PARAMETER) can occur when one of the properties has an invalid value. Typically, this is returned from a COM object when setting properties in an external system such as Remote Desktop (Terminal) Services.



Resolution

Ensure that all properties have a valid value.


View the full exception text to determine which property has caused the exception. In the details below it is possible to determine that the library at fault was the TSUSEREXLib used for modification of Remote Desktop (Terminal) Services settings and the property with an invalid value is the Terminal Services profile path.



ENTREL.XIA.Automation.Agents.AutomationAgentException: Update of the user account failed. Error setting remote desktop services profile settings. Exception from HRESULT: 0x80005008 ---> CENTREL.XIA.Automation.Agents.AutomationAgentException: Error setting remote desktop services profile settings. Exception from HRESULT: 0x80005008 ---> System.Runtime.InteropServices.COMException (0x80005008): Exception from HRESULT: 0x80005008

   at TSUSEREXLib.IADsTSUserEx.set_TerminalServicesProfilePath