Find installed software with Powershell, function

$livecred = get-credential

function findsoftware {
Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | where {$_.Publisher -match 'NetApp, Inc.'}
}

invoke-command -computername server1, server2, server3 -credential $livecred -ScriptBlock ${function:findsoftware}
Advertisements