Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

PSP version

$
0
0

Me using this script to find PSP version on all 

my servers but problem is that it show me same PSP version for all servers 

when i checked manually all severs have different version.

 

in listofcomputers i have host names of servers

 

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 |Out-File C:\PSP.txt -Append -Encoding ascii}

}

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles