Powershell very slow in recursing through directory listing

Posted on 2013-01-30
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?
Question by:johndarby
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
LVL 42

Accepted Solution

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

Author Closing Comment

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

Expert Comment

ID: 38845254
Just to add, supposedly PS 3.0 is much faster in this regard.

Author Comment

ID: 38845358
I sure look forward to that! :)

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

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...
My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

626 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