What does HRESULT 0x87C51004 (UTC_E_SCRIPT_TYPE_INVALID) mean?

 
Previous Next
UTC_E_AOT_NOT_RUNNING UTC_E_SCENARIODEF_NOT_FOUND

UTC_E_SCRIPT_TYPE_INVALID

Read this as a lifecycle result: RunScriptAction type discriminator

UTC_E_SCRIPT_TYPE_INVALID has the unsigned value 0x87C51004. In UTC it comes from scenario action execution, where RunScriptAction type discriminator owns the decision. Treat this HRESULT as a state-machine report, not as a generic telemetry outage. The immediate contract failed because the scenario requested a script engine or script-kind value that the installed client does not accept, so diagnosis should remain at that boundary until a controlled comparison crosses it.

Scenario actions run under service-controlled identity, timeout and cancellation rules. The useful evidence is the exact action instance and its child process or script state, not a later generic service event. Stdout, stderr and native exit values should be retained separately from the UTC HRESULT.

Diagnostic record

UTC diagnostic fieldValue
Owning state or objectRunScriptAction type discriminator
Producing layerscenario action execution
Do not confuse withUTC_E_UNAPPROVED_SCRIPT means the type is recognized but policy does not approve that script
Evidence to collectscenario action XML, script type token, schema version, file extension and target Windows build
Narrow comparisonreplace only the type token with one accepted by the same client while keeping script contents unchanged

Isolate one changing condition

  1. Export the relevant Microsoft-Windows-UniversalTelemetryClient/Operational events and preserve their ActivityId or request correlation alongside this result.
  2. Capture scenario action XML, script type token, schema version, file extension and target Windows build. Do this before restarting the service or deleting any working directory.
  3. Perform this one-variable comparison: replace only the type token with one accepted by the same client while keeping script contents unchanged.
  4. After the comparison, record the next HRESULT and whether the requested session, action, trigger or output object was actually created.

Nearby result: UTC_E_UNAPPROVED_SCRIPT — means the type is recognized but policy does not approve that script.

Child-action accounting

Keep process creation, job assignment, timeout, cancellation, exit code and output capture as separate timestamps. That sequence reveals whether the child failed itself, was terminated by UTC or never started.

Operational response

Regenerate the action using the supported DiagTrack schema and approved script form.

Technical references


Looking for a different code? Search another status or error code.