How can I change the presenation of the output my code produces:
$apps = Import-CSV apps.csv
$computers = Import-CSV compobj.csv
foreach($computer in $computers) {
$computerLob = $computer.lob
$lobApps = $apps | ? {$_.lob -eq $computerLob }
foreach($app in $lobApps){
$computerHostname = $computer.hostname
$appLocation = $app.location
$installed=Test-Path "\\$computerHostname\$appLocation"
New-Object PSObject @{Computer=$computer.hostname;App=$app.appname;Installed=$installed}
}
}
I would like for the presentation of the code to be changed. This is how it looks like:
Name Value
---- -----
Installed True
App App1
Computer 171.159.192.10
Installed True
App App2
Computer 171.159.192.10
I'd like for it to look like this:
Computer App1 App2
----------- ------ -----
171.159.192.10 True True