Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Why I need to Map a Drive before remotely checking files

$
0
0

Hi

I've written a command to output file versions on remote servers fine:-

$filepathname=\\10.1.2.3\c$\program files\server module\install.exe"
((Get-ChildItem $filepathname).VersionInfo).FileVersion 

However, in order for the command to work, I find that I have to map a drive to the remote machine first, which is just a bit annoying.

Even if I closed down the mapped folder, it carries on working.

Does anyone know a way around that or if I need a powerscript command to map a drive first? Seems a bit strange. Is it because I am using c$ or something?

Cheers

Matt




Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>