Solved

Powershell very slow in recursing through directory listing

Posted on 2013-01-30
4
1,498 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
  • 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 39

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
This article will help you understand what HashTables are and how to use them in PowerShell.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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