I am currently trying to use the Get-RemoteProgram script to list of installed programs on remote computers.
Not only do I want to capture the remote program list but also the version which is straight forward for a single system.
RemoteProgram -ComputerName remotecomputername -Property DisplayVersion,VersionMajor
ProgramName ComputerName DisplayVersion VersionMajor ----------- ------------ -------------- ------------ System Center Endpoint Protection remotecomputername 4.7.214.0 4 Microsoft Visual Studio 2010 Tools for Office Runtime (x64) remotecomputername 10.0.50903 4 Synaptics Pointing Device Driver remotecomputername 18.0.7.34 18
However, when I loop this across multiple systems I lose the DisplayVersion and MajorVersion fields completely.
Get-Content -Path C:\Temp\computerlist.txt | ForEach-Object -Begin {RemoteProgram} -Process {RemoteProgram -ComputerName $_ -Property DisplayVersion,VersionMajor}
ProgramName ComputerName ----------- ------------ System Center Endpoint Protection remotecomputer Microsoft Visual J# 2.0 Redistributable Package - SE (x64) remotecomputer Mozilla Firefox 57.0.2 (x64 en-US) remotecomputer Mozilla Maintenance Service remotecomputer
RemoteProgramis not a standard PowerShell command, so you'll have to include its implementation to get help.Format-List *? Just curious if you see the "missing" parameters that way.Format-Listcommand); see my answer.