Skip to content

Get-Content -Tail parameter is broken in v7.1.0-rc.2 and v7.1.0 #14028

@FatalBulletHit

Description

@FatalBulletHit

Steps to reproduce

Run the following with the latest preview version (7.1.0-rc.2) or the latest release version (7.1.0) of PowerShell 7:

(Get-ChildItem $PSHOME -File).Count
(Get-ChildItem $PSHOME -File | ForEach-Object { Get-Content $_.FullName -Tail 1 }).Count

Expected behavior

Output

449
449

Works as intended in the previous release version (7.0.3).

Actual behavior

Output

449
26

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.0-rc.2
PSEdition                      Core
GitCommitId                    7.1.0-rc.2
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions