get-command return the definition of aliases instead of syntax...it will be nice if -syntax switch return the definition for the powershell core running in windows system....why hiding important help information ?
PS C:\> gcm sort -Syntax
Sort-Object
it return the definition of cmdlet for all alias
PS C:\> Get-Alias | Select-Object name | Get-Command -Syntax
PS C:\> gcm sort -Syntax
Sort-Object [[-Property] <Object[]>] [-Descending] [-Unique] [-Top <int>] [-InputObject <psobject>]
[-Culture <string>] [-CaseSensitive] [<CommonParameters>]
Sort-Object [[-Property] <Object[]>] -Bottom <int> [-Descending] [-Unique] [-InputObject <psobject>]
[-Culture <string>] [-CaseSensitive] [<CommonParameters>]
sort-object
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0
PSEdition Core
GitCommitId 6.1.0
OS Microsoft Windows 6.3.9600
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Good idea; closely related to #7387.
Not closely, I would say it as a duplicate of #7387
@kvprasoon:
Virtually, yes, because if -Resolve gets implemented as proposed in #7387, I would expect the following to work:
Get-Command -Syntax -Resolve sort
Where this issue differs is that it asks for -Syntax _by itself_ to show the resolved command's syntax - which makes sense.
In short: I suggest we _both_:
modify -Syntax _itself_ as proposed by this issue.
implement -Resolve as proposed in #7387, for name and symlink-target resolution.
Combining -Resolve with -Syntax would then be the same as specifying -Syntax alone.
Yup makes sense, I missed the -syntax part 馃檪