Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Different result with $_.LastWriteTime

$
0
0

Hi,

I have a folder with 180 000 small files and want to run the following command

$LastTotal = Get-Childitem -Path C:\utdelat\2\Archived\* | where-object { $_.LastWriteTime -lt (get-date).AddDays(-63) } 

Write-host "$($LastTotal.count)"

The result comes differently each time i run it.
First time i run it, i got 887, second time 890
am i doing wrong something here?
Please help, thanks :-)

Viewing all articles
Browse latest Browse all 6937

Trending Articles