Get-ItemProperty reads registry values. You can create a software inventory in just one line since it supports wildcards:
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* |
Format-Table DisplayName, Publisher
Format-Table DisplayName, Publisher
Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* |
Format-Table DisplayName, Publisher
Format-Table DisplayName, Publisher