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
Enterprise environment, have a central file server with home drives for each employee (~4,000). Each employee has a path like \\SERVER.DOMAIN.COM\share\home\EMPLOYEEID, and also has it mapped to H:\.
In Powershell 7.01, cmdlets like Get-Item and Get-ChildItem take far longer to run against the UNC path than the corresponding mapped drive path. Powershell 6.x and 5.1 do not exhibit this.
Tools like Wireshark and Process Monitor suggest that pwsh is traversing the path, getting a full directory list at each level. For example, if I run Get-Item \\SERVER.DOMAIN.COM\share\home\MYID\folder, I will see in Wireshark all employee ID folder names in packet data as it enumerates at the \\SERVER.DOMAIN.COM\share\home level.
#Only perform the necessary SMB request. Do not enumerate parent foldersGet-Item \\SERVER.DOMAIN.COM\share\home\MYID\folder
Environment data
Name Value
---- -----
PSVersion 7.0.1
PSEdition Core
GitCommitId 7.0.1
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Also have PS6 and PS5 installed.
Enterprise environment, have a central file server with home drives for each employee (~4,000). Each employee has a path like
\\SERVER.DOMAIN.COM\share\home\EMPLOYEEID, and also has it mapped toH:\.In Powershell 7.01, cmdlets like
Get-ItemandGet-ChildItemtake far longer to run against the UNC path than the corresponding mapped drive path. Powershell 6.x and 5.1 do not exhibit this.Tools like Wireshark and Process Monitor suggest that pwsh is traversing the path, getting a full directory list at each level. For example, if I run
Get-Item \\SERVER.DOMAIN.COM\share\home\MYID\folder, I will see in Wireshark all employee ID folder names in packet data as it enumerates at the\\SERVER.DOMAIN.COM\share\homelevel.Steps to reproduce
Expected behavior
Environment data