Solved

Powershell very slow in recursing through directory listing

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

"Migrate" an SMTP relay receive connector to a new server using info from an old server.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 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