Automation · Windows Automation
PowerShell
Cheat sheet · https://pcornel.dk/topic.php?topic=5664
Answer
PowerShell in Windows Automation uses cmdlets, providers and .NET objects to automate Windows while preserving edition/version, module, object, error-stream, privilege and target-state boundaries.
Remember
- PowerShell command returned ≠ operation succeeded under non-terminating error semantics.
- Object emitted ≠ target state changed.
- Module imported ≠ cmdlet behavior/version is compatible.
- Local admin membership ≠ current token is elevated.
First checks
$PSVersionTable— versionInvoke-ScriptAnalyzer— lint- Pester tests — quality
Verify in this order
script → cmdlets → Windows
Where it usually breaks
PowerShell execution evidence does not replace target-state or workload verification.
PowerShell 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=5664