Query EXE details on multiple server

Posted on

Query EXE details on multiple server – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about windows, , , , .

Is there a way to query the details for an EXE file via command line? (existing Windows tool or PS, etc)

Specifically I would like to check the File version and Product version..

The GUI equivalent would be to right-click on a EXE file and going to the Details tab

Solution :

Sigcheck from Sysinternals can gather most/all of this info for you.

> C:Usersmfinnigan>sigcheck c:windowssystem32acledit.dll
> 
> Sigcheck v1.92 - File version and signature viewer Copyright (C)
> 2004-2013 Mark Russinovich Sysinternals - www.sysinternals.com
> 

> c:windowssystem32acledit.dll:
>         Verified:       Signed
>         Signing date:   11:17 PM 7/13/2009
>         Publisher:      Microsoft Windows
>         Description:    Access Control List Editor
>         Product:        Microsoft« Windows« Operating System
>         Version:        6.1.7600.16385
>         File version:   6.1.7600.16385 (win7_rtm.090713-1255)

You can use WMI datafile for this. Note that the name requires escaping the slashes.

wmic datafile where name="C:\windows\system32\kernel32.dll" get version

The result looks like:

Version
6.1.7601.18409

If you’re trying to get file versions to figure out installed KBs, you can also use:

wmic qfe list

WMI also has built-in ability to run on remote machines.

wmic /node:otherhost /user:"domainadministrator" datafile where name="C:\windows\system32\kernel32.dll" get version

You need to use your network administrator account or the machine’s local administrator account. You can also pass in the password on the command line with /password:xyz.

Leave a Reply

Your email address will not be published.