Pcornel
Automation · Windows Automation

Windows Automation Troubleshooting

Cheat sheet · https://pcornel.dk/topic.php?topic=5674

Back to the Topic

Answer

Windows Automation Troubleshooting isolates failures across computer scope, remoting/session, identity/token, modules/providers, registry/service/update mutation and workload verification without broad retries or manual drift.

Remember

  • Last red job/cmdlet ≠ root cause.
  • Retry success ≠ cause understood.
  • Automation failure ≠ Windows platform failure, and Windows failure ≠ automation failure.
  • Changed symptom ≠ original workload restored.

First checks

  • Get-WinEvent -LogName Microsoft-Windows-WinRM/Operational -MaxEvents 20 — WinRM errors
  • $Error[0] | fl * -Force — PowerShell error
  • klist — Kerberos tickets for remoting

Commands

Get-WinEvent -FilterHashtable @{LogName='Windows PowerShell'} -MaxEvents 50
Read-only/validation observation for recent PowerShell engine/host events around an automation run.

Verify in this order

controller → WinRM → auth → session → command

Where it usually breaks

Troubleshooting closes only when the first failed boundary is explained and both automation and original Windows acceptance tests pass after a controlled correction.

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Windows Automation Troubleshooting automation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Scope / identityExact source revision, hosts and execution identity are explicitSelector drift, stale inventory or wrong token changes scope/authority
OperationTool/provider action and per-host result are traceablePartial failure, hidden error semantics or environment differences are lost
Platform statePersistent and effective state are read backCommand/cmdlet success is mistaken for convergence
Workload proofOriginal service/application acceptance passesAutomation summary substitutes for actual runtime behavior

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5674

Confirmation

Confirm action

Continue?