Filtering Filesystem objects based on a DateTime value
Votes from Connect: 13
Original Date Submitted: 3/5/2012 6:41:31 PM
Handle: Shay Levi
Site Name: PowerShell
Feedback ID: 728747
Frequency: Always Happens
Regression: Yes, this happens in all previous versions
In PowerShell 3.0, the Test-Path cmdlet supports two new parameters: NewerThan and OlderThan. Both parameters accepts a DateTime object and return $true if the object's LastWriteTime is less/greater than the specified date.
One of the tasks IT admins need to perform often is getting old files. It would be great if Get-ChildItem could support those parameters as well, allowing us to filter objects based on a datetime value without the need to use the Where-Object cmdlet.
Product Studio item created by Connect Synchronizer due to creation of feedback ID 728747 (http://connect.microsoft.com/PowerShell/feedback/ViewFeedback.aspx?FeedbackID=728747).
Internal BugId: 3393