Skip to content

Make ConvertFrom-StringData and Import-PowerShellDataFile return *ordered* hashtables, analogous to how ConvertFrom-Json -AsHashtable now works in v7.3+ #19070

Description

@mklement0

Summary of the new feature / enhancement

See also:

Since 7.3, ConvertFrom-Json -AsHashtable now (fortunately) returns a hashtable in which the definition order of the entries is respected, courtesy of the new, [hashtable]-derived System.Management.Automation.OrderedHashtable type - see #18524 (comment)

The [hashtable]-outputting ConvertFrom-StringData and Import-PowerShellDataFile cmdlets could benefit from the same improvement - as well as any other standard cmdlets that currently return [hashtable] instances.

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.Resolution-No ActivityIssue has had no activity for 6 months or moreWG-Cmdletsgeneral cmdlet issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions