Thanks for the help now i want output to be in .txts or i excel format ,
i m trying using if statement but giving me errors, can u hlp me in that so all output will come in excel or txts,
foreach ($computer in (Get-Content -Path C:\listofcomputer.txt)) {
Get-Item -Path "C:\Windows\System32\CpqMgmt\cqmgstor\cqmgstor.exe" | ForEach-Object {
New-Object -TypeName PSCustomObject -Property @{
FileName = $_.FullName
FileVersion = $_.VersionInfo.FileVersion
ProductVersion = $_.VersionInfo.ProductVersion
Computer = $Computer
} | Select-Object -Property Computer,FileName,FileVersion,ProductVersion
}
↧
Output in excel or txts
↧