powershell - PowerShell 在同一行显示属性
问题描述
我正在尝试输出以下属性,但它在同一行中显示所有属性。任何想法我做错了什么?
##################### 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
解决方案
原来我需要Format-Table
从$apps365
变量中删除
推荐阅读
- facebook - Facebook Graph API - 获取地址,但为空
- xamarin - Setting MainPage = NavigationPage during OnStart in Xamarin.Forms displays a blank screen in Android
- ios - 将 CLLocationCoordinate2D 返回到结构
- hyperledger-fabric - 运行 Hyperledger Composer 命令时出错:composer network start
- axapta - 如何检查是否可以使用 next 运算符?
- c# - Lync 客户端通用 COM 异常
- azure-container-service - aks 上每个节点的 pod 数量限制
- ios - 如何从 QT 应用程序设置 ios 应用程序包 ID
- matlab - 如何根据距离分割最短路径
- xamarin.forms - 如何在 xamarin 表单中自定义评分栏大小