Conor Timms
Conor Timms

Reputation: 13

PowerShell displaying properties on same line

I'm trying to output the properties for the following but it is displaying all of them in the same line. Any ideas what I'm doing wrong?

##################### Removes office installations #####################

$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"

$apps = Get-ChildItem -Path $RegPath | Get-ItemProperty 

$search = Read-Host -Prompt "Enter the name of application you want to uninstall: "

$apps365 = $apps | Where-Object { $_.DisplayName -Match "$search" | Sort-Object DisplayName | Format-Table }

Write-Host $apps365

Upvotes: 0

Views: 400

Answers (1)

Conor Timms
Conor Timms

Reputation: 13

Turns out I needed to remove the Format-Table from the $apps365 variable

Upvotes: 1

Related Questions