Reputation: 4988
(Get-Item $SymLink).LastWriteTime
return's the SymLink's last modified time and not the target's modified time.
How do I get the target's last modified time?
Upvotes: 1
Views: 204
Reputation: 4988
There appears to be no direct way, thus for now this will have to be done in two steps-
To determine if its a symlink: Check if SymLink - PowerShell
To get the path:
Dir
command's summary output - from which the target information can be snipped out - using RegEx.Upvotes: 1