Hello Guys,
I'm stuck with a problem... I want to copy the PSTs which lastWriteTime is bigger than yesterday. So the PST in which something changed in the last day.
I thought this line of code would get me those.
dir -Recurse d: *pst | where {$_.LastWriteTime -gt ((get-date).adddays(-2)) }
But it doesn't work because
LastWriteTime has the folllowing format: 16/04/2012 10:31:28
And Get-Date the following: woensdag 21 november 2012 14:33:48
I tried adding formats statements but they don't seem to take, not with the lastWriteTime nor with the Addays...
Could anyone help me!? :)
Thanks!