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.ps1xml
Also, 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:
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:
Also, given that(-Pathdoesn't support wildcards, there's no need for a separate parameter set, and so-Pathcan 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.2