I need a PowerShell script that can access a file\'s properties and discover the LastWriteTime property and compare it with the current date and return the date differe
Use
ls | % {(get-date) - $_.LastWriteTime }
It can work to retrieve the diff. You can replace ls with a single file.
ls