You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get-Content has incorrect, missing, and unformated content #1101
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.').
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"
-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.
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.
Activity
PeteH32 commentedon Mar 20, 2017
This part of the documentation is definitely incorrect. The FileSystem provider installs with Windows PowerShell, and it does support the "-Wait" parameter.
zjalexander commentedon Mar 20, 2017
yeah, provider help in general needs some work. Related: PowerShell/platyPS#245
sdwheeler commentedon Jun 27, 2018
Steve Lee (@SteveL-MSFT) What is the purpose of the -Wait parameter for Get-Content.
mklement0 commentedon Sep 6, 2018
Sean Wheeler (@sdwheeler):
-Waitis already documented in the filesystem-provider-specific topic:(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.
sdwheeler commentedon Sep 6, 2018
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.
mklement0 commentedon Sep 6, 2018
Awesome, Sean Wheeler (@sdwheeler) - glad to hear that is being tackled.
joeyaiello commentedon Oct 4, 2018
This will be fixed by #1562 if I EVER get around to it.
sdwheeler commentedon Oct 5, 2018
Joey Aiello (@joeyaiello) Bobby is working on a replacement PR for #1562
bobbytreed commentedon Nov 19, 2018
This is closed by #3191
Though, there are other intances of placeholder parameters (Credential) that say they are not supported by any provider.