I have a script that lists all installed applications on all the servers I have on my network.
The problem is that I am unable to list server name. How do I add $server.name to the select statement so that it is the first column in the output?
# Pinging the server in Powershell-way!
if (Test-Connection -ComputerName $server.name -count 1 -Quiet ) {
echo -computername
echo $server.name
echo $services = $services,
(Get-WmiObject -ComputerName $server.name win32_product | select name, vendor, version | Export-CSV -Path $File -Force -Append -Verbose)
}