advice Question

Optimize a PowerShell Script to get last edit date

Avatar of rookie_b
rookie_b asked on
Powershell
5 Comments1 Solution28 ViewsLast Modified:

I use PowerShell to check last edit date on files in folder, but it can take a while to scan a folder sometimes. I was wondering if there was a way to run the task in parallel streams using jobs or something like that. Is that possible?


$path = \\server\share
Get-ChildItem -File -Recurse -Force -Path $path |select fullname, lastwritetime |sort lastwritetime -Descending |select -First 20 |Ft
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros