Solved

Powershell very slow in recursing through directory listing

Posted on 2013-01-30
4
1,575 Views
Last Modified: 2013-02-01
When I execute a recursive directory listing in CMD shell it zips along speedily.

dir /s

However, when I do the same with Powershell the result is much slower

get-childitem -recurse

Is there a way to improve the speed of output?
0
Comment
Question by:johndarby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 38837365
you can use FileSystem.GetFiles which is faster and can be run via powershell:
How to speed up Powershell Get-Childitem over UNC
0
 
LVL 1

Author Closing Comment

by:johndarby
ID: 38837407
Thank you for the pointer! :)
0
 
LVL 40

Expert Comment

by:footech
ID: 38845254
Just to add, supposedly PS 3.0 is much faster in this regard.
0
 
LVL 1

Author Comment

by:johndarby
ID: 38845358
I sure look forward to that! :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Synchronize a new Active Directory domain with an existing Office 365 tenant
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question