Windows Automation Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=5674
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 errorklist— 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
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Scope / identity | Exact source revision, hosts and execution identity are explicit | Selector drift, stale inventory or wrong token changes scope/authority |
| Operation | Tool/provider action and per-host result are traceable | Partial failure, hidden error semantics or environment differences are lost |
| Platform state | Persistent and effective state are read back | Command/cmdlet success is mistaken for convergence |
| Workload proof | Original service/application acceptance passes | Automation 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