PowerShell is King–Use PowerShell to find out the file information in a file repository

Another excellent post from Mikael!

The Deployment Bunny

This morning I was scheduled to install some software, one part of HP Service Pack was not installed, so I made the decision to just install that component, rather then re-running that Service Pack Setup (HPSUM). The quarion is, what file contains what I need? All files has just the CPXXXXXXX.exe? If I select properties from a file in explorer, I can see that it contains this:

image

Hmm, how could I get that using PowerShell? Could it be “”Get-ChildItem”?

Running Get-ChildItem -Path clouddfsSoftwareApplicationsHPswpackages -Filter *.exe gives me this:

image

and that does not help, but if adding | Select * will give me this:

image

So, the info is there, right, now how could I get rid of the junk…

Hmm, there is something called VersionInfo, lets try that…

Get-ChildItem -Path clouddfsSoftwareApplicationsHPswpackages -Filter *.exe | Select-Object Name,VersionInfo | Out-GridView

image

Getting closer, bet still to much junk…

Maybe, this would work?

View original post 31 more words

Advertisements