Need a Custom Inventory rule that will find a file and reply the version and path of file found
I was using something similar to this :
FileVersionEquals(C:\Program Files\Internet Explorer\iexplore.exe,8.00.6001.18702 (longhorn_ie8_rtm(wmbla).090308-0339))
While the above works it does not reply the file if the file may exist elsewhere with a different path.
My goal is the following:
Find .file and reply path of where .file was found, the version# of .file, and endpoint name where .file was found
Answers (1)
Here's a PowerShell command that I think will give you the information you're looking for. This command looks for both the 32-bit and the 64-bit versions of iexplore.exe. Off the top of my head, I don't remember how to setup a CIF to use PowerShell, but this may help.
Get-ChildItem -File iexplore.exe -Path 'C:\Program Files\', 'C:\Program Files (x86)\' -Recurse -ErrorAction SilentlyContinue | ForEach {"$($_.FullName),$(($_.VersionInfo).ProductVersion),$($Env:ComputerName)"}
C:\Program Files\Internet Explorer\iexplore.exe,11.00.19041.1,PAUL-WIN10
C:\Program Files (x86)\Internet Explorer\iexplore.exe,11.00.19041.1,PAUL-WIN10