-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Select-Object -ExpandProperty does not work with Hashtable members #11094
Copy link
Copy link
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Description
Select-Object reports an error when -ExpandProperty is used on a hashtable member that is not a key.
Version:
PowerShell 7 Preview 5
Reproduce:
$PSVersionTable | Select-Object -expandProperty Keys
Expected Result:
[list of hashtable keys]
Actual Result:
Exception:
Select-Object: Property "count" cannot be found.
Workaround:
$PSVersionTable | ForEach-Object { $_.Keys }
Details:
https://powershell.one/bugs/powershell-7/select-object
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module