Objects
Cheat sheet · https://pcornel.dk/topic.php?topic=3040
Answer
PowerShell works with objects that carry type information, properties and methods. The object visible in the pipeline can be richer than the formatted table shown in the console, and remote/serialized objects can differ from live local objects even when properties look similar.
Remember
- Formatted output is a view of an object, not the object itself.
Get-Memberreveals type members available in the current pipeline object.- PowerShell can add adapted/extended properties through its Extended Type System.
- Serialized remote objects often preserve data properties but not live methods/behavior.
- Converting to text early discards structure and makes later filtering/sorting harder.
First checks
<cmd> | Get-Member— object type and members$PSVersionTable— PowerShell edition and versionGet-Command <name>— which cmdlet/function/exe runsGet-Help <cmdlet> -Full— syntax and parametersGet-ExecutionPolicy -List— execution policy per scope
Verify in this order
cmdlet emits objects → properties and methods → filtered/selected → formatted or exported
Where it usually breaks
First mismatch in definition/configuration → security context → service/task/process creation → runtime state → output/side effect → event/performance evidence; preserve identity/native error/pre-state before mutation.
PowerShell → Objects reference map
| Item | Meaning | Evidence boundary |
|---|---|---|
| Type | Object identity/contract | type can change across serialization/module versions |
| Property | Structured value | snapshot value may become stale |
| Method | Behavior on live object | often unavailable on deserialized objects |
| Formatting | Display projection | not reliable data contract |
| Serialization | Transport/storage representation | can lose live behavior/type fidelity |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3040