Short answer:
Get-ChildItem Env: only shows the standard properties exposed by the first environment variable object.
To see all properties available across all objects, you must enumerate them and inspect their combined property set.
Below are the three best ways, depending on what you want.
This gives you the union of all properties, not just the first one.
(Get-ChildItem Env: | ForEach-Object { $_.PSObject.Properties.Name }) |
Sort-Object -UniqueThis is the most complete answer to your question.
This forces PowerShell to output every property instead of the default view:
Get-ChildItem Env: | Format-List *This is the easiest way to visually inspect everything.
Environment variables in PowerShell are actually:
System.Collections.DictionaryEntry
To see all members:
Get-ChildItem Env: | Get-Member -Force-Force shows hidden members too.
PowerShell formats output using the first object in the pipeline to determine which properties to display.
If later objects have additional properties, they are not shown unless you explicitly expand them.
This is why you only saw the properties from the first object.
- how to export all env vars with all properties to JSON/CSV
- how to inspect the underlying .NET dictionary
- how to get environment variables from machine/user/process scopes
- how to build a reusable function for “show all properties for any provider”
Just tell me what direction you want to go next.