Reputation: 13
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
Reputation: 13
Turns out I needed to remove the Format-Table
from the $apps365
variable
Upvotes: 1