CIM
Cheat sheet · https://pcornel.dk/topic.php?topic=5667
Answer
CIM Automation queries and changes Windows management objects through CIM providers/sessions while preserving namespace/class/schema, target/session, property/method semantics and resulting OS state.
Remember
- CIM session created ≠ requested namespace/class authorized.
- Class exists ≠ property/method supported as assumed.
- Method return success ≠ downstream service/workload healthy.
- CIM object snapshot ≠ current state forever.
First checks
Get-CimInstance Win32_ComputerSystem— inventoryGet-CimInstance -CimSession $s Win32_LogicalDisk -Filter 'DriveType=3'— remote disksInvoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine='cmd /c echo'}— method call
Verify in this order
CIM query/method → WMI provider → result
Where it usually breaks
CIM provider results establish management-object observations only and do not prove application-level behavior.
Commit/input → runner/job → build/test artifact → deployment request → target rollout/reconcile → effective version/config → health/readiness → workload.
CIM 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=5667