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

Checking File version

$
0
0

Hi

I'm working on a powershell script that will check if a dll files version is correct on lots of servers. To keep it quite basic, I would like to output a warning in red to the screen. This is what I need.

This is what I have written so far but not sure what the best path to follow is if anyone can advise.

$xFile = "\\10.1.2.3\c$\Program Files\Company\Server Modules\DataModule.dll"
$xFileVersion = (Get-Command $xFile).FileVersionInfo

# Need to put some kind if statement here to check the file version number and warn me if the version is not v1.2.3

Much appreciated to anyone who can give me a hand
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>