I'm relatively new to powershell, and I find the typesystem to be a little squishier than I would like. This one has puzzled me, and confused me a few times now.
In this case, I was trying to list the available cmdlets, and avoid the cursed "..." truncation.
Help:
PS C:\src\inst> help new-netipsecq* | format-table -AutoSize
Name Category Module Synopsis
---- -------- ------ --------
New-NetIPsecQuickModeCryptoPro... Cmdlet NetSecurity New-NetIPsecQuickModeCryptoProposal...
New-NetIPsecQuickModeCryptoSet Function NetSecurity ...
vs. Get-Help
PS C:\src\inst> get-help new-netipsecq* | format-table -AutoSize
Name Category Module Synopsis
---- -------- ------ --------
New-NetIPsecQuickModeCryptoProposal Cmdlet NetSecurity New-NetIPsecQuickModeCryptoProposa...
New-NetIPsecQuickModeCryptoSet Function NetSecurity ...
So, with get-member we can see:
PS C:\src\inst> help new-* | get-member
TypeName: System.String
Name MemberType Definition
---- ---------- ----------
vs. get-help
PS C:\src\inst> get-help new-* | get-member
TypeName: HelpInfoShort
Name MemberType Definition
---- ---------- ----------
Questions:
Why is
helpdifferent thanget-help? I've checked,helpis not an alias.Why does
helpreturn a string formatted to look like whatget-helpreturns?
Hm...I found part of the answer myself.
I had tried get-alias help with no luck, but now I've stumbled on 'get-command'
PS C:\src\inst> Get-Command help
CommandType Name Version Source
----------- ---- ------- ------
Function help
- Where does this function come from?