Skip to content

Get-Content has incorrect, missing, and unformated content #1101

Closed

Description

Issue Details

via Uservoice

Get-Content

The description attached to the parameters
-Delimiter
-Encoding
-Raw
-Stream
-Wait
(This parameter is not supported by any providers that are installed with Windows Powershell.)
is both incorrect and useless.
It is incorrect because the parameters are supported by the FileSystem provider (at least).
It is useless because it gives no information about the reason for the existence of the parameter. Is it a deleted function for which the parameter name is retained for legacy scripts? Is it a planned future addition?
My suspicion is that it is a place holder description that was never updated. (As an aside, there are/were many help entries where the description for some parameters had been replaced by that for -UseCredential)
Additionally, where it is decided that a cmdlet should have multiple help entries if a it has different behaviour depending upon which provider is invoked then the general (non-provider specific) version should clearly indicate that fact (with appropriate links). So '-Delimiter' would be described thus:
-Delimiter
(FileSystem provider, ...)
Provider specific behaviour.
where 'FileSystem provider' is a link to 'Get-Content for FileSystem'. Indeed, if the behaviour is the same for all applicable providers then the behaviour could be described in the general help entry (instead of just 'Provider specific behaviour.').

Version(s) of document impacted

  • Impacts 5.1 document
  • Impacts 5.0 document
  • Impacts 4.0 document
  • Impacts 3.0 document

Activity

  1. PeteH32 commented on Mar 20, 2017

    @PeteH32

    This part of the documentation is definitely incorrect. The FileSystem provider installs with Windows PowerShell, and it does support the "-Wait" parameter.

    "-Wait - This parameter is not supported by any providers that are installed with Windows PowerShell"

  2. zjalexander commented on Mar 20, 2017

    @zjalexander
    ContributorAuthor

    yeah, provider help in general needs some work. Related: PowerShell/platyPS#245

  3. sdwheeler commented on Jun 27, 2018

    @sdwheeler
    Contributor

    Steve Lee (@SteveL-MSFT) What is the purpose of the -Wait parameter for Get-Content.

  4. mklement0 commented on Sep 6, 2018

    @mklement0
    Contributor

    Sean Wheeler (@sdwheeler):

    -Wait is already documented in the filesystem-provider-specific topic:

    -Wait
    Waits for the cmdlet to get the content before returning the command prompt. While waiting, Get-Content checks the file once each second until you interrupt it, such as by pressing CTRL+C.

    Wait is a dynamic parameter that the FileSystem provider adds to the Get-Content cmdlet. This parameter works only in file system drives.

    (As an aside: This description could stand improvement - see #2886)

    How hard it is to discover provider-specific help topics is also the subject of #2213.

  5. sdwheeler commented on Sep 6, 2018

    @sdwheeler
    Contributor

    Michael Klement (@mklement0) Yeah, the provider-specific help is a work-in-progress. Long story but we are working on it. The goal is to wrap all of that content into the provider-affected cmdlets and get rid of the provider-specific docs.

  6. mklement0 commented on Sep 6, 2018

    @mklement0
    Contributor

    Awesome, Sean Wheeler (@sdwheeler) - glad to hear that is being tackled.

  7. added
    area-providers
    and removed
    area-providers
    on Oct 2, 2018
  8. joeyaiello commented on Oct 4, 2018

    @joeyaiello
    Contributor

    This will be fixed by #1562 if I EVER get around to it.

  9. added
    in-progress
    on Oct 5, 2018
  10. sdwheeler commented on Oct 5, 2018

    @sdwheeler
    Contributor

    Joey Aiello (@joeyaiello) Bobby is working on a replacement PR for #1562

  11. bobbytreed commented on Nov 19, 2018

    @bobbytreed
    Contributor

    This is closed by #3191

    Though, there are other intances of placeholder parameters (Credential) that say they are not supported by any provider.

  12. removed
    in-progress
    on Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-providers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions