Getting newest file info from remote computer (Invoke or PSSession)

[quote quote=279942]what happens if you change this:

$Dir = ‘c:\logs’

To this:

$dir = “\$computer\c$\logs”

You would of course need to define $computer as the remote computer. I am unable to test, but my thought is using this method would only require admin on the remote system and you dont have to mess with remote powershell.

[/quote]

Doesn’t work. I tried it whether or not the directory is shared or not, and all I get is Access Denied. I’m using a Domain Admin account too to test.