-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Make Export-FormatData syntax support specifying the output file positionally #6680
Copy link
Copy link
Closed
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more
Description
Related: #6681
Currently, you cannot positionally specify an output file for Export-FormatData, even though it is typically the only (non-switch) parameter, and other export-/file-writing cmdlets you do allow you to specify the target file positionally.
I'd expect all of the following forms to be equivalent:
... | Export-FormatData foo.format.ps1xml # !! NOT supported: positional out-file argument
... | Export-FormatData -Path foo.format.ps1xml
... | Export-FormatData -LiteralPath foo.format.ps1xmlAlso, given that (-Path doesn't support wildcards, there's no need for a separate parameter set, and so -Path can simply be made an alias of -LiteralPath.-Path, perhaps surprisingly, does support wildcard expressions, as long as they resolve to a single file.)
Environment data
Written as of:
PowerShell Core v6.0.2Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or more