Friday, September 27, 2013

Name, Version, CreationTime file info



This snippet is simple but I thought it was worth the post:

PS C:\tools\SysinternalsSuite> $name=(ls *.exe)
PS C:\tools\SysinternalsSuite> $FileInfo=foreach ($i in $name) {new-object psobject -property @{name=$i.name; Version=($i).VersionInfo.ProductVersion; CreationTime=$i.C
reationTime} | Select Name,Version,Creationtime}

PS C:\tools\SysinternalsSuite> $FileInfo | ft -auto

name                Version     CreationTime
----                -------     ------------
accesschk.exe       5.11        8/1/2012 1:27:52 PM
AccessEnum.exe      1.32        11/1/2006 1:06:36 PM
ADExplorer.exe      1.44        11/14/2012 10:22:40 AM
ADInsight.exe       1.01        11/20/2007 12:25:34 PM
adrestore.exe                   11/1/2006 1:05:44 PM
Autologon.exe       3.01        2/22/2011 2:18:54 PM
autoruns.exe        11.60       9/10/2012 9:16:28 AM
autorunsc.exe       11.60       9/10/2012 9:16:28 AM
Bginfo.exe          4, 16, 0, 0 9/30/2009 1:31:54 AM
Cacheset.exe                    11/1/2006 1:06:08 PM
Clockres.exe        2.0         6/3/2009 10:36:40 PM
...

No comments: