Why is Get-Help displaying different syntax and context-sensitive parameters now?

0
8
Asked By CuriousCoder123 On

I've noticed that since I updated my help files on a new installation, the output for some commands, like `Get-ChildItem`, looks different compared to last year. Specifically, the syntax section now shows extended type data and context-sensitive parameters, which wasn't the case before. It seems less clean and harder to read. I'm curious if this change is due to my configuration, like the ps1.xml file, or if it's a wider issue. When did this update to PowerShell happen?

3 Answers

Answered By ScriptingSavvy On

If you’re just looking to access the syntax specifically, you can use `Get-Command` like this: `Get-Command -Name Get-ChildItem -Syntax`. This way, you can bypass seeing all the extended type data. Alternatively, take a look at the `Get-CommandParameter` script by SeeminglyScience for a cleaner syntax diagram. It could really improve your experience with cmdlets.

Answered By TechWhiz87 On

This change seems to be a result of a bug in the PlatyPS tool, which is responsible for generating the help files for PowerShell. The issue started with the v1.0.0 release of PlatyPS, and it introduced quite a few glitches. You can check out the details about the issues they've been encountering in their GitHub repository. Right now, running `Update-Help` might give you the latest, but it pulls the new MAML structure that has these changes. It's definitely a bit messy right now. Hopefully, they’ll fix it soon enough!

Answered By GuyWithAliasedWhelps On

I actually created an alias that runs `Get-Help -Online @args`, which is really useful because it lets me access the latest information straight from the web. Might be worth checking out if you're usually looking for updated help!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.