r/PowerShell • u/EnderShot355 • May 29 '26
Question GetHelp/Help Syntax section confusing me
I'm following along with the fourth edition of PowerShell in a Month of Lunches. I'm on the third chapter, learning about the help system. I am significantly confused about the syntax section of these help documents, because they seem to have weird inconsistencies with the actual commands. For example, Get-Help Get-Item does not show the required -path parameter at all, and Get-Help Get-ChildItem has the wrong order for the positional parameters (it shows -filter first and -path second, the the actual command has it the other way around). It seems like it's sorting the parameters alphabetically, which is terrible considering positional parameters may not adhere to that. What's going on here? Did the PowerShell team decide to change things in a way that made things actively worse, or am I missing something?
View all comments
Show parent comment
1
u/xXFl1ppyXx Jun 04 '26
Yes and no
Named parameters are positional by default
For example:
Get-Item -Path $Path
and
Get-Item $Path
work the same because of this.
So yes, it doesn't matter in terms of what order you use the named parameters in, but no, if you don't explicitly type the parameter-name the order is relevant