Skip to content

Do not mention the default value -1 for the -TotalCount parameter of Get-Content #10183

@daxian-dbw

Description

@daxian-dbw

Prerequisites

  • Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
  • Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.

Links

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-content?view=powershell-7.3#-totalcount

Summary

After PowerShell/PowerShell#19715 got merged, a user won't be able to specify -1 as the value to -TotalCount, because now it only accepts a non-negative value. The Cmdlet WG suggests removing mention of this internal detail.

BTW, the -Tail parameter also has -1 as the default value, but it's not mentioned in the doc, so we should do the same to -TotalCount.

Details

Suggested Fix

No response

Metadata

Metadata

Assignees

Labels

area-managementArea - Microsoft.PowerShell.Management moduleissue-doc-bugIssue - error in documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions