Visitar URL original
PS 7.6 - extremly slow output of dir on network drive · Issue #27088 · PowerShell/PowerShell · GitHub
Skip to content

PS 7.6 - extremly slow output of dir on network drive #27088

Description

@ckrueger1979

Prerequisites

Steps to reproduce

If I'm doing "dir" on a network mapped drive the output is extremly slow, I can read line by line.

Output to screen:

u is a network drive

$start=(Get-Date)
dir u:\ # lists 580 entries
$end=(Get-Date)
$end-$start


Output to null:

u is a network drive

$start=(Get-Date)
dir u:\ | out-null # lists 580 entries
$end=(Get-Date)
$end-$start

Expected behavior

Roughly the same time (1 second)

Actual behavior

Output to screen:

Ticks             : 280979347
Days              : 0
Hours             : 0
Milliseconds      : 97
Microseconds      : 934
Nanoseconds       : 700
Minutes           : 0
Seconds           : 28
TotalDays         : 0,000325207577546296
TotalHours        : 0,00780498186111111
TotalMilliseconds : 28097,9347
TotalMicroseconds : 28097934,7
TotalNanoseconds  : 28097934700
TotalMinutes      : 0,468298911666667
TotalSeconds      : 28,0979347

Output to null:
Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 0
Milliseconds      : 989
Ticks             : 9892260
TotalDays         : 1,1449375E-05
TotalHours        : 0,000274785
TotalMinutes      : 0,0164871
TotalSeconds      : 0,989226
TotalMilliseconds : 989,226

Error details

doing a "dir" on a network drive takes 28 seconds to list a network drive
With CMD it's instant (same as output to null in Powershell)

The problem is independant if I use PS7 directly or via Terminal, so it's not the screenput itself that is slowing it.

Environment data

Name                           Value
----                           -----
PSVersion                      7.6.0
PSEdition                      Core
GitCommitId                    7.6.0
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Activity

  1. added
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Mar 23, 2026
  2. rhubarb-geek-nz commented on Mar 24, 2026

    @rhubarb-geek-nz

    Do you see the same behaviour with Windows PowerShell 5.1 and PowerShell 7.4 ?

    Do the following two return the results instantaneously?

    Get-ChildItem | Measure-Object
    Get-ChildItem | ForEach-Object { $_.Name }
    

    It may be that displaying each item on the console requires a network request to get information about each file.

  3. ckrueger1979 commented on Mar 24, 2026

    @ckrueger1979
    Author

    Both commands return instantly.

    Powershell 5.1 needs only 1 second.
    PS 7.4 also 28 seconds

  4. added
    Issue-BugIssue has been identified as a bug in the product
    WG-ReviewedA Working Group has reviewed this and made a recommendation
    WG-TriagedThe issue has been triaged by the designated WG.
    and removed
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Sep 21, 2026
  5. rkeithhill commented on Sep 21, 2026

    @rkeithhill
    Collaborator

    WG-Engine reviewed this today and believe it's a bug - perhaps in the formatting system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productWG-Enginecore PowerShell engine, interpreter, and runtimeWG-ReviewedA Working Group has reviewed this and made a recommendation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions