How to resolve shell:recent to path

Hi. I’m trying to iterate through content of shell:recent. If I run this in explorer it resolves to: ‘C:\Users\username\AppData\Roaming\Microsoft\Windows\Recent’
However I can’t seem to work out how to get the literal path so I can iterate the contents using ForEach.

Since it is a subfolder of AppData you could use

"$ENV:APPDATA\Microsoft\Windows\Recent"

I’d expect that this should work on 99.9% of all Windows systems.

Another way would be to use the according .Net method:

[System.Environment]::GetFolderPath('recent')